Illustration
Such feature is specifically useful for exploration games, where goal(s) may be at different distance from player, and some guidance is required.
Source code follows,
Continue reading⚂ But do the random phrases cache
Illustration
Source code follows,
Continue reading
It's actually pretty hard to describe what this does without an image.
Interactive demo. Mouseover to activate, drag planets around.
This is an example of making an instance orbit around other instance in GameMaker.
In contrast to other similar examples (and commonly given advice of the kind), it allows to define orbiting speed in a common way (pixels/frame instead of degrees/frame).
This is accomplished by calculating the distance to orbit' center (from current position), calculating the orbit' length, and thus converting pixel speed to degree speed.
New position is then calculated and instance' speed is adjusted for it to reach it the next frame.
This allows to use direction in collision calculations as per usual.
Overall, the code is simple enough but documented regardless.
Code follows,
Continue reading
A video.
A comparison
This post explains how to replicate GameMaker: Studio's application_surface in older versions.
Doing so is more or less a requirement if you want a scaled window with pixel-perfect rendering and/or do not desire to modify your tilesets (although a tool had been made since to help with this).
Continue reading
In the example, 'notifier' is just being annoying on purpose
That's a video.
How it looks and how it is internally
This example demonstrates how to organize system where some level information is presented as a 2-dimensional array (item data indicating block index), and organize collisions with that.
Could basically say that this is a smaller version of my Terra example. Except simpler, using arrays, and Lite-compatible. As well it does not support truly infinite worlds (has a 32000x32000 limit), but target user is not likely to need that anyway.
Let's just say that art assets for this example are from abstract collection.