Gamemaker Studio 2: How To Make Full screen Switching

news_image

A good feature for a video game to have is full screen switching. Full screen helps a game feel more immersive and being able to switch out of it helps people who have specific monitor setups. Today will show how you a method for implementing full screen switching.

In Gamemaker Studio 2, make an object and call it o_fullscreen.

Turn persistent on. A persistent object only has to be placed in a room once for it’s code to run through the whole game.

Make a key press event and set the key to F1. Add the following code:

window_set_fullscreen(!window_get_fullscreen());

In the first room of your game, place o_fullscreen into the Instances layer. o_fullscreen only needs to be put in the first room of your game.

In Options, select the Windows tab. Go into Graphics and change the following:

Allow window resize: ON

Scaling: Full scale

Start fullscreen: OFF

Use synchronization to avoid tearing: OFF

Start the game and press F1 two times. Your game’s screen should effortlessly switch between window and full screen.

Fullscreen GIF

Advertisements

How to make a jump combo for a platformer

When making a platformer, it’s gameplay can benefit by granting the player some form of reward for successfully using the mechanics at their disposal. In the Super Mario games, the player is able to obtain a 1-up by maintaining a jump combo.

When the player keeps jumping on enemy heads without landing on the ground, the points the defeated enemy gives increases until each jump gives a 1-up. This mechanic in theory is easy for a player to understand and naturally gives them a chance to put their jumping skills to the test for the chance of a beneficial reward.

This project provides its own take on the jump combo by making the combo do much more than give points and 1-ups. This project will:

  • Have a jump combo that resets when the player touches the ground
  • Beneficial effects obtained by continually jumping on enemies without landing on the ground
  • Have platform collision with slopes
  • Bouncing springs that the player and enemies can bounce off
  • A persistent debug object that makes testing global variables more convenient
  • Persistent GUI objects that only have to be placed in a room once
  • Varying jump height from how long the player presses the jump key

Project file (Press Download All and run the project in GameMaker Studio)

Project video

From this post onward, there will be long periods of inactivity. The nature of producing these video game projects from making the project, documenting the project and making a tutorial video on the project takes an extraordinary amount of time to make. I appreciate every subscriber on Tyrant Haxorus and i am always working on finding something worthwhile to write about. With the advent of GameMaker Studio 2 I cannot guarantee that this and past projects made in GameMaker Studio will work with GM2. Thank you for reading. I hope my project has assisted in giving you guidance on making compelling gameplay for your own creations.

Petite Reviews 2

Shantae Half-Genie Hero

What’s good

  • Vastly improved graphics
  • Great soundtrack as expected
  • Entertaining and likeable cast of characters

What’s okay

  • Transformations are varied and fun to use, even though it’s mechanical design isn’t as practical as the pirate equipment

What’s bad

  • The pirate equipment from Pirate’s Curse was significantly better for speed running and casual play because it kept the player’s move set concise and could be instantly used in all manner of situations 
  • Certain transformations are redundant (Bat and Harpy, Mermaid and Crab)

Muramasa Rebirth

What’s good

  • Fantastic art style based on Japan’s Edo period
  • Delightfully fierce and stylish combat

What’s okay

  • Dodging is done by pressing down on the left stick and moving in a direction
  • Getting all the weapons and endings requires all the optional side quests for both characters

What’s bad

  • No fast travelling from save points until the post-game
  • Combat is awkward in vertical sections

GameMaker Studio: Kirby’s Tornado Ability

KCC_Tornado_2

In the Kirby Games, the Tornado ability severed as a ability for combat and level navigation. When used, the player is temporarily invulnerable and enemies take damage from Kirby’s touch. Holding down the jump button also made Kirby rise into the air. Today presents a project recreating Kirby’s Tornado ability at the most basic level. This project will:

  • Have GUI Elements on the screen
  • Enemies that take damage by jumping on top of them or from using Tornado
  • Have the current health of the enemies show when they take damage
  • Basic platforming with an ability that can be used when touching the ground

Project file (Press Download All and run the project in Gamemaker Studio)

Project source code

Character Drawings from GIMP

I am a regular user of the free program GIMP. It provides the tools I need for what I make and doesn’t require a monthly fee like with Adobe Illustrator. These are three images I made after spending many hours messing around to eventually crafting something that wasn’t a doodle.

GameMaker Studio: Kirby’s Crash Ability

In the Kirby games, one of the most powerful copy abilities is the Crash ability. When used, it wipes all enemies on screen and does severe damage to bosses. Today presents a project that recreates one of Kirby’s copy abilities at the most basic level. This project will:

  •    Create a large nova object that spawns around the player
  • Allow the player to make the nova object by pressing a button
  • Only let the player make the nova when they have max health
  • Double the player’s health upon having 1000 coins
  • Have GUI elements on the screen
  • Enemies that take large damage from the attack
  • Have the current health of the enemies show when they take damage

Project file

Project source code

Basic Crash Ability

basic-crash-ability

Expanded Crash Ability

expanded-crash-ability

Finished Crash Ability

Finished Crash Ability.gif

GameMaker Studio: Player Attack in a 2D platformer

 

GameMaker-Studio-Logo

In 2D platformers, players should be able to take care of enemies with more than just jumping on them. Today I will show you a method for a player attack. It creates a projectile that flies in front and behind the player and damages foes it hits.

Sprites (This tutorial assumes your sprites are basic coloured squares and your game has functional platform collision and player/enemy movement )

spr_player 32×32

spr_attack 32×32

spr_enemy 32×32

Objects

obj_player

Create Event

canfire = true

Alarm 0 Event

canfire = true

Press A Key Event

if canfire = true

{
if (keyboard_check (vk_left) = false) && (keyboard_check (vk_right) = false)
{
action_create_object_motion (obj_attack, obj_player.x,obj_player.y,10,180)

action_create_object_motion (obj_attack, obj_player.x,obj_player.y,10,360)
}
if keyboard_check (vk_left)
{
action_create_object_motion (obj_attack, obj_player.x,obj_player.y,10,360)

action_create_object_motion (obj_attack, obj_player.x,obj_player.y,10,180)
}
if keyboard_check (vk_right)
{
action_create_object_motion (obj_attack, obj_player.x,obj_player.y,10,180)

action_create_object_motion (obj_attack, obj_player.x,obj_player.y,10,360)
}
canfire = false
alarm[0] = 0.5 * room_speed
}

obj_attack

Collision Event with obj_wall

instance_destroy()

Collision Event with obj_enemy

instance_destroy()

obj_enemy

Create Event

global.Ehp = 10
Ehurt = false

Alarm 0

Ehurt = false

Step Event

if Ehurt = true
{
image_alpha = 0.5
}
else
{
image_alpha = 1
}

if global.Ehp <=0
{
instance_destroy()
}

Collision Event with obj_attack

if !Ehurt
{
global.Ehp-=5
Ehurt = true
alarm[0] = 0.3 * room_speed
}

When done, the player’s attack should produce moving projectiles. These projectiles disappear when hitting walls, are not produced every time the player mashes the A key, do damage to foes when they are hit by them, enemies flash invincibility frames when hit by the attack and disappear if they take enough damage.

I hope this tutorial has helped you in your project’s development.