Asteroids!

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
roninmagus
Posts: 91
Joined: Fri Oct 31, 2003 5:03 am

Asteroids!

Post by roninmagus »

Hey guys.. I've been working for a while on a simple clone of the old asteroids games, one of my favorite games every. Well, I've got it completed.. I've very happy with it! It uses Irrlicht & Dusty Engine. The source code is included (though it is not cleaned up or commented.. reader beware!) :)

Image

Check it out at:
http://www.daveandrews.org/dustyengine/ ... dsGame.zip

It is also available from my downloads page:
http://www.daveandrews.org/dustyengine/downloads.php

What do you think? What level can you reach!
daveandrews.org - A Christian Programmer's Weblog | Dusty Engine - A Task Engine for Irrlicht
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Hi Dave,

I've spent the last 30 mins looking at your work.

Great job.

Yeah thats about all I can say without offending people.

Peace out...
Ronin
Posts: 116
Joined: Wed Mar 03, 2004 6:23 pm
Location: Germany

Post by Ronin »

Made it to lvl 6 in first attempt, then it got quite hard...

Nice game, makes fun to play, choosing resolution at startup would be cool though.

Ronin
YASS - Yet Another Space Shooter - www.yass-engine.de
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Nice! One of my favorite gametype.
Great job, I'm only missing sound & music :)
roninmagus
Posts: 91
Joined: Fri Oct 31, 2003 5:03 am

Post by roninmagus »

niko wrote:Nice! One of my favorite gametype.
Great job, I'm only missing sound & music :)
Thank you much Niko :) Irrlicht is an awesome engine.

I had only 2 problems that seemed to be caused by bugs in Irrlicht. Maybe they were my own fault, I'm not sure.

1) The camera is orthographic in this game. While I was programming I tried to test my asteroid destruction code using the mouse and the collisionManager->getSceneNodeFromScreenCoordinatesBB() function, but it seemed to not work correctly. The area in which it would work seemed confined to a small area in the middle of the screen, if I clicked on a node near the edges, it did not locate it correctly. I have not delved into the code, but I think it has something to do with the orthographic projection I was using, maybe that function is designed for perspective projection?

2) Even using Irrlicht 0.9, I had to move the ITextSceneNode.h file into the include directory, and then manually #include <ITextSceneNode.h> in the file that was going to use the text scene node.
daveandrews.org - A Christian Programmer's Weblog | Dusty Engine - A Task Engine for Irrlicht
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

roninmagus wrote:1) The camera is orthographic in this game. While I was programming I tried to test my asteroid destruction code using the mouse and the collisionManager->getSceneNodeFromScreenCoordinatesBB() function, but it seemed to not work correctly. The area in which it would work seemed confined to a small area in the middle of the screen, if I clicked on a node near the edges, it did not locate it correctly. I have not delved into the code, but I think it has something to do with the orthographic projection I was using, maybe that function is designed for perspective projection?
This is a known issue, I posted a fix for it here:

http://irrlicht.sourceforge.net/phpBB2/ ... php?t=6243

Btw. I wasn't able to execute your program. It exits silently right after loading the background.
It is like it is. And because it is like it is, things are like they are.
roninmagus
Posts: 91
Joined: Fri Oct 31, 2003 5:03 am

Post by roninmagus »

jox wrote: Btw. I wasn't able to execute your program. It exits silently right after loading the background.
I have uploaded a fix for this problem. I was unable to run the program at work also. Turned out it was because my background texture was not power of 2 in width and height. Download the fix from the same URL as above.

Also, I removed some extra weight from the media directory, so it's a slightly smaller download now.
daveandrews.org - A Christian Programmer's Weblog | Dusty Engine - A Task Engine for Irrlicht
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

physics...

Post by buhatkj »

neat game, but one things seems to be missing...
I always thought that in asteroids the ship would slow down and stop eventually if you let off the thruster. You could probably make this really simply with just a timer that reduces the speed...but you could ALSO do it with friction in a physics package ;-)
Just a thought.
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
roninmagus
Posts: 91
Joined: Fri Oct 31, 2003 5:03 am

Update!

Post by roninmagus »

I've placed a brand new version of the Asteroids game up for download on my website. It has several changes, there is now a theme song and sound effects by my friend Alan Moore, particle effects for explosions, and the thruster thing mentioned above.

You now hold down the up arrow and your ship will begin to thrust forward, then you let off the up arrow and your ship will begin to slow down. There is a thruster sound that plays as well :)

The sound is all done with Ogg Vorbis, which is the future in my opinion :)

Check it out!

http://www.daveandrews.org/dustyengine/downloads.php
daveandrews.org - A Christian Programmer's Weblog | Dusty Engine - A Task Engine for Irrlicht
kburkhart84
Posts: 277
Joined: Thu Dec 15, 2005 6:11 pm

Post by kburkhart84 »

I too have made an asteroids clone without Irrlicht and now am redoing it with Irrlicht. I think in the original asteroids, you didn't slow down once you thrusted, rather you had to thrust in the opposite direction. That is how I made mine. I think it just makes it a little bit harder, but more funt o play that way.
Post Reply