Tag : snippet

[GML] Basic Player Shooting – Loose Java basicplayer shooting script

GML Basic Player Shooting

gml basic player shooting - loose java basicplayer shooting scriptThis is a simple GML Basic Player Shooting snippet for a loose java basicplayer shooting mechanic. This is a great recipe to try after just completing our GML Asteroids Style Movement tutorial.

Requirements:

  • Game Maker 8.1 Or Game Maker: Studio

Game Objects:

  • ObjPlayer
  • ObjBullet

Setting Up ObjPlayer:

The Player Create Event

 

The Player Step Event

 

The Player Alarm Event

 

Setting up ObjBullet

The Bullet Create Event

 

The Bullet Collision Event

 

Game Maker RPG Movement – WASD/Arrow Keys

Game Maker RPG Movement – WASD/Arrow Keys

rpg movement game makerDescription:

This is a simple GML snippet for an RPG style movement using either the arrow keys or WASD. This Game Maker RPG Movement snippet goes over the begin step event to detect our collision objects.

Requirements:

  • Game Maker 8.1 Or Game Maker: Studio

Game Objects:

  • ObjWorldCollision
    • An Empty Game Object used as barriers/walls so that the player can’t move past them.
    • I typically set this to the grid size, which tends to be a 32×32 square.

The Create Event Code:

The Begin Step Event Code:

The Step Event Code:

Please stay tuned for our next RPG movement game maker snippets!

Want to expand your knowledge? I highly recommend this book for getting more advanced with your GML code and game development experience with GameMaker: Studio. Please buy this book: GameMaker Game Programming with GML

GameMaker Game Programming with GML is one of the highest recommended books for GameMaker Studio! If you are ready to take your programming to the next level, I highly recommend picking this up!

[GML] Game Maker WASD Movement Code

Game Maker WASD Movement Code

gmslogo1This is a simple Game Maker WASD Movement Code for easy use. You can change it up to even use arrow keys or whatever keybinds you wish to setup for your characters movement.

Requirements:

  • Game Maker 8.1
  • Or Game Maker: Studio

[GML Create Event]

[GML Step Event]

Use WASD instead of the arrow keys:

Expand on this by checking out the RPG Game Maker Movement code.

Want to expand your knowledge? I highly recommend this book for getting more advanced with your GML code and game development experience with GameMaker: Studio. Please buy this book: GameMaker Game Programming with GML

GameMaker Game Programming with GML is one of the highest recommended books for GameMaker Studio! If you are ready to take your programming to the next level, I highly recommend picking this up!

[GML] Asteroids Style Movement

Description:

This is a simple GML snippet for an Asteroids Style Movement for the player.

Requirements:

  • Game Maker 8.1
  • Or Game Maker: Studio

The Create Event Code:

The Step Event Code:

You can expand on this by adding in some basic player shooting with the following snippet: [GML] Basic Player Shooting.