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

If you like what I'm doing, you can support me via Patreon (it matters!)

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 social networks, you may already know, that for 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 original game, and, most importantly, adding a 2-player cooperative online game mode.
Today, I am proud to announce first public release of this project.
And this is a blog post about my experiences.

Continue reading

GameMaker: trace/log function

Debugging GameMaker games can be fun. Or not fun. Depends on what your defintion of "fun" is.
Either way, in GameMaker: Studio, a new debugger was added, which you can (and probably should) enable via File - Preferences - "Scripts and Code" - "Use the new Debugger".
That includes a profiler, a step-by-step debugger, and a bunch of other useful things.

But, alas, sometimes, there is no time to explain, no time to write the best code of century, and certainly no time to sit down and stare at variables in watch window. You got to make games fast. And debug fast.

GameMaker: Studio noticeably spots a "console" dock, which is used to display compilation and runtime information, errors, and bunch of other things. But the important part is, that you can also send your own messages into it via show_debug_message. That's nice, since throwing a look at dock is fast. But, you know, what's not fast? Using show_debug_message to do so.

So this post is basically about what I've came up with to improve use of the thing, both for Studio and not.

Continue reading

Haxe: Simplistic .properties parser

If you have ever been using Java, you may already be familiar with .properties file format. This is a simplistic configuration file format, somewhat similar to INI:

# Comment
key = Value

For ones not liking that, there's also alternative syntax:

! Comment
key: Value

Where leading/trailing spaces are optional and are trimmed in parsing process.

Since I've seen people ask about this kind of thing, and also have seen people invent ridiculous (and non-functional) regular expressions to parse this file format, I thought that I may as well make an implementation that works "just right".

Continue reading