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.
If you are using an outdated (8.0 or earlier) version of GameMaker, and are trying to utilize examples and snippets from more recent versions, or creating systems that are intended to work correctly across multiple versions, this is going to be useful.
This isn't an exactly recent example, but since my previous website is gone for good, there wouldn't be a good way to find it somewhere now.
So here you go, system to make game scale to different view size perfectly.
Initial problem occurs to tiles (and theoretically any graphics drawn partially), due to single-pixel 'leaks' of surrounding pixel data when drawing scaled images. That persists only on some computers, making it fairly confusing.
Installation is as simple as moving two related objects over, setting a variable value (global.pscale), and creating a instance of obj_pscale where pixel-perfect scaling is needed.
Generally it's quite simpler than editing all your tilesets
, though that probably works better for some situations still.
Fairly big, fairly maze-y, has some rooms, and takes little time to generate
This is a small update to my 2010 dungeon generator example.
The main change is that it now treats high values of "cut dead end" parameters correctly, no longer placing unconnected rooms even if there's enough space to allow that.
Also there's now a small demo on how to use the resulting data, placing some walls and a player to wander around as.
Update: Also see this post about this approach to dungeon generation.
Looks nice enough, right?
In free time of last days I've been developing earlier mentioned thing in Love2d, which is platformer engine.
One provides a simple framework for games that use combination of aligned tiles and dynamic objects.
As well it adds a easily modifiable system to load levels from strings, giving freedom for implementing level editors.
You can download a compiled version here or watch discussion thread on official forum here.
Can be seen as a part of those block-building games
So, today comes with an example of collision between point, box, and line versus a 3d array.
3d array is presented as ds_list (z) with ds_grid's (xy).
Functions include management of this 3d array (creation, destruction, modification - no memory leaks included) and actual functions to check for different collisions.
All of these also include error handling, so attempting to check for collision outside the 'map' will threat area as 'air' (0) and not crash the game.
Also note that no optimization was applied to process of block rendering - you'd likely have to change that if basing game with large level on this example.
As you might have noticed, process of making nice-looking isometric games can be tricky.
Especially that part when you want your terrain look like actual terrain rather than arrangement of isometric images.
Common approach to this is to use alpha channel mask(s) to smooth edges of tiles.
Here I've made a script that applies such mask to given sprite, handling all additional actions needed.