Sunday, July 14, 2013

Part 3 - Weekly review 8-14 July + Quick introduction to Boost

Hello again. Now it's the end of this week and it's time to look at what have happened with the game and the goals.

How did things go this week.

This week, I've been busy with some personal stuff and I hadn't slept very well some days, so it didn't go as fast as it could go. But still I was able to get some work done and could at least start working on what I was supposed to work with.

Last + Next Week's Goals

Because I could work as much as I hoped with the game (although I know that it could happen), last week's goals is also carried over to the next week.

Begin looking at collision between projectiles and enemies.
Currently, there is code for both projectiles and enemies for handling collision. The thing that is missing is making it work together (and test it)
 
Improve the back-end structure of the code
For those of you who are programmers as well and are reading this, yes I know, this could mean a thousand and one things and it is a very wide term. But since I wasn't sure how much time I could have this week to work on this game, I said so in order to "be safe". But if I'm going to be more concrete, without going heavily into technical terms and C++-specific principles, here are the two most important points that I want to achieve back-end
  • Optimize the code. This is an ever ongoing process, making it so that the code works more efficient. Even small things can give a big improvement for the game in the long run. I did some improvements to make existing code more efficient (Can't mentioned any specifics without going in on C++-specific stuff).
  • Make the game flexible to add new content. I want to make this code flexible, so that I can easily add content to the game in the future (because I'm planning to keep working on the game even after the summer) and so that I don't have to write overlapping code for every enemy, tower, projectile and so on. Currently, enemies and projectiles has their own base code, that all enemies and projectiles shares. Towers will also have their own base class as well.

 Quick introduction to Boost

I've decided to give you all a quick introduction the Boost C++ library.

Boost contains lots of different libraries of code, and I think it's easier to ask what Boost doesn't have than what is does have.
Here are the libraries that is currently used, or will be used, in my game
  • Boost.Foreach. In programming, there are several ways you can loop over a certain part of your code. I'm not going to go over every single one of them, but a foreach-loop is one of them. This kind of loop exist as a part of the language in other languages, but not in C++ before C++ 11 (I prefer to use Boost.Foreach over the built-in loop, as I think that it is more readable). So this library can be used to create a foreach-loop in C++, if you are not using a C++11-compiler.
  • Boost.Multiprecision. Currently doesn't see any use in my game, but this can be used for integer values larger than what C++ can support natively
  • Boost.Random. A library for generating random numbers.
  • Boost.Smart_ptr. Here is explanation of C++ pointers for dummies, as this library works with simplifying the usage of pointers for the coder, and adding more readability to the code as well.
  • Boost.UUID. This library is used to give each object in the game a universally unique identifier (UUID)

No comments:

Post a Comment