IonicWind Software

Aurora Compiler => 3D Graphics => Topic started by: J B Wood (Zumwalt) on November 20, 2006, 12:46:52 PM

Title: space invaders demo
Post by: J B Wood (Zumwalt) on November 20, 2006, 12:46:52 PM
Coming soon, here are prelimary screenshots.
You might ask why is this in 3d graphics, well, this is 2d sprites on the 3d scene.

Download the game via this link:
Flying Invaders - A Space Invaders Clone! (http://www.gamedevonline.com/subsite/demos/demos.htm)

Full basic version to be released probably sometime PM'ish tonight.
Todo:
Sound, player vs invader shots collision test, thats about it.


Game now available for download!
Not the best clone in the world but going through rapid updates to make it even better :)
(http://www.gamedevonline.com/subsite/photo_gallery/images/InvadersDemo.gif)
Title: Re: space invaders demo
Post by: ExMember001 on November 20, 2006, 01:20:43 PM
hehe, look great  ;D
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 20, 2006, 01:29:01 PM
Thanks :) this is a fun project..
Haven't decided if I am going to give the code away for free, but the game will definately be free.

edit:
I think what I will do once it is complete, is send it over to Paul for him to include with the engine for those who own it.
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 20, 2006, 08:32:41 PM
booya, its well on its way to being playable
Title: Re: space invaders demo
Post by: Steven Picard on November 20, 2006, 08:37:23 PM
Looking good!
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 20, 2006, 09:01:57 PM
You can thank Pauls point on pointers for this to work the way it is.
Each image only exists in the binary 1 time, I am using lists and structures to generate the scene.
Each item has unique properties but is rendered with its own loop in the game loop.
I am even determining object health independently with pointers.
Prior to Aurora, I had no need or use for pointers, mainly because I was using languages that didn't require them for anything I was writing.
Everything I have done so far outside of Aurora has dealt with Classes, properties, and the like.
This has opened a whole new world for me.
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 20, 2006, 10:07:02 PM
Bedtime, wife is glaring at me.. here is where I am leaving off tonight, more tomorrow night.
Getting very close.
Title: Re: space invaders demo
Post by: Zen on November 21, 2006, 02:36:22 AM
Brilliant Jonathan. Looking forward to giving it a blast!

Lewis
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 21, 2006, 08:14:16 PM
Rounding the bend, almost in home stretch!

TODO:
Show the player
Show player shots
Show enemy shots
Destroy enemies
Show points
Destroy player
Reduce remaining lives and add that ship to the playing field
Figure out why on earth the high invaders are stupid AI, since they are identical in code to medium and low
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 22, 2006, 06:52:02 AM
All blue invaders now are fully in sync with each other, redid that entire routine.
To speed up the first release of this, I'll only make it 1 level playable, but reset that levels invaders once they are all dead.
The next release will altar the backdrop for the levels but since those images take up room, the second release will be larger in physical file size than the first.
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 23, 2006, 03:17:48 PM
First round for collision test a success, the bunkers win against the aliens :)
Although I need to do some further testing on that, but it appears that my collision testing system is a very good show :)
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 23, 2006, 08:41:53 PM
Latest screen shot, it now activates a player, the menu's work, upon game load it shows the main menu, only 2 options really, New game and quit.
During game you now have the ability to Pause with the P key, resume from pause with the R key, activate the Menu with the M key and start a new game or Resume the current game. Game reset works like a champ also.

You can move the active player ship left and right now all I need to get done is the bullet list, trying to decide how many shots to allow the invaders, since in the classic version, the player only gets 1 shot until that shot terminates.
More tomorrow after the dang shopping spree the wife wants to go on :)
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 25, 2006, 05:44:58 PM
Download the alpha version of the game here, almost done.
Remainder items are:
Figure out why saucer takes less damage than it should to kill.
Add collision check against player shots to bunkers.
Add enemy shots from random enemies.
Look into the movement logic, something screwy going on that is causing them to reduce in speed instead of increase after so many die.
Rotate backgrounds per level.
Increase difficulty per level.
Deal with player death.
Add high score table that is retrievable from disk.
Few other odds and ends.
Enjoy...
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 25, 2006, 11:25:26 PM
Deployment machines shut down for the night, but tomorrow when I get up, I'll update the link, the following items are fixed as of 1:19AM.
Fixed:
Invisible bunkers still defending player, this no longer happens.
Player can now be destroyed by collision with invaders, when this happens, the level is reset, player keeps current running score though and a life properly deducts.
After player dies 3 times, the game over screen properly shows and player can either hit N for new game or ESC to escape out of the game.
Routines to reset the level or start a new game now delete the pointer lists before creating them again to clean up any messes.
Collision detection routine now takes into consideration the invader distance from the bunkers, doesn't check for collision until the invaders reach a certain distance on the screen, same with the collision detection portion for the invader vs the player.
Throttle adjusts based on number of invaders remaining, this was what was causing my problem with the invaders incrementally slowing down once so many were destroyed. I adjust the throttle as each invader is destroyed. Few other nit pick items redone, but seems to have improved game performance.

TODO:
Make the invaders fire there weapons.

Alternate:
Instructions screen.
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 26, 2006, 05:12:55 PM
Updated:
Same link as before...


Now, the bullet check from the player also checks against the bunkers, the invaders check not only against the bullets, player and bunkers, but now the end of the playing field, if any invader makes it to the bottom, the player looses a life and the level resets. Optimized some of the routines to reduce check times, etc.
Still to come is the invaders firing back. Give it a whirl, let me know if you have any problems with the game.
This is nearing completion.

Arrow keys move the player, space fires the weapon.
M = Main Menu
P = Pause
R = Resume
N = New Game
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 27, 2006, 01:39:43 PM
Main thing left is player damage against invader shots (easy to do, just no time at this second) and sound!
I plan on trying to either release this to Paul either tonight or tomorrow night (probably tonight)
Here is the latest screen shot that includes the Invaders shots, by the way, right now they do destroy the bunkers :)
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 27, 2006, 06:21:35 PM
Sound might be delayed, I'll decide that in the next 40 minutes.
Right now when I play the sound the game freezes until the sound releases..
Even in its own thread..


Scratch that, Paul gave me the answer!
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 27, 2006, 07:07:07 PM
Latest update for the game can now be downloaded, warning, it won't work on Vista since PlaySoundA doesn't exist in Vista, looking for a fix now.
Sound only can have 1 sound going at any time. Let me know if you run into any problems.
Title: Re: space invaders demo
Post by: Bruce Peaslee on November 27, 2006, 08:50:27 PM
The only problem I have is that I can't win   ;)

Other than that, it's pretty cool.
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 27, 2006, 09:28:34 PM
 ;D

Well, I have passed on the code to Paul for him to review for any corrections in any of the pointers.
When he is comfortable with it, I have asked that he includes the code and all objects as part of the Aurora examples.
I made sure that how I programmed it would be easy enough to follow, I didn't create it using OOP style classes or inheritance, its a straight forward single source file.
1490 lines of code.

I have included sound files, the bmp files that I used to create the game with, and of course, the code.
There probably is bugs in it that I am not aware of.
Its something I wanted to make for everyone who purchases / owns the compiler so they have another basic game example.
Thats the idea anyway.

The funny thing is, that the game is writting and working on the HUD. The 3DSprite system on the 3D engine is written to support static objects for HUG and menu systems, I kind of went overboard by writing the game. Funny thing that, you can still use the 3d space behind the game to do what ever you want.

I'll probably take a closer look at the real 2d engine in the next day or so and look at converting the game to also work in the 2d space and use Pauls built in collision system for more accurate pixel perfect collision detection along with other neat things.

I just hope everyone enjoys it and can get a use out of it.
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 28, 2006, 02:40:42 PM
And the most recent addition.. John S's planets in the background playing in 3d space while you kill invaders on the 3dSprite surface :)
(Yes the sun rotates, and the planet rotates around the sun, and the moon rotates around the planet, thanks John)
It doesn't get much cooler than this.. ok.. well.. once I fix the sound that is :)
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 29, 2006, 07:05:04 AM
Latest update uploaded.
Now I am back to trying to conentrate on fixing the sound.
Download it and check out John's planet rotating around the sun.
Title: Re: space invaders demo
Post by: John S on November 29, 2006, 11:26:30 AM
Looks and works pretty good.  The planet and moon's movement adds a little pazzaz to the game
and sometimes makes me fire at the wrong time;)

Try changing the camera angle so that the planet and moon's orbits will look elliptical and be a little more interesting. 
Add a little more delay between levels to allow for the "WonLevel.wav" sound to play.

Great work!
Title: Re: space invaders demo
Post by: Steven Picard on November 29, 2006, 11:27:45 AM
I haven't tried the new version with the new background yet but I will tonight.
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 29, 2006, 11:33:10 AM
Thanks John, I'll look into the changes.
Been thinking about adding a mid level thing like a fading text gig or something to slow down level alterations.
If you hold down the space bar you will fire a shot every half a second to second in speed, but you only got 5 shots to cycle through.
I am glad you like it, hope you like it to Steven :)
I totally like the idea of the 3d backdrop, its sooo much easier and takes up alot less room than trying to build into the game dozens of random backdrops, I can just play with the 3d scene to get different effects per level if I wanted.
Title: Re: space invaders demo
Post by: Steven Picard on November 29, 2006, 11:47:45 AM
Quote from: Jonathan (zumwalt) Wood on November 29, 2006, 11:33:10 AM
I am glad you like it, hope you like it to Steven :)
:D Yes, I did like it.  Sorry for not saying so.  I think seeing a moving 3D background would be cool.  So I'll see what that's like tonight.
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 30, 2006, 01:15:13 PM
Updated the zip, this version uses the BASS object by Krypt.
I'll change it to an internal call using internal Aurora sound once its available.
I wanted the entire demo done in 100% aurora internal objects that doesn't require purchasing anything else for add-ons like sound. Since this is a freeware game, it doesn't matter.

The BASS requires purchasing for non-freeware code, so once the code is released, if you use the code as an example to build your games and use sound, you will need to buy a BASS license or wait until Aurora has built in sound support.

Oh yea, my sounds are CHEESY, so you can replace the sound files in the snd directory with what ever WAV file you want.
Title: Re: space invaders demo
Post by: ExMember001 on November 30, 2006, 03:14:38 PM
Just to clarify a bit,
Bass 2.3 dll is free to use if your sofware remain personnal or free.
so if someone use the example to build a free game, there's no problem ;)

http://www.un4seen.com/bass.html#license


Title: Re: space invaders demo
Post by: Steven Picard on November 30, 2006, 08:57:16 PM
Okay, I tried it with the new background and I like it.  Two things I would like to see is not have the level reset when one dies and to have the enemies flap their arms. ;D  Besides that, it's a great job.
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on November 30, 2006, 09:28:41 PM
Ok, I can fix the level reset thing easily enough, the flap wings is going to be a little different, since I am not using image maps, I can generate some more images to animate the characters and loop through there images to give them animation, its just working out the animation speed that will take a little time :)
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on December 01, 2006, 07:49:02 AM
Ok Steven, I have tweaked it, the level does not reset when you die, (unless the aliens hit the bottom of the playing field), I haven't gotten the arms animated yet :) in the works though.
Title: Re: space invaders demo
Post by: Brice Manuel on December 01, 2006, 11:20:47 AM
That looks really sharp!  I will be glad when the Sprite3D stuff hits EBASIC. ;D
Title: Re: space invaders demo
Post by: J B Wood (Zumwalt) on December 01, 2006, 01:15:02 PM
What I did will become doable in EBasic when the 3D is implimented. I am going to convert the entire project to 2D and then see how that turns out. Once I get that done, it will be possible for me to convert it yet one more time into EBasic code I think.