Thursday, 24 January 2013

Wednesday, 16 January 2013


You know all the sayings about assumptions.  They all boil down to don't take things for granted but how do you know when you are making an assumption?

I have been chasing a problem with my grenade throwing code. They would disappear unexpectedly or explode at the wrong time or place.

I have lots of visualisation to confirm that the calculations are being performed and that the positions were correct and in view!

It turns out that the confusion was because I had unconsciously assumed that my update thread was always in advance of my draw thread.
Nearly everywhere else in the code the update does not matter if it runs out of sync with the draw thread but for grenades that have to bounce, the difference was noticeable.  The collision is calculated in one thread but the grenade is drawn in another thread in real time.

Overall the update thread does less work and so has plenty of spare performance therefore it seamed logical in the back of my mind that it would process the collision faster than needed.  What I had not allowed for is that it might have started after the draw thread. 

I had varying results that I could not explain.  Sometimes working and sometimes not which I now know is because it is multi-threaded.  The launching of the grenade could sometimes be picked up instantly by the draw thread because that is where it was in its cycle but the update thread could be a few milliseconds or even a frame behind that draw.

Problem solved and another lesson learnt :-)

Monday, 7 January 2013

Video Update

I've spent the last day of my extended Christmas break creating a video to show off the progress I've made.

There are new weapons, new effects, more aliens and it is all comfortably playable on the Xbox.

It's taken me a couple of hours including waiting time to capture the video and edit it using the following tools:
Microsoft Expression Encoder 4 to capture 10 minutes of video.
Windows Live Movie Maker to edit the video down to about 3 minutes, add the transitions and the background music.

Thanks to Purple Planet for the music included in the video.

Friday, 4 January 2013

Shotgun Pellets

Just added the code so that some ammunition types shoot more than one projectile with each shot.

The code worked first time and is easy to change the behaviour for different weapons.

Another small step closer.

Thursday, 3 January 2013

Weapon Line Up

I'm working through everything needed for the finished weapons in the game. 

I have nearly all the models and cross hairs completed and most of the sounds and visual effects.

There is a good selection each with slightly different characteristics.

They have a futuristic style but retain recognisable features and handling.

Like the alien weapons these are from models purchased from Garage Games.  I've changed most of the names.