Making Space Invaders
-
I am re-making space invaders for a class project. And I wanted to know the documentation I would need in order to make objects move such as the little invaders and bullets.
Or even in general, what documentation would be needed in order to make the game Space Invaders.
-
@treej4
I would use a QGraphicsScene. Create QGraphicsPixmapItems for your invader "sprites" and move them around. Just creating 2 sprites for each invader, with his "legs" open & closed, and alternating between them gives an authentic SI feel :) -
@treej4
The "objects" are allQGraphicsItem
s.QGraphicsPixmapItem
s areQGraphicsItem
s which hold a bitmap/picture. Each one is an object with its own (x,y) position which you can read and move. The scene keeps a list of these objects which you can access, and you can keep your own references/lists if you wish as well.You view the scene through a
QGraphicsView
attached to a scene. In your case you will want just one scene with one view. -
Hi,
You should take a look at the graphics view examples. For example, the colliding mice one will show you how to move elements and do collision detection.