Prince of Persia’s Parallel Projection

Prince of Persia (1989) uses oblique projection – the same as is used for furniture diagrams – to give a sense of depth to an otherwise flat 2D platformer.


The problem is that oblique projection, while it gives an intuitive depiction of objects, is not really physically possible, for say a camera.

To do any kind of realistic lighting of a game in this perspective, we need to understand how the light rays are received by the camera.

Read more Prince of Persia’s Parallel Projection

Converting a GameMaker: Studio project to MonoGame (Part 3)

In Part 2 we wrote the Room class including the loader. Of course, I made a mistake in the code I hadn’t tested.
This line:

should be

I thought it checked the current namespace by default, clearly I was wrong.

Today, we’re going to write the code to draw and update objects, and we’ll start to implement the player object.

Read more Converting a GameMaker: Studio project to MonoGame (Part 3)

Converting a GameMaker: Studio project to MonoGame (Part 2)

In Part 1 we set up the solution for our game.

One thing I forgot to mention was that after importing, that too needs to have its Copy to Output Directory property set to “Copy if newer”.

Now let’s write some code.

Read more Converting a GameMaker: Studio project to MonoGame (Part 2)

Converting a GameMaker: Studio project to MonoGame (Part 1)

I recently changed from using GM:S for a game I’m working on to using MonoGame. There are a few good reasons for doing this, mainly to do with low-level control, and some performance improvements. There are many good reasons not to do this. A few that spring to mind are:

  • You use GM:S for the drag-and-drop coding
  • You’re not familiar with object-oriented programming but are happy using GML
  • You like the large and active community of GM:S
  • You use some of the advanced features of GM:S, like In App Purchases or Advertising
  • (Perhaps most importantly) Everything is fine as it is in GM:S

With all that said, MonoGame is a great cross-platform library, and for much of what you’d want to do there is an easy one-to-one conversion into C# with MonoGame.

Things which will be more difficult to convert include Time Lines and Texture Pages. I shan’t go into much detail on these, but be aware for the latter that your performance could be significantly worse if you use lots of individual sprite files rather than unified sprite atlases.

I’m going to talk through a conversion process for the Tile Based Platformer project which comes with GM:S. Hopefully for other simple projects the conversion is just as easy.

Read more Converting a GameMaker: Studio project to MonoGame (Part 1)

Which tool to make games with or: How I learned to stop worrying and love managed code

I think I’m at a point now where I can usefully discuss the problem of choosing the basis on which to develop a game. This summer I’ve been working on games in Unity, and in my spare time I’ve been using GameMaker: Studio. I also have several years of experience with XNA and raw DirectX and recently, MonoGame.

I started writing games in Flash a decade ago now, but desperately wanted to make 3D games. Back then, all 3D games were written in C++ or C. In fact, my first ever exposure to a full sized game’s code was the GPLed Quake II, which I modded. I assumed that it was only possible to make large games in native code, and perhaps it was even true then.

It took a while after this for it to dawn on me that for 2D games, one doesn’t need native efficiency at all, and if a game is running slowly it’s probably bad design than the tool you’re using.

This summer especially using C# with Unity, I was surprised at how efficiently I could run quite complicated games. Even on a low-end laptop, I was seeing a solid 60 fps on anything I wrote, as long as I put a bit of thought into how it would execute.

Separately, in the evenings, I’ve been working on a game with GameMaker: Studio. This was inspired mostly by the discovery that a lot of my favourite 2D games were written in GMS and a sudden desire to create 2D games from start to end. I suspect I will continue to use GMS for Ludum Dares.

However, GMS has some issues, after which I converted my game to MonoGame. I’ll go into more detail on that in a future post.

So, allow me to weigh up the pros and cons of various different game development tools. All this assumes comfort in switching between imperative languages.

Read more Which tool to make games with or: How I learned to stop worrying and love managed code

Rain Effect in GameMaker: Studio

For my LD33 entry Hue and Cry I wanted a rain effect to add atmosphere. I tried various things with particles and objects. This is what I came up with in the end:

Rain effect in Hue and Cry

It really does look a lot better in-game, promise!

I’ve followed all the steps to make an example project:

Here’s how to recreate it.

Read more Rain Effect in GameMaker: Studio