I am developing this small game engine for my son Sven.
The program is written in C# and you will need the .net 2 runtime and direct x installed.
Have a look at the Google Group that I have set up for this project. I will post any announcements there (updates).
You can post any questions and suggestions there if you want.
I have added another page with a todo list and a small collection of interesting links here.
23.10.2008
The main change of this version is that the enemies are shooting at Gustav, even if they can't see him. There is lots of work to be done on the
AI engine, but I made a start.
I have started a sprite engine that should improve the looks. The only problem is that I want to make my own sprites, therefore it is not going to
be overly pretty.
19.10.2008
I implemented sound using directx. This means you must have direct x installed. Further for the managed direct x version I added two dlls:
Microsoft.DirectX.dll
Microsoft.DirectX.DirectSound.dll
You need them in working directory unless you have the directx managed version installed. Yes the sound itself needs some work too.
Next I implemented mouse aiming and shooting. This solves my jump left and shoot bug since now the left mouse button is used to shoot.
The aiming does not look very good at the moment and one can still shoot oneself when jumping around to much.
Further the level manager has a save button. This lets you save the current level in its current state. This still has some minor bugs.
I am continuing working on a better physics engine.
16.10.2008
I have implemented the level manager. It saves levels in xml format in the levels directory, which it will create if it doesn't exit.
Now everybody can create their own levels.You only have to copy your level xml file into the levels directory. Best to start with a
copy of one of the demo levels.
13.10.2008
I made a few improvements with regard to the timers used for the game engine and the interface. Both are now
driven by the multimedia timer in winMM.dll. This makes much faster timing possible and is more accurate.
The game engine should run at about 330Hz while the interface should update at about 100Hz.
Most notable the status of the timing and other info is now displayed in an extra form.
I now build against .net 2 which should make it more compatible. I don't really need any .net 3.5 features.
12.10.2008
I will keep on improving this game engine.
So far you can move around on foot, jump and shoot.
For the moment it is not much to look at.
The enemies don't do anything. There is still a bug that gets you stuck on walls.
No sound and dead enemies show as small red boxes.
If anybody wants a .net 2 version let me know. It should run in mono but I haven't tested it.
So far there is:
left arrow and right arrow for movement.
up arrow for jump
mouse for aiming and
left mouse button for shooting
Before 19.10.2008 release
left arrow and right arrow for movement.
up arrow for jump
space for shoot
Player sticks on walls, when movement button held down, rather then falling down.
When jumping left the shooting does not work. This is a odd one, see below.
Jumping left and shooting bug
13.10.2008 Update:
This bug only seems to happen on some computers. I suspect it is a problem with how keyboards mask
the data. I might just shift the shooting to ctrl.
12.10.2008
This works when using the arrow keys on the num pad.
I am overriding the OnKeyDown method of the form. When printing out the pressed keys into a status window
I can see that if I hold down the left arrow and the up arrow that blocks the space key from triggering anything.
This is not true for any other key that I tried during holding down left arrow and up arrow keys. Seems to be a genuine bug.
Does anybody have a solution for this? Please send me an email.
This is a tiny sample code that demonstrates the error. Just start a windows form application and make the changes below.
If you now hold down the left arrow you will see the word left appear in the form (and a integer). While holding down the left arrow
press the space bar. The word space will appear. This means the key down event was fired. Now if you hold the left and the up
arrow buttons down and the press the space bar, this does not happen. Any solution?
using System.Windows.Forms;
namespace BugTest
{
public partial class Form1 : Form
{
private Label label1;
public Form1()
{
InitializeComponent();
label1 = new Label();
Controls.Add(label1);
}
protected override void OnKeyDown(KeyEventArgs e)
{
label1.Text = e.KeyCode + " " + e.KeyValue;
base.OnKeyDown(e);
}
}
}
12.10.2008
Initial release on this page.
13.10.2008
Much improved update speed and status displayed in separate form. Now only .net 2 required.
16.10.2008
The main change is the addition of a Level manager. A levels directory will be created and the levels are saved in there.
The level files are in xml format. Therefore you can copy one of the demo levels and change it to what you want.
16.10.2008 FEATURE Done 16.10.2008 Save and load levels to/from xml files.
16.10.2008 FEATURE Done 16.10.2008 Level manager.
16.10.2008 FEATURE Done 16.10.2008 Level status.
16.10.2008 FEATURE Done 16.10.2008 Change project name to Gustav's Adventures.
19.10.2008
19.10.2008 FEATURE Done 19.10.2008 Save current level to file.
19.10.2008 FEATURE Done 19.10.2008 Mouse aiming and shooting (not only left right) (initial version).
18.10.2008 FEATURE Done 18.10.2008 Sound.
16.10.2008 FEATURE Done 17.10.2008 Docking windows.
16.10.2008 BUGFIX Done 16.10.2008 Players sinking in at the bottom.
16.10.2008 FEATURE Done 16.10.2008 Save and load levels to/from xml files.
23.10.2008
22.10.2008 BUGFIX Done 22.10.2008 Mouse aiming should face the player in the aiming direction.
16.10.2008 FEATURE Done 22.10.2008 Initial Enemy AI framework (so far only shoot at Gustav).
16.10.2008 IMPROVEMENT Done 21.10.2008 Create gun (weapon) object.
19.10.2008 IMPROVEMENT Done 21.10.2008 Improve Mouse aiming.
21.10.2008 BUGFIX Done 21.10.2008 When loading saved level the weapon does not work properly.
21.10.2008 FEATURE Done 21.10.2008 Added max time and intervall max time status information.
20.10.2008 FEATURE Done 20.10.2008 Bullets start outside the player with a slightly bigger support.
For any suggestions or request you can email me at:
or goto the Google group:
http://groups.google.com/group/gustavs-adventures
You can download the latest version below. It is a zipped executable. Remember that it needs the .net 2 runtime and directX installed. Make sure you get the latest version.