About Vadym

Thanks for reading!
[dinosaur peeking in from the right] Hey! I now have a newsletter! Come take a look.
You can also follow me on Twitter or Tumblr.

GameMaker: applying “with” to multiple objects

As you may know, GameMaker Language has a Pascal-like "with" structure:

with (value) { code }

but it's not exactly like the Pascal version. In GameMaker, it can take an instance:

var bullet = instance_create(x, y, obj_bullet);
with (bullet) direction = 180;

or an object type (and will apply the expression to each instance of it):

with (obj_bullet) instance_destroy();

This can be rather handy under the multiple circumstances.

However, initially the same block can not be applied to multiple values, and that's less handy.

Sometimes you can cheat by applying the expression to a shared "parent" type of objects, but that is not always the case (and can have side effects if there are more object types meeting the condition).

So let's consider your options for applying a piece of code to all instances of several types: }

Continue reading

Introducing: hxpico8

Have you heard of PICO-8? It's a "fantasy console" with little built-in sprite/code/level/sound/music editors and a carefully crafted spec. And (slightly changed) Lua scripting. And a web player export (example). A rather interesting option if you like working with restrictions and/or tiny pixelart.

Long story short, I've made a little Haxe compiler target that generates compact Lua code that runs on PICO-8. This post covers reasoning, some technical details, and tricks used to accomplish this.

Continue reading

GameMaker: Tetris in full Drag & Drop


Click to launch the HTML5 version of the game

First, take a look at the above link. There's score, 7 tetriminos, slowly growing difficulty - standard things for a Tetris game. The catch? There isn't a single line of code. Nor a single variable. It's all done in GameMaker's "drag & drop" visual scripting.

The story of how this even happened is like so - yesterday was another day when my internet connection disappeared for half of the day without any logical reason whatsoever. As I look at the top of my now-static TweetDeck timeline, and notice this bunch of tweets from Vlambeer's Rami Ismail. While you can generally agree with points outlined, few things could have had better clarification:

  1. Difficulty depends not only on developer's coding skills, but also on the tools used.

    For example, making a "space invaders" game in most modern tools with built-in memory management, collisions, and function sets is easy enough, but should you go lower level... storing invader information in an array? Storing and moving around dynamically created player and invader bullets?? Programming trajectories and destructible defenses??? Not as much careless fun as you may have envisioned. Pong may seem suddenly simpler with base requirements of just a bunch of variables and inverting ball x/y velocity for bounces.

    Additionally, certain tools are best suited for certain task. For example, it is easy to make a turn-based puzzle game in PuzzleScript (hence the name) due to the way engine is based on "rule" definitions. Making a platformer game in PuzzleScript, however, is a much harder feat. It isn't, by no means, impossible, but requires more planning than it would take with a "platformer-centric" engine.

  2. Game development isn't just about having the right tools/resources/experience, but also actually using them creatively. As such, programming in general is often about finding an approach to the problem that isn't the most blatantly obvious or expected but produces results more efficient in terms of computer of development time.

To not make it all look like a rant or a opinion piece, the rest of this post is about creative use of tools - particularly, making the aforementioned Tetris in GameMaker without a single line of code or variable.

Continue reading

Few notes on SolidFiles

SolidFiles: File hosting without the bullshit.
— company motto. TL;DR: more like, with some bullshit.

For a while now I spend my time correcting old links to my examples hosted on SolidFiles whenever I spot one. Mostly they are on forums or my blog and I can correct them relatively easily. Sometimes I cannot edit them and they just stay like that.

Since it's no fun, and I do get complaints about leftover links somewhere every now and then, I've thought that I may as well make a small post highlighting my concerns.

Continue reading

Introducing: BitFontReader

BitFontReader screenshot

Let's talk about the process of making pixel fonts for a bit.

At first, it may seem like pixel/bitmap making fonts should be an easy process. After all, there were lots of pixel fonts back in the day, right? Although those were primarily raster FON files, while vast majority of modern programs require you to supply fonts in either TrueType (TTF) or OpenType (OTF) formats, both of which generally imply vector-based representations of glyphs (symbols).

Obviously, drawing a pixel font in a vector editor is as bad of an idea as it sounds.
Fortunately, there's a bunch (more like a couple) of programs specifically made for creating pixel fonts. However, these naturally imply that you will have to [re-]draw your font in the program itself, regardless of whether the program is to your tastes or not.

At this point one may be wondering, why isn't it possible to just draw the font in the pixelart editor of your choice and have it automagically converted into an actual font.
After thinking about this for some time (while trying to find "right-looking" fonts), my patience kind of ran out, and I've decided to make such a thing.

So I've made a program that does just that - you give it an image of your font, note the letters/symbols written in it, and get a code that you can import into BitFontMaker2 to make it into an actual font. It's small, clean, and runs right in the browser. Sounds good to be true? See for yourself:

Launch BitFontReader

(note: if the program does not load, change HTTPS in the URL to HTTP)

Hosting HTML5 games on Google Drive

Hosting HTML5 games on Google Drive for free

Being able to quickly upload a HTML5 game to the web is important.

It's not just a more comfortable format for sharing, but sometimes a requirement, since games created with GameMaker: Studio, Construct 2, Haxe+OpenFL and many other tools may not necessarily fully function when launched locally due to browsers laying restrictions over local file access (meaning that sending a ZIP with game files may not quite work).

While it used to be possible to host HTML5 games on Dropbox for free (or, rather, it still is possible, but only if you have enabled the public folder before the late 2013, else it'll cost you some), you can still host HTML5 games freely on Google Drive.

And this article explains the process of hosting your games on Google Drive in detail.

Continue reading