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

Adding thousand separators

string_thousands

Often, games and applications may display numbers. Sometimes, large numbers. In some cases, numbers with so many digits that you aren't even sure about most suitable notation.

And that's where use of thousand separators is handy. Since delimiter symbols (normally commas) appear in fewer quantity than digits, they are easier to count, and user can tell the order of magnitude easier.

This post covers detail of doing that, both in algorithm and code.

Continue reading

BitFive: Now with multitouch

This is only a small thing out of everything I need to make/finish/release in next months, but...
So there is now multi-touch support in openfl-bitfive, which is an alternative OpenFL HTML5 backend with focus on blitting and compatibility across platforms.
Usage is identical to Flash/AIR - you add an according event listener to your desired DisplayObject, and handle the TouchEvent objects it catches:

stage.addEventListener(TouchEvent.TOUCH_BEGIN, function(e) {
	trace("Touched at (" + e.stageX + ", " + e.stageY + ")");
});

And, same as it goes for mouse events, the rest is handled behind the scenes - events are routed automatically, and you don't need to worry about browsers and devices with partial or glitchy support.
You can even have your mouse events converted into touch events for ease of testing if you want (see bitfive_mouseTouches flag).

Addition is already live at both repository and haxelib, there's a demo available (probably want to view it from mobile device), and this post contains some extra details on what it took.
Also, if you needed this for some time, you can pretty much thank Ozdy (which is also the largest supporter of backend) for suggesting the feature.

Continue reading

Introducing: Spelunky SD!

If you've been following me on the social networks, you may already know, that for the past three months I was working on a Spelunky Classic modification called Spelunky SD. It is a pretty broad project, implementing a number of fixes and improvements to the original game, and, most importantly, adding a 2-player cooperative online game mode.
Today, I am proud to announce the first public release of this project.
And this is a blog post about my experiences.

Continue reading