O'Reilly logo

SFML Blueprints by Maxime Barbier

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Designing our game

Now that we have chosen the entity component system approach and created a world that will be populated by them, let's think about the needs. Following table summarizes the needs:

Entity

Parent

Specificities

Entity

 

This can move

This can be drawn

This can collide with another entity

Player

Entity

This can shoot

This is controlled by inputs

This can collide with everything except the one it shoots

Enemy

Entity

This can be destroyed by shooting

This gets the player some points when destroyed by shooting

Saucer

Enemy

This has a bigger chance to spawn a small saucer when the point number increases

This can collide with everything except saucer shoots

BigSaucer

Saucer

This has a special skin

SmallSaucer ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required