Alternatively best described as "how can floor(4) be 3 and how to fix it".
Continue reading⚂ This is the day
This is a blog post about aiming ahead to hit moving targets! It has interactive elements.
Continue reading
This is a small post about the algorithm I wrote for the recent pixel font tool to establish paths of shapes and holes on the image.
Continue readinglabel hello: select dialog("Hello! What would you like to do?") { option "Count to 5": for (var i = 1; i <= 5; i = i + 1) { wait(1); trace(i + "!"); } return 1; option "Nothing": jump yousure; } label yousure: select dialog("You sure?") { option "Yes": trace("Well then,"); return 0; option "No": jump hello; }
Example of supported syntax
As some might remember, earlier this year I have published a small guide on writing interpreters, which went over the process of implementing a basic interpreter capable of evaluating expressions consisting of numbers, operators, and variables.
This continuation of the guide further expands upon concept, outlining how to support calls, statements, and branching - enough for a small scripting language.
Continue reading
(click to interact)
(mouseover/click to play GIF)
(click and drag to adjust rectangle size/position/rotation; distance to a circle is shown)
Suppose you have a rotated rectangle and a basic shape that rotation doesn't matter for (such as a point, circle, or a line segment), and you want to check whether the two are intersecting - be that for collision handling, hit testing, or whatever else.
On a glance this might seem like a bother because things are rarely too simple with rotated rectangles, but in this case it isn't - because you can "unrotate" the rectangle.
This small post is about that.
Continue reading
(click to interact)
(mouseover/click to play GIF)
(spaceship graphic by Kenney)
Nowadays, most development tools provide ways of setting pivot/center point for imagery - that is, the relative point around which the image will rotate and usually be positioned relative to.
However, ability to define multiple pivot points per image remains relatively uncommon, despite being something that you want to have projectiles fire from a correct point of a sprite, display weapons/attachements at right relative points, or do anything else that demands relative offsets.
This small post is about that.
Continue reading
(click to interact)
(mouseover/click to play GIF)
Interactive demo (if JavaScript is enabled)
This is a small post about how to convert key codes to key names and/or convert key names to key codes. Comes with sample code for GameMaker and a generic version.
Mostly published because it covers majority of common and semi-common buttons.
Continue readingThis is an average-length (~10 pages) blog post about how to write a parser, AST builder, bytecode compiler, and a bytecode interpreter - in general, and in GameMaker specifically.
Continue readingOver time, I have witnessed a particular scenario a few too many times:
Having spent far too much time arguing with people and explaining how to use version control, I have decided to make a blog post that would cover a few things on the matter:
While this tutorial is oriented on GameMaker: Studio users, it can also be easily applied for other tools.
Continue reading
This is a blog post about handling circle-rectangle collisions. For some reason, these seem to be generally regarded as something complicated, even though they aren't.
Continue reading