Sunday, July 21, 2013

Part 4 - Weekly review 15 -21 July

Another week has ended, and it's time to look at what was supposed to get done.

Last week's goals +  how did it went

Begin looking at collision between projectiles and enemies.
This was finished as long as it is possible without the tower class
 
Improve the back-end structure of the code
This is an ever-ongoing task, but I was able to improve how collision was handled back-end.

Of some reason, VS2012 still doesn't always want to co-operate with me. It works better since downgrading the driver for my graphics card, but when VS2012 is the only program that I really has problems with on my computer, it becomes frustrating to work with the game, and working frustrated is not a good idea.

Next week's goals

  • Begun working on the class for towers

In other news

I've come to the realization that having a full game ready for when I return to university is no longer a reasonable goal, because real life has consumed my time this summer. I'm personally not upset over this, as I initially did this to learn myself to do a tower defense game.

But with that said, I'm planning on keep working on this project even after my studies has resumed. Once I get all the basic functions in the game ready, it essentially comes down to keep adding content to make it more varied.

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)

Sunday, July 7, 2013

Part 2 - Weekly review 1-7 July

So it's now the end of this week, and it's time to see what the goals for this week was.

Last Week's Goals

Make it so that something is rendered on the screen
This was something that I was able to achieve, but not a big challenge as I've done this several times before in SFML

Make it so that enemies travels down the track properly
After some frustration and a bit of ugly hacking I was able to make this work to 99%. The thing that's missing is what to do when the enemies has reached the end of the track, but I'm gonna fix that later.

Make Boost 1.54, which will be released next week, work properly within the game.
So far, Boost 1.54 seems to be working properly for me, nothing has changed for the worse as far as I've noticed. And even though I'm not using any libraries that requires compiled .lib-files, I managed to compile those as well without any problems.

And here is a screenshot of how the game currently looks like

How did everything went?

 At this point, I have to say slower than I expected it to go? Why you might ask? The reasons for this spells Technology. After updating my Nvidia Graphic Card's driver to the latest version, it would not only freeze Visual Studio, but also the entire Windows 7 as well (For various reasons, I'm not upgrading until I get a new computer). This made me frustrated and I know that solving problems frustrated is not a good thing.

As a result of this, unsaved files when Windows 7 froze got corrupted, but luckily I hadn't written to much and they could be restored via Dropbox. And at one time, the project file in Visual Studio got corrupt, so I had to re-setup the project. It wasn't the source files, those were safe, however setting up a new project will all the right settings took some time.

Next Week's goal

For the next week, the goals is:
  • Improve the back-end structure of the code
  • Begin looking at collision between projectiles and enemies.
I'm not setting any higher goals right now, partly because I'm gonna be busy with some other stuff next week, partly because I wanna be safe in case I run into a major problem again, like Nvida drivers freezing Windows 7 again.

Sunday, June 30, 2013

Update on what's happening + Next week's goals

Hello again. The game is coming along slowly for me, as this week was the first week were I really had the time to work on the game. And since I'm making something I've never have done before, I have to think differently now. So that's why it's coming along slowly for me.

But with that said, I'm going to put up weekly goals for myself with this project from now on, and I'm gonna follow them up at the end of each week.

So, the goals for the next week are
  1. Make it so that something is rendered on the screen
  2. Make it so that enemies travels down the track properly
  3. Make Boost 1.54, which will be released next week, work properly within the game.

Monday, June 17, 2013

Part 1 - Why use SimpleIni aka why config files are awesome

In order to keep you interested while I'm working on the game in some shape, I'm gonna take some time and explain the code libraries that I'm gonna use for the game. I'll start of with SimpleIni

What is SimpleIni

SimpleIni is a C/C++ open-source software that is used to read, change and save settings on .ini files. It can read both integer values, floating point values, string values and booleans.

Why SimpleIni

Initially, I used it because I was assigned to find a solution that could read settings from .ini files, but I liked it so much that I continued to use it. One reason for it is because it is so simple to use, all you need to include is one header files and from there on, it is really simple to use, maintain and debug.

Disadvantages?

By the way I've been using SimpleIni, there are a few disadvantages with it
  • Only support for the integer variable long (which is equal to an int, a 4-byte integer), but you can cast it to lower integer values. For grater values, you read it as a string and then convert that to an integer
  • Only support for the floating-point variable double (which used 8 bytes), if you want to use float (which uses 4 bytes), you have to cast it to a float when reading the value

Why have config files

Because it saves time!
The way the project and VS is set-up for me right now, if I change something in the renderer class, it takes ~4 seconds to compile. That may not sound much, but when you are in a phase where you are doing nothing but changing variables to make the game balanced, that adds up quickly. So by having numbers in a config files, you just need to change the variables and save the file in order to make the change happend. And that saves lots of work in the long run.

So if you don't already have a config files for your game, get one now!

Wednesday, June 12, 2013

A notice on what's happening

I'm sorry in advance if I might be quiet for some time, but I'm moving out from my apartment soon. Packing and cleaning it takes time, but once it's done, I'm going to be able to work more on it and hopefully post more updates.

With that being said, I can say that I've at least started coding the engine of the game and I'm planning to do a series of post where I explain some of the libraries that I use for the game.

Friday, June 7, 2013

Part 0 - Introduction

It's time to give a proper introduction about me and the game I'm working on.

About me

My name is Axel Räntilä, I'm 20 years old and I'm a student, currently studying Game Design and Programming at Gotland University(which will become Uppsala University Campus Gotland later this summer). Interest of mine include programming, reading books and mangas, training Aikido and taking bicycle trips and, of course, playing games.

When it comes to games, I play all kinds of things, but I really like to play tower defense games because they offer a unique strategical challenge. My favorite tower defense game is probably Sanctum by Coffee Stain Studios.

And if you have any question that you want to ask me, related to this project or not, you can do so in three different ways:
  • Email me at programmerarttd [@] gmail.com
  • Tweet me @axelrantila
  • Post them in the comments

About Programmer Art TD

As the name implies, the game will be a tower defense game that will be built up with programmer art. In the game you have to protect your RAM memory from the incoming hordes of memory leaks. If too many memory leaks reaches your RAM memory, the game game will be over.

You defend the RAM memory by building towers on the circuit board near the memory. Killing of memory leaks gives you access to resources, which in term can be spent on building more towers.

After destroying a certain number of memory leaks, you will be rewarded with a boost that gives you some kind of bonus until the end of the map.

The game will be written in C++ and will utilize (at least) three external libraries.
  • SFML, for rendering of graphics, handling of input, playing up sounds and such
  • SimpleIni, for reading settings from config files
  • Boost, for a lot of back-end things (Will explain more in the future)

Goals for this project

I've set-up a couple a goals for myself that I want to fulfill with this project around the time my fall semester starts:
  • Learn to work with Visual Studio 2012
  • Write a 2D-engine that can be used later on (for making games for fun or during Game Jams and such)
  • Getting better at utilizing external libraries for making the code work better.
  • Build a functioning Tower Defense game

And that's it for now, expect more to come next week.

Sunday, May 12, 2013

Hello World!

I, Axel Räntilä, will post updates here about a summer programing project that I have in mind, preliminary called Programmer Art TD.