How To Make Saving and Loading for a Platformer

Long shadow floppy icon with a game pad

Today’s Game maker Studio 2 project shows a way of handling the feature of saving and loading a game. It focuses on retaining what level the player was in, the abilities they have obtained in their adventure and allow new modes to unlock depending on how much the player has progressed. This system was made for 2D platformers and is designed to handle level progress and setting the values of important variables to true or false. It is not suitable for RPG’s or Zelda style games. It specifically cannot handle the position of puzzle objects, inventory, treasure chests, special events and growing crops.

Project Link: Project File (Press Download All, run the project in Gamemaker Studio 2)

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.

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

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

A possible solution to Overwatch’s Infinite Loading Bug

 

overwatch_hanamura_jpg

In Blizzard’s multiplayer shooter, a crippling bug can inflict players and render the game unplayable. It it’s commonly known as the Infinite Loading Loop. This bug happens when players are waiting for a game map to load and cannot get past the loading screen.

The bug breaks the game because players cannot even access training modes that are separate from multiplayer modes. It also leads to terrible effects on players as inactive players will eventually be kicked out of a match. If kicked out enough through a error players have no control over, they are penalised with a 75% reduction in experience points until their Games Played and Games Completed ratio returns to normal.

There is no absolute solution to this serious problem because the game loads an environment map while internet connections go through Battle.net’s DRM (Digital Rights Management) that verify players are connected to Blizzard’s servers. This guide shows a solution that has worked for me in my experience with the Infinite Loading loop and may work for your circumstances.

Press the Windows key

Search  firewall

Select “Allow an app through Windows Firewall”

Click on “Change Settings” (This step assumes you have administrative rights)

Scroll down until you find “Overwatch Application”

Tick the Private checkbox and leave the Public checkbox unticked

Press the “Ok” button on the bottom of the firewall screen

Exit the firewall window

Open up Overwatch and enter a training map. The map should load as normal and all games modes should not experience the loading bug. This possible fix opens up the games port communication with Blizzard’s servers.

When Private is not ticked off, the firewall prevents the port from communicating with the servers because it thinks it’s a malicious payload. Do not tick the Public checkbox because only your PC’s protocol has to forward a connection to Blizzard’s servers. You don’t want other devices finding your PC every time you are playing Overwatch.

I hope this guide helps fix your encounter with the Infinite Loading Loop. Have fun with one of the year’s greatest games.

 

How to Make Basic Invincibility Frames in GameMaker Studio

GameMaker-Studio-Logo

In video games, invincibility frames are the period of time when a player is invulnerable to a game’s hazards. They allow the player to make a mistake and have enough time to quickly move away from hazards. Without invincibility frames, moments of high challenge become frustrating for players that don’t have a high level of skill. While not every game requires invincibility frames, they are a feature that grants players a margin of error for how many times they can make a mistake.

To start, create 3 sprites and name them Spr_Player, Spr_Wall and Spr_Enemy1.

Tutorial Pic1

Then create 3 objects and name them Obj_Player, Obj_Wall and Obj_Enemy1

Tutorial Pic2

Select Obj_Wall and have Solid turned on

Tutorial Pic3

Then open up Obj_Player and put in these events:

Tutorial Pic4

Now make a sound file with the sound icon.

Tutorial Pic8

Select an MP3 file from your computer and in Target Options, Set it to Stereo and 16 bit.

In the Create event, enter the Control tab on the right. In the Variables section, select Set Variable and put in the following:

Tutorial Pic5

In the Alarm 0 event, put in the following:

Tutorial Pic6

In the Step event, put in the following:

Tutorial Pic7

In the Collision event with Obj_Enemy1, put in the following:

Tutorial Pic9

In the Draw event, put in the following: (For the code icon, put in image_alpha = Flash)

Tutorial Pic10

Once a room has been made and these 3 objects are placed in that room, the player should flash when coming into contact with the enemy and a sound effect will play. Do not hesitate to point out flaws and inaccuracies with this tutorial and I hope this has helped your title in progress.

How to make player movement for a platformer in Gamemaker Studio

GameMaker-Studio-Logo

(The following method is borrowed from Animator XP’s “Game Maker Studio Tutorial: Arcade Platformer Part 1 (Movement)”

1.Create a sprite, name it spr_player

Capture

2.Open up the sprite and select “Modify Mask”

Capture1

3.In Bounding Box, set it to “Full image”

Capture2

This allows the player object to have the best collision possible with platforms.

4.Create an object, name it obj_player

Capture3

5.Open up the new object and select “Add Event” in the events tab

Capture4

6.Select “Create”

Capture5

7.In the “Actions” tab, select “Control” and in “Code” drag the document icon into “Actions”

Capture6

Capture7

8.In the code window, type in the following:

room_speed = 60 // sets the game’s frame rate. (FPS) 60 is the ideal FPS for games.

jumped = false //the player is unable to jump until an actions changes it to true.

9.Then in obj_player, select “Add Event” in the events tab

10.Open up the “Alarm 0” event

Capture8

Repeat step 7

11. Type in the following:

jumped = false // this determines if the player is able to jump or stay on the ground.

This is changed in the “Step” code. The create event makes this variable and the alarm triggers when a player input changes it to false.

Repeat step 9

12. Open up the “Step” event

Capture9

Repeat step 7

13. Type in the following:

if(keyboard_check(vk_left)) //when the left key is pressed
{
if(place_free(x-5,y))//this checks if 5 pixels to the left are open space
{
x-=5//speed of movement.
}
}

if(keyboard_check(vk_right)) //when the left key is pressed
{
if(place_free(x+5,y))//this checks if 5 pixels to the left are open space
{
x+=5//speed of movement.
}
}

if(keyboard_check_pressed(vk_up))//when the up key is pressed
{
if(!place_free(x,y+5))//this checks if 5 pixels up and down are open space.
{
jumped = true//the alarm changes to true.
alarm[0] = 15// jump into the air. Affects how high the player jumps.
}
}

if(jumped == false)//when the alarm’s false, trigger the falling code.
{
//Fall code:
if(place_free(x,y+8))
{
y+=8//affects how fast the player falls.
}
else
{
if(place_free(x,y+2))
{
y+=2
}
}
}

else
{
//Jump code:
if(place_free(x,y-alarm[0]))
{
y-=alarm[0]//the alarm changes to false.
}
else
{
alarm[0] = 1
{
y-=0
}
}
}

14.Repeat step 1 and 4, name it spr_wall and obj_wall

15. Open up obj_wall and tick “Solid”

Capture10

16. Make a room

Capture11

17. Make a basic level and place obj_player in it.

Capture12

Capture13

The player should stand on the ground, fall when jumping and not pass through walls.

This method is good for platform controls that feel fluid and responsive on a basic level, but it has flaws. “Place_free” checks if a set number of pixels are open space, meaning this method is not ideal if your level design consists of pixel perfect platforms. Animation with player movement is also limited because “Keyboard_check” responds to the specific input.

Say you pressed left and the jump button together. Players will see the left key animation and not the jump key animation unless it’s the only button pressed.

E.g

if (jumped == true) //checks if jump is true

{

sprite_index = spr_playerjump //jump animation displays on screen

}

if (jumped == false) //checks if jump is false

{

sprite_index = spr_player // idle animation displays on screen

}

if(keyboard_check(vk_left)) //checks if the left key is pressed

{

sprite_index = spr_playerleft // left movement animation displays on screen

if(place_free(x-5,y))

{

x-=5

}

}

if(keyboard_check(vk_right)) //checks if the right key is pressed

{

sprite_index = spr_playerright // right movement animation displays on screen

if(place_free(x+5,y))

{

x+=5

}

}

If you require a method with complete and fully robust customization, use the method on GameMaker Tutorials.com

I hope this method has helped you with your title in progress. Do not hesitate to point out faults with this tutorial and take care.

References:

Gamemaker Tutorials.com “Platformer Basics [Article]” May 4, 2014 viewed on 22nd May 2016 http://gamemakertutorials.com/?p=383

AnimatorXP (May 8th 2016)”Game Maker Studio Tutorial: Arcade Platformer Part 1 (Movement)” retrieved from https://www.youtube.com/watch?v=sx50CKhfT88

How To Fix Connection Problem on PS Vita Content Manager Assistant

2014-11-24-163059

Entertainment Buddha 2015, ‘How to Get PS1 Game Saves From the PS Vita or PS3 Onto a PS TV’ http://www.entertainmentbuddha.com/how-to-get-ps1-game-saves-from-the-ps-vita-or-ps3-onto-a-ps-tv/

(This Guide applies to Windows 10, but will likely work on Windows 7 and 8.)

When you have installed Sony’s handy Content Manager Assistant into your computer, you may find that you can’t connect your device. The most simple and straight forward way to fix this involves changing settings in the Windows Firewall. Under normal circumstances, you shouldn’t allow a piece of software to bypass the Firewall as it could cause intrusive and serious issues with your computer.

However, Content Manager Assistant is an exception because communication and information is sent and received from your personal Vita console to your computer. It is not like most software that have their information receiving blocked because they sent to out to unknown parties. CMA (Content Manager Assistant) serves the function of easily using and transferring imagery and music for the Vita and even lets you back up game data on your computer if you don’t have a PlayStation Plus subscription.

To solve the connection problem, go to:

Control Panel, System and Security, Windows Firewall.

Then click on ‘Allow an app or feature through Windows Firewall’. Click on Change Settings and tick the box on the left for Content Manager Assistant.

After these steps have been done, open up CMA and go ‘Network Connection Settings’. Open up Content Manger on your Vita and select ‘Copy Content’. Choose the PC connection option and select WI-FI.

Click on ‘Register Device’ and make sure CMA on your PC has  ‘Connect to PS Vita System Using Network’ is ticked. Once that is done, CMA on your computer will generate a unique number that has to be typed in on your Vita. Type in the generated number and your Vita and PC are now connected.

I hope that the methods in this guide have been beneficial for you and please do not hesitate to point out an problem with these methods.