Create a 2d Shoot'em Up

BlitzMax Forums/BlitzMax Tutorials/Create a 2d Shoot'em Up

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.

Thanks ftbass. Nice idea.
I just had a first look at your code.
That seems nice (I'm just a beginner in Blitz !).
Just two comments:
(1) If I look t this part of code in the Tbonus type (just an example):
If Self.x < 0 - 64 Then
ListeBonus.Remove Self
If Rnd() >= .5 Then
CreateBonus(1024, RndFloat() * 768, "Vitesse")
Else
CreateBonus(1024, RndFloat() * 768, "Tir")
You "hardcode" the size of the sprites (64) and the size of the sceen (1024,768). It's probably better to detect the sizes at the beginning and put them in variables. Your code will be more "independent" from your images/screen size.

(2) just two ideas (maybe not so good, i'm a beginner... ;-) for the collision detection:
- why don't use "collideimage" function (pixel perfect - good examples on this forum) ?
- why don't add the collision detection in each object (type) ? In this case, each "object is responsable to detect the collsion with those wich have an influence on his "life". This can be more "OOP"...