fullscreen Read more

AI: aiming towards a moving target

I would like to show a possible solution that I worked on for the aiming towards a moving target problem. Let P be the player, E the enemy, S the shot. P shoots towards E, but in the meantime E may be moved. Let’s put ourselves in the reference system of P and consider polar […]

fullscreen Read more

Game Maker: selecting multiple instances

I would like to show a simple method to work around a limitation of the Game Maker collision functions. This method works with all the collision functions that select an instance of an object, such as instance_place, instance_position, collision_line, etc.. These functions return the id of the object being collided if they succeed, otherwise return […]

fullscreen Read more

How to force the browser not to cache images

When I made my website, I ran into a big problem: because I often make modifications to my games and also change the visual theme, I have to update the images. However, the browser continues to show the old images, even if I overwrite the image files (due to the browser cache). I did a […]

fullscreen Read more

DemoRec: input recording and playback

I wish to show you a new Game Maker extension I made to record the gameplay. The extension can record mouse and keyboard input and reproduce them accurately during playback. This extension can be very useful to decouple the graphics of the games from the gameplay: for example, if you want to change some graphic […]

fullscreen Read more

Mixing two sprites preserving alpha channel

Mixing two sprites according to a percentage can be interesting, in order to fade from the first to the second one. Let’s suppose for now that the two sprites have the same shape. An initial idea: draw the first sprite with alpha 1, then draw the second sprite above the first one with the desired […]

Read more

Tiles: automatic junctions in Photoshop

I wanted to share this Photoshop action for creating automatically junction tiles. Let’s assume that you have the following block of tiles: These tiles allow to draw convex areas of every size: However, if you want to draw concave areas, you need more 4 tiles: Given the first block of tiles, the action creates the […]

fullscreen Read more

Save and load tricks

Often in games there is the need to save and load the game state. In Game Maker, there are some specific functions (game_save, game_load), which save and load the room state, the objects and all the variables. However, there are some things that aren’t saved (for example, the state of an eventual music track). Some […]

Read more

TCP Friends: making online games

TCP Friends is a software I made some time ago in Game Maker; it allows some players to connect each other to start an online match. The program is a good starting point to make online games, you can use it as it is (by downloading and editing the GMStudio project). TCP Friends is not […]

Read more

Border artifact in Game Maker

Sometimes, the borders of the sprites can show a strange artifact. This is not a problem related to Game Maker, but in general to all applications that use GPU. Here is a screenshot that shows the problem: As you can see in the image, by scaling the sprite by 200%, an unexpected colored border appeared. […]

fullscreen Read more

GMS: substitute healthbars on Linux

For some reason, Game Maker draws healthbars in a different way on Linux. Moreover, the edge is misaligned with the filling. So here is a script that takes the same arguments of draw_healthbar and draws healthbars correctly also on Linux: