February 12, 2012
The 2nd magi48h compo is over

This time the themes were “vegetarian zombies” and “war”. I made a small RPG-like game with the OpenTK framework and C# using OpenGL and OpenAL for graphics and sound.

My entry is called Zombieland

It’s an oldschool 2D game, I did not want to deal with 3D graphics and pixel art is something I’m just more familiar with.

Instead of explaining how to play here, take a look at the instructions that you can also read when you select “About” in the main menu:

There are enough features in the game to make it playable, but I could not finish the dungeons anymore. Because all levels are randomly generated it’s easy to create a lot of content, but creating the algorithms to generate levels is a lot of work.

Even now there are some bugs left in the generator for the main world. Sometimes roads are not connected properly and you get this kind of strange roads:

In this program I use a simplex noise generator which is a bit faster than perlin noise. It does not really matter, because worlds only need to be generated when you start a new level, but I had the algorithm in the framework, so I used it.

It generates a level like this:

After the basic layout is generated I randomly place all kinds of buildings in the world and connect them all with roads.

When you die, you will see a score. Let me know if you beat mine :)

I guess it was a mistake to fight about 40 zombies at once…

The game can be downloaded here and the soucecode is also available here.

6:34pm  |   URL: http://tmblr.co/ZabSBwGIr33c
  
Filed under: magi48h gamedev 
February 7, 2012
Another magi48h competition

I’ll make another game in less than 48h next weekend. This time I’ll use the new OpenTK based framework that I created for this very purpose and I hope it will allow me to focus more on content and less on technology.

If everything works as expected, we will decide if we should make this rather small competition more open in the future. It would be fun to have more people and games in the competition, but on the other hand we do not intend to compete with LD48 or other similar events.

Basically this is just for fun, if more people ask me if they can participate, I’ll not send them away. But I don’t think that we have the experience and tools to deal with too many people at once.

If you are interested in more details about magi48h, contact me on twitter or join one of the MCP channels on IRC.

12:39pm  |   URL: http://tmblr.co/ZabSBwG1a5xl
Filed under: magi48h gamedev 
January 14, 2012
OpenTK

I’m currently creating a framework for a game, based on OpenTK. If you don’t know it, OpenTK allows you to use OpenGL and OpenAL from C#.

It’s actually very easy to use, in just a few hours I got 2D rendering, font rendering, sound playback and keyboard input handling done. I’ll probably add some more features to the framework, but it should also be small and simple.

This new framework will be used in the next magi48h competition. I’ll make it available for everyone before the competition starts, so that everyone can decide to use it and I do not have an unfair advantage over participants who do not have something similar that they could use.

I was first considering to use XNA, but it has some disadvantages for me. The main problem with XNA 4.0 is that a lot of functionality I used in the past is not easily available anymore and you are basically forced to use the content pipeline.

OpenTK is much better suited for my needs. I do not really need to support XBox360 or Window Phone 7 at the moment, but I want my program to run on Linux and OSX. I have made a compatible game before, but it used WinForms, so it was slower and did not provide a good way to play back sound.

I can use OpenGL now to draw hardware-accelerated 2D graphics and using OpenAL to play sound is really painless. It will also be possible to add some 3D rendering without much hassle in the future.

My framework will eventually be released with full source code, either with the first magi48h game I create with it, or independently on a public repository. I’ll decide how to release it later, when it’s “done”.

4:47pm  |   URL: http://tmblr.co/ZabSBwElVs_a
  
Filed under: gamedev magi48h 
January 12, 2012
Elsewhere

Last weekend, starting from friday 8pm to sunday 8pm, we were doing our own small private competition to make a game in less than 48h. All participants missed the last LD48 and so we decided to make our own competition, just for fun.

The themes were “supernatural” & “parallel universe”, this is my entry:

The game was created from scratch with VS2010 for the code and Paint.net to draw the graphics. I also used bfxr to make some sound effects, but only 3 or 4 of them made it in the game because sound playback was not working properly.

I decided to make the game in C# and set up some limitations. It only uses Winforms and the .NET framework (version 2.0). That’s also the reason why sound was not working as expected, the SoundPlayer class is the worst I’ve ever seen and I expected more from the .NET framework.

Basically the screen is just an 320x240 array of integers, each one representing one pixel on the screen. The value of the integer encodes the RGB values of the color.

The graphics are created with 8 shades of grey (from black to white). Each object can have it’s own palette of 8 colors, so that the game will not be gray scale, but colored instead.

I decided to create isometric tiles for the level graphics, in retrospect it was a bad decision because making those tiles was too time consuming.

Another decision was to use a bitmap to design the levels with Paint.net and this was also not working too well, because I had to use a 2D image to describe a (kind of) 3D level.

In the end I could only make 2 dimensions (levels) before I ran out of time. I had used the first half of my time budget to get the basic technology running before I could start creating actual game content.

For the next competition I will not use the same limitations. I was thinking to use XNA, but now finally decided that OpenTK will be the better library to use. I should be able to get some graphics on the screen with OpenGL quickly and using OpenAL to play sound will definitely work much better than the SoundPlayer class in the .NET framework.

It will still be a 2D game, but with OpenGL it’s really easy to render some textured quads. Hopefully next time I will be able to put more time into creating actual game content and less into getting the base technology done.

Downloads: Game & Source

After the competition I still work a bit on the game to improve it, first update is here: Update1

3:03pm  |   URL: http://tmblr.co/ZabSBwEf6J3E
  
Filed under: elsewhere magi48h gamedev 
Liked posts on Tumblr: More liked posts »