Writing Steam guides in Markdown


Markdown / BB Code / displayed result

Do you write Steam guides and walkthroughs? Or, perhaps, you are a game developer and you have to write game announcements and changelogs now and then?

And if either, has it recently occurred to you that it is not 2008 anymore and writing formatted text in BB Code isn't so convenient, even if sometimes slightly less ambiguous?

In process of working on the recent few big guides, it sure did to me, and this is a post on how to spare yourself of misery.

Continue reading

Fast approximate arctan2/atan2 function

(click to interact)

Alternatively titled "exciting adventures in doing trigonometry without CRT".

Continue reading

Preparing your game for deterministic netcode

A person asks "What is NETCODE?"
If this looks slightly familiar, that's because it is

Considering that frequency at which people ask me about what it takes to do netcode (and what they need ready for it) continues to rise year-to-year, I figured that it's about time that I finally make a blog post about this.

This one's about deterministic netcode as it is by far most requested and also the kind where it's possible to give more specific advice than "it depends".

Continue reading

A small guide on writing interpreters, part 2

label 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

Simple intersection checking between rotated rectangles and circles/points

(click to interact)Intersection checking between rotated rectangle and point/circle
(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

2d pivot points explained

(click to interact)Explaining pivot points
(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