Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
SDL Game Development

You're reading from  SDL Game Development

Product type Book
Published in Jun 2013
Publisher Packt
ISBN-13 9781849696821
Pages 256 pages
Edition 1st Edition
Languages
Author (1):
Shaun Mitchell Shaun Mitchell
Profile icon Shaun Mitchell

Possible improvements


Alien Attack is a pretty robust game at the moment; we highly recommend looking through the source code and becoming familiar with every aspect of it. Once you have a good understanding of most of the areas of the game, it is a lot easier to see where certain areas could be enhanced. Here are some ideas that could be added to improve the game:

  • Bullets could be created at the start of a level and stored in an object pool; so rather than creating and deleting bullets all the time they can be pulled from and put back into the object pool. The main advantage of this approach is that the creation and destruction of objects can be quite expensive when it comes to performance. Eliminating this while the game is running could give a real performance boost.

  • Collision detection could be optimized further, possibly through the addition of a Quadtree to stop unnecessary collision checks.

  • The source code has a few areas that use string comparisons to check types. This can be a bit...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}