Beginners Community Project - Space Invaders

Blitz3D Forums/Blitz3D Beginners Area/Beginners Community Project - Space Invaders

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

OK. I was going to clean up this code a bit, but decided to post what I have for now. I also want to express some new ideas I have for this game. I have made lot's of changes that might seem odd for a spaceInvaders game. These changes are the basic consepts of the new game play I have in mind. Anyhow, I tried to keep the new functions as portable as posable so they can be used for other games. In fact I bult the Turret and turret select system seperate and then integraded it in. 5 fuction calls make up the Turret secondary bullets that fire anywhere the mouse imige is located, and these functions apear 1 after another in the main game loop like so.
 ;LaunchBullet(Player_Turret\x,Player_Turret\y,Player_Turret\iDir)
If KeyHit(46) = True Then ;this goes in dokeys

	For Player_Turret.PTurret_type = Each PTurret_type
		;For i = 1 To 16
	 		LaunchBullet(Player_Turret\x,Player_Turret\y,Player_Turret\iDir,Player_Turret\selected)
		;Next 
	Next 
End If



picked = get_picked(picked);Get keyboard and mouse input and asign picked accordingly

mousepointer=pick_pointer(picked);

Pick_A_Turret(picked)

UpdateBullets()


They should stay in that order but can be redistributed through out the main loop. (for example the mouseimage is drawn under the alian ships but needs to be drawn over it. Thats just more work that I was planning to do before posting the code.)

The comments are not all current I need to go through that too, but at the begining I have made coments about ideas I have for the gameplay. Not all will be done of course they are just Ideas. Like the Idea I have for the story line. In short you start out playing space invaders, then you get a mission and the game turns into a scrolling game kind of like zaxon but with mouse control. The goal is to reach the alian warp gates, travel through and destroy them from the other side, amd defeat the alian bosses. So there is three different game plays. Also you get itoms and have an iventory of weopons to use depending on the kind of alians you are fighting. Any how this is what I have done.
Made new enemy ship images, new bullet images, new bullet animations, a turret, a turret select system, the ufo at the top now appears at more random times and will come from iether side of the screen via a 16 image rotation function that will allow it to dive bomb the player, we can now shoot animating bullets, put in some game timeing, added mouse control, added a turret selection system that gives a inventory of turrets that have there own image,mousetarget, and soon will behave different acording to the selected turret. I have done lots of other things too.

There are new controls, Use the mouse right and left buttons to move, the mouse scroll button or numbers 1-3 to equip a different turret. Press c to fire a turret bullet. (Part of the behavior of the bullet I was talking about was different fireing rates, so time limiting has not bin implemented in the turret code yet.) Note: You might need to adjust the frametimer (right before main) to get a suitable frame rate for your computer. If it is still to fast you can slow it down in game useing - or + keys.