Page 1 of 1
KamikazeBee (Game)
Posted: Thu Jun 22, 2006 5:53 pm
by u9
I wanted to learn PureBasic, so I figured the best way was to make something. I sat down one weekend and this is the result. The game logic was done on the first day. The second day I added some nicer graphics, background, bullet, explosions, damage and of course no game is complete without sound.
The graphics come from PB and the sounds are royalty-free downloads from
www.a1freesoundeffects.com/. The name is a merger of those crazy Japs as well as the BeeGee airplane which in it self was a bit crazy.
Requirements- PB v4 full. If you remove all the comments it will compile in demo version.
- Windows OS. Sorry, I used 3D sprites which aren't available in Linux and Amiga.
How to play
Use the arrows to speed up or slow down the plane. Left ctrl to fire. This can be configured by changing the #fireKey constant at the top of the code. The objective is to shoot as many baddies as possible without wasting too many bullets. To quit press escape.
Downloads
Note: The downloads are NOT available at these url's at the moment. If you would like to thy this game, please send me a PM.
http://www.wirednerd.com/development/pu ... bee_v1.zip (~142kB) (old)
http://www.wirednerd.com/development/pu ... urrent.zip (latest release)
Any ideas for improvement?
EDIT: I've added a link to the latest release.
Posted: Thu Jun 22, 2006 6:10 pm
by DarkDragon
Cool, well, you need to say PB 4 instead of PB 3.94.
Posted: Thu Jun 22, 2006 6:37 pm
by Joakim Christiansen
Nice!
Posted: Thu Jun 22, 2006 7:22 pm
by rsts
Very nice - my teenage gamer enjoys it
As a "commercial" programmer, this kind of stuff impresses me.
Thanks for sharing with the community.
cheers
Re: KamikazeBee (Game)
Posted: Thu Jun 22, 2006 9:47 pm
by Comtois
u9 wrote:Any ideas for improvement?
You can replace this
Code: Select all
ResetList( explosions() )
While NextElement( explosions() )
Wend
by this
And this
Code: Select all
ResetList( explosions() )
While NextElement( explosions() )
DeleteElement( explosions() )
Wend
by this
BTW very nice game , well done

Re: KamikazeBee (Game)
Posted: Thu Jun 22, 2006 11:08 pm
by u9
Comtois wrote:u9 wrote:Any ideas for improvement?
You can replace this
Code: Select all
ResetList( explosions() )
While NextElement( explosions() )
Wend
by this
And this
Code: Select all
ResetList( explosions() )
While NextElement( explosions() )
DeleteElement( explosions() )
Wend
by this
BTW very nice game , well done

Nice. Thanks for the info. One learns new things every day

And thanks for the feedback everyone. I appreciate it.
Re: KamikazeBee (Game)
Posted: Fri Jun 23, 2006 1:52 am
by NoahPhense
That's freakin great.. VERY nice.. keep it up!
- np
Posted: Fri Jun 23, 2006 5:28 am
by DarkDragon
The Collision is a bit weird, it sometimes works and sometimes not(You have to increase the bounding box or sphere or whatever you use)
Posted: Fri Jun 23, 2006 8:52 am
by u9
DarkDragon wrote:The Collision is a bit weird, it sometimes works and sometimes not(You have to increase the bounding box or sphere or whatever you use)
Yeah I know. It's just a circle. I thought of making two ellipses, one for the fuselage and one for the wings so they better fit the boundary of the plane, but maybe in the next version. It's a bit complicated (I think) to calculate the boundaries of an ellipse when it is rotated

Maybe there are some good mathematicians around these neighborhoods...
EDIT: Well it's a bit complicated to calculate if two ellipses collide that is.
Posted: Mon Jun 26, 2006 1:30 pm
by u9
DarkDragon wrote:The Collision is a bit weird, it sometimes works and sometimes not(You have to increase the bounding box or sphere or whatever you use)
I have updated the collision to using 4 circles instead of one. I still have a large circle around the entire plane (just so I only check the small circles if the two large circles intersect). You can see the circles by setting this constant to #True
At the top of the source code.
@Joakim Christiansen: You asked in
another thread how to find the position of a bullet when the object (man/ship/plane/whatever) is rotating. You could have a look at the markCollision procedure. It creates the 4 circles, and draws them according to their angle around the plane. The assignments of x and y are actually the implementation of the matrix multiplication I showed you. Don't mind the inputs to the sin() and cos() functions. Their inputs should only be the angle of rotation of your object in radians (where 0 is to the right). After you have caluclated x and y you should negate y because on the screen the y-axis points downwards. You'll see I have done the same on line 660.
Hope it helps.
Download
Here's the new version:
http://www.wirednerd.com/development/pu ... bee_v2.zip (~144kB)
Posted: Tue Jun 27, 2006 6:46 am
by Michael Vogel
For all who don't have superfast internet access (maybe I'm not alone) it would be fine, if the engine3D.dll would be eleminated from the zip file (or for more comfort moved into an additional file for download)...
Posted: Tue Jun 27, 2006 11:48 am
by u9
Oh, I'm sorry Michael. Of course the engine3D.dll is included in PB so it was quite stupid of me to include it in the download. What was I thinking?

I have removed it and the file size is now only 144kB instead of over 600.
Sorry about that. Thank you for letting me know. Feedback is always welcome.
Posted: Tue Jun 27, 2006 4:23 pm
by Joakim Christiansen
u9 wrote:Hope it helps.
I'll test it
