Nuclear Throne Together v9838 – beam crossing, spectating, and other things

I've released my online multiplayer mod for Nuclear Throne just a bit over two weeks ago. That was interesting. I had since received a plenty of feedback, bug reports, and feature requests. Today I've released what can be considered a major public update, and this is a small average-sized post about interesting things in it.

Continue reading

GameMaker: Using external version control

Over time, I have witnessed a particular scenario a few too many times:

  1. A person demonstrates complete unwillingness to learn how to use version control, be that due to "lack of need" or delightful claims of their existing approaches (which most often turn out to be manual backups) being sufficient or even superior.
  2. A person loses days, weeks, or even months of work due to human error and/or hardware failure(s).
  3. Noticeably bitter about the situation, a person attempts to continue defending their position.

Having spent far too much time arguing with people and explaining how to use version control, I have decided to make a blog post that would cover a few things on the matter:

  • Explain the advantages of version control over "simpler" backups.
  • Explain (step-by-step) the basics of using a common combination for version control being BitBucket (service) + Git (software) + SourceTree (GUI client).

While this tutorial is oriented on GameMaker: Studio users, it can also be easily applied for other tools.

Continue reading

Understanding isometric grids

Isometric grid coordinate conversion demo
A GIF of the interactive demo seen later in this post.

Questions about the algorithms related to isometric grids are not uncommon. In fact, they are a little more common than you could expect them to be, given the relative simplicity of things.

So I have decided to write a little blog post on the two things important here:

  1. Converting local isometric grid' coordinates to global screen-space coordinates
  2. Converting global/screen-space coordinates to isometric grid' local coordinates
Continue reading

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

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

GameMaker: trace/log function

A scribble reads "trace(x,y)"

Debugging games can be fun! Or not fun. Depends on what your definition of "fun" is.

Either way, starting with GameMaker: Studio, GameMaker has a proper debugger with breakpoints, step-by-step execution, watches, profiling, and other conveniences.

There is also an Output panel, to which you can write messages using show_debug_message. This can be preferable if you need to inspect order of execution or are in a hurry - after all, throwing a quick look on the panel is fast. You know what's not fast though? Using show_debug_message to do so.

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

Alternatively, file' contents (to be saved as gm8x.col and imported into GMS):

<Colours>
  <Color0>0</Color0>
  <Color1>8388608</Color1>
  <Color2>16711680</Color2>
  <Color3>32768</Color3>
  <Color4>128</Color4>
  <Color5>128</Color5>
  <Color6>128</Color6>
  <Color7>8388736</Color7>
  <Color8>11171870</Color8>
  <Color9>16777215</Color9>
  <Color10>14744314</Color10>
  <Color11>10512464</Color11>
  <Color12>5988454</Color12>
  <Color13>16120058</Color13>
  <Color14>255</Color14>
  <Color15>2633011</Color15>
  <Color16>11913437</Color16>
</Colours>

Have fun!