Tick Tock Car Race and source code – Windows

So here is what I put together for the SDLTutorials.com car contest. Its pre compiled for windows but includes the sorce code so you should be able to get it going on any other platform with SDL support. Its a bit of a mess but its functional and complete. Its looking like the deadline will likely be extended so I might go back and fix it up and add some better commenting.

Either way I’ll port it to Wii sooner or later. Probably later rather then sooner though. I want to do a quick port/remake of Don’t Get Crushed for PS3, then I want to get the demo for The Prophecy complete which I have been repeatedly intending to do and then delaying, finally I really want to finish some things in Cubicle Shooter and by the time I finally finish those three things I’ll probably have seen something shiny to spend a decade chasing. Yay procrastination.

The music used in the game is Tarmac by et_.

Download the Windows version and source code
Alternate links

dot TOIF (that other image format)

I was having some trouble with image loading on PS3 so I wrote a simple program using SDL to convert PNG files into something easier to work with.

To use it just place the file you want to convert into the same folder as PNGtoTOIF.exe, rename the file to image.png, then run PNGtoTOIF.exe and it should generate a image.toif file based on it.

The first line in the resulting file is the image width, second is image height, next is the red then green then blue then alpha values for each pixel. Each variable is stored as human readable text. The files are incredibly bloated (it makes uncompressed BMPs seem tiny) but its a functional solution and was easy to make.

Its worth noting that Cubicle Shooter v0.3 (which is what this was primarily made for) is hard coded to only load a 64×64 image to use as its texture for the cubicle dwelling NPCs. So you will probably run into problems if you try to just replace that texture with a differently sized one. I’ve already fixed up the toif texture loading function though and it will be part of the games next update.

Download the Windows version
Alternate links

Download the Source Code
Alternate links

To compete or not to compete– that is the question

Just prior to turning my focus to PS3 homebrew I was working on, among other things, a 2D racing game made with SDL. I was making it for the latest contest going on at sdltutorials.com.

It has some kinda cool stuff in it. There are destructible walls, a camera that rotates and zooms in real time (keep in mind that its a truly 2D game and doesn’t use OpenGL or in any way involve mapping things onto hardware accelerated polygons), sprite based text that isn’t mono space (a super simple thing but still something that I’ve never done before) and some old school style motion blur.

But now the contest is reaching its conclusion and I don’t know what I should do. I can definitely get the game done in time. Perhaps not with AI controller cars to compete against but definitely as a time trial style racing game. Except I’m having doubts about whether or not I should submit it.

The Pros:
I could potentially receive $20 USD in a pay pal account.
Once the game is finished I could easily and quickly port it over to Wii which I’ve been feeling bad about abandoning for PS3.

The Cons
Feeling like a jerk. I still consider myself to be a noob and I did even learn some things that I didn’t know yet from their recent post about Alpha-blending in SDL. But I have actually been making games for a while now (one person on psx-scene referred to me as being prolific in the Wii homebrew community which I found amusing largely because the term prolific doesn’t actually imply anything about quality) and I havent actually been following the tutorials at sdltutorials.com (most of what I’ve learned has been from trial and error and random pages found on google and only viewed once). It never actually says in the rules that you need to have learned this much from this site or that this must be one of if not the first game you’ve developed. But its implied or at the least I perceived it to be.

UFO Racer – Wii

I started working on a racing game. I’m borrowing graphics for it from an older game I made for PC over 9000 years ago but I’m programing it again from scratch and this time its going to be 2D with a top down perspective and made for Wii.

The steering is controlled by tilting the wiimote (just like you do for Excite Truck or Mario Kart). I’ve never done anything using the accelerometer before but it was actually really easy to implement and already works fairly well although I’ll probable tweak to turning speed later. You hold down the 2 button to move forward.

Another thing that’s somewhat new to me are the rotating sprites. The rotation of the ship is pre rendered but the track is actually rotated in real time. SDL (my primary game development library of choice) sadly doesn’t actually have any built in support for rotating surfaces but luckily there is nothing that cant be accomplished with a few get/put pixel functions and a little bit of math. It will never be as fast as it would be if it was done with GRRLIB but it is already running at a tolerable frame rate in the high thirties and I’m hopeful that I’ll be able to get a bit more speed out of it.

Its just a test demo and I don’t really recommend you bother with downloading it yet but I figured I would share what I’ve been doing.


Download Links for Wii version

TheyDoNotDie R15

You can shoot again. If you shoot a zombie they die. If a zombie gets too far away they are repositioned closer by. The darkness around the border of the screen and the cloud shadows or whatever you want to call is back.When you get too close to a zombie the borders of the screen turn red and the camera zooms in. When you or a zombie is injured blood is dropped. I’ve worked back in on screen text but unlike with the older releases this time text is textured onto polygons so it scales perfectly with the resolution of the screen. I think that is pretty much everything that has changed. Still not as complete as the twelfth release but its getting there.

Download Links for Windows PC version

TheyDoNotDie R14 – Now with zombies and music.. Again!

Its still not as complete as R12 but I’m getting it there.

Rather then running in a 640×480 window it goes full screen now and uses whatever your desktop resolution is. I have the environment rendering properly (still no objects like crates and cars but the tile map is going fine). The roofs of buildings fade in and out of view like they did before. RekcahDam‘s music has made a return. Zombies are back (they are drawn on screen and move towards you). I also have the basics of the box2d stuff working so your movement, the movement of the zombies and all the collision detection (no more walking through walls) is physics based once again.

Without the darkness around the edges of the screen and the cloud shadows everything looks really bright and flat but despite its lack of completion there are already a few ways in which its looking better then R12. I redid some of the sprites (though they aren’t drastically different). I finished fixing the problems of the edges of the textures for map tiles so it shows the full tile right up to the edge without it bleeding over and incorrectly showing edges of unrelated tiles (nobody ever seemed to complain about it but before the switch there would for example at times have lines through roofs of buildings where you could see in when you shouldn’t have been able to). Also as a direct result of switching over to OpenGL there are no longer any problems of overlapping sprites rendering incorrectly (something that I spent forever trying to fix but never could before switching).

Download Links for Windows PC version

Time Frack 2D – now with source code

Alright here is everything you need to compile Time Frack 2D for windows (I even included the Microsoft Visual c++ express project file and some other stuff that you dont really need) and since its using SDL and little else it should be little to no work at all getting it to compile on pretty much any other platform. The Wii and GP2X versions each had some minor changes but where effectively the same. I’ll upload everything I’ve got for them also if anybody want em.

Warnings: Along with the game just being incomplete there is some stuff in there that I am fully aware of being stupidly and inefficiently written that I didn’t get around to fixing. On top of that I’ve never worked with anyone before or even gotten any kind of real commentary on any code I’ve written before so I’m probably doing other things unconventionally or just plain stupidly that I’m not even aware of. Also there isn’t much in terms of comments in the code to explain what things are doing but I dont think its horrible unorganized or dense either so it presumably wont be difficult to read and edit.

Anyways feel free to ask any questions you have or make any kind of requests and I’ll do my best to help. All I ask is that if you post an updated version or lightly modified version or whatever of it somewhere that you mention it and link back here at some point and similarly it would be cool if you posted about it in the comments here so I can see what you’ve done with it.

Download links for source code

Time Frack 2D – still hardly a game

I know it took a lot longer then it should have for such a small update but here it is. I added enemy characters and and you and them can both be pushed around and they disappear if you shoot them. The Wii version and now the PC version also both visually scale up the game nearest neighbor style the same way that Revolt of the Binary Couriers did well the GP2X version still uses the original 320×240 untouched image since that is what the systems screen resolution is anyways. Aside from that its the same.

Controls for PC and GP2X are the same as before and for Wii you hold the controller sideways (NES style) and use the d-pad to move side to side, the 2 button to jump, the one button to shoot and the plus and minus buttons to speed up and slow down time.

I’m not sure when I’m going to work on this again. It is something that I really want to make but I think I’m going to focus on They Do Not Die for now. I know I’m a horrible person and I never end up working on the shit that I say I’m going to do and I should finish this game and blah blah blah but hey that also means that I might end up switching back to working on this sooner then I plan to which is kinda a good thing right?


Download links for GP2X version

Download links for Windows PC version
Download links for Wii version

TheyDoNotDie R13 – Now more incomplete then ever!

Its a well established fact that DirectX users are always the first to get themselves killed and eaten by zombies.

So anyways I’m starting fresh and making the game with SDL and OpenGL. No more DarkGDK or DirectX.

Why this is a good thing:

I’ve never used OpenGL before and new things are interesting things which means that new things are good things. The more interested I am in a project and the more I feel like I’m learning or doing something new then the more likely I am to spend time on that project.

It will be portable. Because it used DirectX and even more so because it was using DirectX through DarkGDK the game was and always would be restricted to being a being a windows only game. That isn’t the case with SDL or OpenGL. Linux and Mac users rejoice. I could end up making it available on pretty much anything.

It will run faster. Its hard to judge by how much right now but DarkGDK isn’t exactly known for being speedy. Better performance means that it will run on even more lower end computer or alternatively will run the same on the same computers with even more zombies and even more stuff going on.

Why this a bad thing:

It will probably take a little time just to get back to the same level of semi complete that I was at previously. Nowhere near as long as it did the first time around though and I will at least be returning to working on it now which I wouldn’t be super interested in doing if I had to continue carrying the baggage of the way it was previously made.

Proof that I have returned to working on it:

Download links for PC version

Time Frack 2D

[youtube=http://www.youtube.com/watch?v=IDO34gl00H8]

So I’m making a 2d platformer / shooter for GP2X with the ability to slow down and rewind time. Its sorta based on that other 3d game/demo/thing I did of the same name (which was a rip off of all the ideas of TimeShift which was in turn just somewhat a product of how cliche and common time controls have become… Hooray for derivative non originality!) minus one visual/spatial dimension. This one should hopefully reach a higher point of completion though and actually be something that can be called a game. Currently its far from done but the basic movement, shooting and time controls are functional. As I said it is being made primarily for GP2X (its actually being made primarily so that I have something to make primarily for GP2X lol) but there is and will be PC versions of it and I’ll probably port it over to Wii at some future point in time.

The HUD/GUI

The bar at the bottom of the screen shows how fast time is progressing. If its to the far right then its moving forward like normal, if its in the center then its paused, if its to the far left then its rewinding at normal speed and if its somewhere in between then obviously its moving at a speed somewhere in between (ie 1/8 between the center and the right side means that time is moving at 1/8 speed). The bar at the top of the screen shows your position on the time line. You cant rewind past when the game began.

GP2X controls

d-pad/joystick – move left or right
X – jump
A – shoot
L – slow down time
R – speed up time
Start/Select – exit the game

PC controls

WASD/arrow keys – move left or right
Space – jump
R – shoot
Q – slow down time
E – speed up time
Just close the window the exit…

Download links for GP2X version
Download links for PC version