GameMaker: Circular cooldown rectangle

GameMaker: Cooldown rectangle

I do not know the exact name of this visual effect (angular/clockwise fade-in/fade-out?), but it is one of the most common things that you can see in interface of RPG and RTS games, displaying progress of construction/upgrade/ability cooldown. So, to the point...
You can read how this is actually being implemented, or just scroll down to the bottom of post and grab the code and/or GMK file.
Implementation of such is actually pretty simple, Continue reading

GameMaker: “flawed” AI path finding

In some cases, you may want object's AI to not pick exactly perfect path.

This example demonstrates creation of a basic "flawed" AI, that uses a rather plain method of finding path. Such will still make it reach destination in many cases, but will also allow player to "fool" the AI, making it stuck in dead ends or T-intersections (if player is standing right behind the wall).

To illustrate simplicity of concept, example is largely made in Drag & Drop.

Download

Continue reading

GameMaker: Angular motion


It's like drifting. On a spaceship. In space.

This is an example of managing angular motion in GameMaker.
In turn, that means having angular speed with acceleration, friction, and limitation.
Such can be particularly useful for simulating a more 'smooth' rotation behaviour, when object will not start or stop rotating instantly.
If combined with relatively properly written code for linear motion, this can grant pretty nice behaviour for space games.
Also there's a "trail" effect added, originally just to demonstrate how it works.
Everything is pretty nice and simple.

Download GMK

GameMaker: Animating backgrounds

This simplistic example demonstrates how to cycle backgrounds in a room at a fixed rate, as you would do with images in a sprite.
Obvious advantage of cycling (animating) room backgrounds is that these are handled and drawn by engine, which makes them generally faster than something you can achieve in a short amount of time.
Seen method supports any number of backgrounds larger than zero.

Download GMK

GameMaker: Turn-based battle engine

Today I've spent some time making this intermediately impressive turn-based battle example.
It supports infinite number of unit "teams", configurable properties, inheritance, and more.

Built-in system will also attempt to reduce chances of developer (you) accidentally messing up something.
And there's easily configurable AI built-in too.

Overall, I somewhat got carried away while making original example, which was planned just include turns with unit selection.

Download GMK

GameMaker: View following two objects at once


This example is going to be of great use for everyone making local multi-player games, as well games requiring to display two objects on screen at once generally.
Effect here is, that view is positioned and scaled (if needed), to include two given instances at once.
Example provides a single function that does this sort of trick for you, absolutely painlessly and easily.

Download GMK

GameMaker: Connectable objects


I'm not a specialist on topic of weird helicopters, but this looks like one.

This secretly awesome example provides a system to 'connect' objects together, meaning that 'child' objects will be positioned relative to their 'parent' in means of both position and rotation.

Also you can (in turn) also make those 'child' objects 'connectors', meaning potentially infinite number of 'levels' of instances behaving separately.

For ones that might have this example from my old website, it is worth checking out again, since it has been rewritten almost completely, delivering quite cleaner naming, as well as easier access to child object properties, and some optimizations.

This example can be particularly useful for games involving 'modular' vehicles, as well as multi-object bosses.

Download GMK