objarni's picture

Dogfight 2008

This is my pet-project right now. It's basically going to be a casual head-to-head dogfight game. The motivation for me is to try out C# as a game programming language, specifically in combination with OpenTK.

I've built this game in 2d yearlier - Amiga/AMOS several years ago, c/allegro/dos and C#/Windows.Forms - but never in 3d. The idea is to keep the game mechanics in 2d, while rendering everything in 3d. I will stay at the "solid color polygon" level, no textures, to get the right retro feeling.

If you try it out, beware it's like version 0.01 meaning you may control one of the planes using keys A and D, and use Escape to quit, but not much more right now ;)

I'm releasing it under MIT license at Sourceforge if anyone wants to peek under the hood:


Just unzip and copy OpenTK.dll into it to try it out!

Dogfight2008.zip27.92 KB
2008-03-31.png22.29 KB
Dogfight2008-03-31.zip355.05 KB


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Mincus's picture

Hehe, cool.
Breaks when you crash in to the other plane (seems to keep restarting both planes in the same spot?) or if you go off the top of the screen.
Looks good though.

objarni's picture

Thanks! Yup if you crash into the other plane they just restart at the same spot meaning lives will drain really fast.

When a plane hits the top of the screen, it is supposed to "stall", but it's not implemented yet either.

Inertia's picture

Nice progress compared to what you showed me on IRC, keep it up :)

-What bitdepth is this? 8bpp? Looks like there's some dithering going on, most visible in the dark-green poly at the bottom-right.
-How are the shadows done? Shadow mapping would be overkill, so probably a nice hack? :)

objarni's picture


It's a GLControl, so I don't really now the bitdepth but I believe the default is desktop bpp..? Then it is 32 bit in the above screenshot.

I'm using a GLControl because I know it better, plus I can fix the size of the window then.

The shadow is a color-black re-rendering of the plane model, with an added scale+transform matrix. The scale is simply (1,1,0) which removes the z-coordinates of the model (I've turned around the GL coordinate system a little to fit my mind better). Then I simply translate the vertices to the right z-coordinate (just above ground level). I also turn of depth-buffer-writes, but keep the depth-test, so the shadow does not become "physical". It's cheap I admit :)

teichgraf's picture

I like the retro graphic style.
This brings back some memories of the good old days and my beloved Amiga.

objarni's picture


Wings of Fury was really fun, played it on a 486 first time IIRC.

Sadly the images you presented won't be displayed (maybe modygames does not allow off-site image references..? then you could download them / put them on image shack or something, if mobygames does not claim copyright on the images, that is)

Inertia's picture

Nevermind, the 'dithering' was probably caused by staring at greyscale wireframes for hours before taking a look at dogfight.

Why cheap? The shadows are accurate and noone is going to be able to tell that it's planar shadows, without taking a look at the code. It works and looks convincing, so it's great :)

objarni's picture

OK a little update, attached to original post (Dogfight2008-03-31.zip).


  1. Added second plane. It's a new model (single wing instead of double wing) and it's yellow. Controls: J,L for now.
  2. Collision detection between planes and ground and "top of screen".
  3. There is acceleration/slow down if flying downwards/upwards too.
  4. The planes can get into a "free fall state" which I call Stalling, which can be upheaved by flying almost straight downwards

Speeds, gravity, stalling and other constants still have a lot of tweaking left to feel good enough.

I tried to be a little modern and upload a video to youtube too:


the Fiddler's picture

The control/movement of the planes feels very nice! Add some explosions and it work great for some competitive fun. I'm eager to play the final version. :)

objarni's picture

Thanks! I hope to improve the movements, right now it feels a little too fast and also too easy to regain "flystate" from "stallstate".