# Visual Basic > Games and Graphics Programming > Game Demos >  C++: Asteroids

## Halsafar

The sticky that was set up a few weeks ago gave me a project.  It took me 12 days of relaxed work to produce a nice remake of the old Asteroids game.

As of now only the game is available with both a Debug and Release compile.  Once I get some feed back and fix the few known bugs I will release the full source code in its whole.

Please go visit the website at:
Dark Angles 

Go Download the game at (Only a 1Mb Download)

Asteroids - Final Mission 0.80


READ THE README.TXT in the ZIP file.
It contains all you need to know about the game.  Including controls, gameplay, and requirements.

Please post all your comments, bugs.  Ignore the framerate in the corner on Debug compile, it means nothing.  It should always be around 30.  :Frown: 

I also notice how the URL and Website name do not match, that spelling error will be fixed.

Enjoy the screeny.

Edit: On WinXp running Release compile the fullscreen/windowed option buttons will cause a crash for some reason.  I also do not suggest running in windowed mode at all.

----------


## Pino

Nice job, no bugs here ran nicley on

2.6ghz pentium 4
128 Geeforce fx 5200
Win xp sp2

got to level 5

----------


## Halsafar

Nice work  :Smilie: 
Enjoy the feel?
Did the look, graphics, sfx all go together?

The highest I can get is Level 11.

----------


## Pino

> Nice work 
> Enjoy the feel?
> Did the look, graphics, sfx all go together?
> 
> The highest I can get is Level 11.


asteroid gfx are nice, was this direct x 9? they look 3d  :Wink: , i suppose if i'm picky the ship gfx could be better. But apart from that it was fun.

I only just realised you can move lol.

Anyhows its good, c++?

----------


## Halsafar

I said READ The README!

Anyhow.

C++ Dx7 using D3D Immediate Mode, DInput, DSound, FMOD Music.

----------


## Electroman

I've moved this thread to the Demos area and added your contribution to the Stick in the Games Section  :Smilie: .

----------


## Halsafar

Did you try it yet?

----------


## Electroman

> Did you try it yet?


Was just trying it there now, really really good. I think if anything I would suggest more than 5 bullets at a time but it by no means spoiled the game having just 5.

You could also have a check so when you come back to life it doesn't place you on an astroid, it killed me right at the start  :Frown: .....You could to this by having invaulnrability for the first 5 seconds or something.  :Smilie:

----------


## Halsafar

Well when it starts. due to how I quickly implimented the death effect, it starts by showing it...You didn't actually die.

There are sphere to sphere checks to prevent an asteroid from spawning on you but now and then they fail due to being outside the sphere but in the AABB.

But, yes that needs to be perfected.

Thanks for the input.

Do you remember in original asteroids how many bullets you could have max????

----------


## Electroman

Think it was 10 but they were quite a bit smaller and didn't move as fast too  :Smilie: .

EDIT: its also an idea to not limit the amount of bullets but just put  adelay on the shooting so they can only be fired at a certain max rate. but the way you have it is probbaly better than limiting the rate of fire.

----------


## Halsafar

You know I still need to find a way to play the old Asteroids game or find someone who can so I can find how it originally worked.  The old unit used to be at the arcade down the street but it left a few years ago...

I am pushing hard to impliment simultanious 2player, 4 different ships and maybe a power-up or 2 -- plus a between level effect, and various random effects during levels.  All stuff I can do really fast, given the engine I built for these particular games.

In fact, I am going to possibly remake an array of those games on the sticky using the same engine, given a few upgrades now that its been used I have found some code which backs you into a hard spot.  Plus my reliance on extern was a little hefty this time round.

But, for anyone who is still reading this, please inform me of how the original asteroids played, compare it mine as I was basing the feel off memory.

Thanks.

----------


## dglienna

I'm pretty sure my buddy still has his.  He bought it from a bar about 10 years ago, and it's built into the wall in his basement.  I'll call him and find out.
Better yet, I'll download it at his house, and let him play it! I should go there in the next week or so.

What do you need to know in the meantime ?

----------


## Halsafar

How shootings work? max shots? or time rated shots.
Do the asteroids break up the same everytime? depending on how the bullet hits it? completly random?

----------


## dglienna

I'll ask him, but it'd be better if I saw it myself.  I'll see what I can do

----------


## Electroman

> How shootings work? max shots? or time rated shots.
> Do the asteroids break up the same everytime? depending on how the bullet hits it? completly random?


Breaking up is random on the classic version. but they were also just outlined blobs then. I like how yours are 3D models though, so if you create a load of other slightly different ones you could get the same effect quite easily  :Big Grin: .

----------


## Halsafar

2 PLAYER SUPPORT IS UP.  Give it a shot, it is rather fun.  Let me know.
 Click here 
or
Use the links in the first post of this thread. (make sure you refresh the page, mine never seems to auto refresh itself ever)

Read the readme as many changes have been made since the last release.
The source code is almost ready for release as well.


Agreed Electroman, at first that is the path I was going to head out on.  But to save some time I just used a very poorly tesselated sphere  :Smilie:  looks quite like an Asteroid eh.  But I would like to see some change in the asteroids.

----------


## Halsafar

The download I set up earlier was messed up, if anyone tried it and found failure...then it was my fault.

It should all be working perfect now.

----------


## wossname

I am inspired!  Do you guys remember an old game called "Darklight Conflict"?

Well, I'm going to try to combine some aspects of that with a full-depth 3d asteroids game!  This will be a tough long-term assignment for me to practice on.

*excited*

----------


## Halsafar

My original idea was to do 3D asteroids...and in fact the engine I built for asteroids is using a Quaternion based camera with an easy follow update ready for movement in the 3D dimension, all the math is done as if it was in 3D I just took away the users ability to move in the z-depth.  Even the collision detection routines are built and testing in 3D.

You may be interested to look at my source code when I post it.  

I also found a homebrew game called 3D Asteroids, the source included.  I cannot find the bookmark, I never tried it either but the screen shots looked very nice.

----------

