O'Reilly logo

SFML Game Development by Henrik Vogelius Hansson, Artur Moreira, Jan Haller

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

Summary

This was probably the most difficult chapter up to now, as it combines all the game-related features we have developed in earlier chapters: resources, world, entities, input, and commands. Despite all the things to consider, it became apparent that the existing framework made a lot of new tasks simple to achieve.

In this chapter, you learned about essential gameplay mechanics and their interaction. We added projectiles to represent bullets and homing missiles. We let enemies spawn, follow certain movement patterns, fire in regular intervals, and drop pickups upon destruction. Collision detection and response was implemented, and we discussed performance considerations. Eventually, we managed the world's update cycle, and cleaned up destroyed ...

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