Top-down bouncing loot effects

GIF
In action

A little while ago, I was asked about what would be a good approach to creating an effect for a top-down game where coins would fly out of a smashed object. Not recalling any tutorials on the matter, I've made an example of this exact thing, and this is a post detailing everything related to such an effect.

Continue reading

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

On GameMaker: Studio’ game decompilation

On GameMaker: Studio' game decompilation

It seems that questions about whether (and if so, to what extent) GameMaker: Studio games can be decompiled are being asked at a constant pace, and yet there are still no resources to clear up these questions. So I've decided to make a small post on the matter.

If you are not familiar with what is this all about: older versions of GameMaker had produced executables that could be reversed into an editable file with a help of a program ("decompiler"). Such unpleasant turn of events was made possible because:

  1. Game data was more or less just appended to the end of a "runtime" executable
  2. Source code was inserted into data as text, with code structure and comments intact.

So a program would "read" the appropriate sections of the executable, extract game data, and repack it into an editable file, permitting various acitivities, most of which would violate EULA.

To mention, a lot of Lua-based game engines also suffer from this kind of problem, and it is generally solved by obfuscating source code and altering the executable structure (in GM's case, with a so-called "anti-decompiler") for the "decompiler" to not even be able to extract the obscured game data as easily.

So it's a valid thing to wonder about how much of this still applies to GameMaker: Studio...

Continue reading

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

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

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

GameMaker: GM8 code editor color scheme for Studio

If you are using GameMaker: Studio and find default dark theme to be odd, you probably have already switched to lighter "GM8" theme via File - Preferences dialogue.

But, alas, switching to "GM8" theme does not change code editor color scheme, and you still get the default dark gray-orange theme in middle of your light-colored IDE.

So I thought that it would make sense to publish a GM8-esque color scheme that I've made and am using locally for a while now.

This color scheme follows GM8 style closely, with few exceptions like displaying resource names in teal instead of yellow (which grants higher contrast and generally looks better).

To import a color scheme, go to File - Preferences - Scripts and Code, click Import button, and pick the obtained file.

It is hard to make a large post about thing as small, so here's the file:

Download COL

Have fun!