The year of the dragon

by Niels Brouwers 30. January 2012 06:36

'The year of the dragon'. Say that out loud a couple of times, it just sounds like a great (sub)title for a game or movie or something like that! I like dragons, never met one though, but I like them. Unfortunately I am a tiger according to chinese astrology and the tiger and the dragon....well...they don't seem to get along very well. I don't know if or how this will influence my plans for releasing the Carter Jones adventures this year, but I really want to get the game out there so I am putting quite a lot of effort into it!

In my next post I will get into some animation updates I have been doing / will be doing over the couple of days. Should be fun, animating anything is usually a lot of work: for each movement of a baddy in the game all the individual frames need to be drawn and although I try to cut corners here and there (using procedural animation / rendering stuff in 3D) it usually works out best if I drawn the core animations by hand.

I did make good progress last weeks. I refactored the entire background collission code which is now pretty much generalised and working great, to prove it worked I used the routines on the critter baddy and so refactored that code as well. In the process I managed to stumble upon a rare bug and fixed that as well.

 

Happy chinese new year!

Rewriting code: tile-player collision code

by Niels Brouwers 16. January 2012 04:19

A lot of time on the Carter Jones Adventures game is spent on rewriting pieces of code. Visually you probably wouldn't notice any difference if I would show the game before or after a rewrite but in terms of performance, memory leaks, bugs and maintenance of the code there can be a huge difference.

The Carter Jones Adventures is a full-directional sidescrolling game, this means that the player can roam around freely depending on how I layout the level and where I place the platforms. I do the laying out of the levels in my custom level-editor (there are some screenshots of that in previous posts). A level is built up out of graphics that are packed together in one or more large images, by copying tiles out of the larger image into the level, a level is constructed.

Tiles are 32x32 pixels in my game. And previously I defined a heightvalue ranging from 0 to 32 for each tile. This allowed for having a unique height value for each position. Height locations between adjacent tiles were extrapolated. This system of 32 different heights and extrapolating the heights between tiles was causing some problems: occasionally the player could jump 'between' tiles and get stuck on a platform for example.

So, today I set out to rewrite that code. The new approach would define a 'rectangle' of outer tiles that represent the player. These tiles are investigated, they can be either solid or fallthrough and the new algorithm detects where the solid tiles are (if any). Depending on the current state (e.g. walking to the right) and the measured rectangle (e.g. solid tiles under the player, fallthrough on the right,top and left) I can now determine the possible actions such as moving to the right. I can now use this algorithm everywhere in each object class, not just the player's (using exactly the same algorithm from several states is one of the basics of programming - which I did not obey: due to the explorative nature of the code I copied it over instead of generalizing). Anyway, the occasional errors are now gone, the code is much cleaner and therefore much easier to read and I will use this code in all future objects thus preventing myself of creating new errors. All in all it was a sunday morning well spent!

 

Visually representing the rectangle of tiles around the player helped a lot with developing this piece of code. The FPS and milliseconds of time spent in drawing (D) and game-loop updates (U) are always displayed since Dream Build Play 2011 happened.

The ways we work

by Niels Brouwers 11. December 2011 00:00

The way I work is like this: I get an idea, start drawing, make screenshots and when it looks nice and I am starting to wonder how it would look and feel when it is moving/animating, only then I start programming. Also, I tend to switch to coding when I am unable to draw something (lack of inspiration / artists block), I am always able to write some decent code - it's second nature, my first talent or whatever you want to call it.  

Sometimes however, I run into troubles with my code that I did not expect. In that case, learning how others solved these problems, revisiting and rethinking my concepts are the usual approach. Occasionally I post a question on a forum and when I get answer I used to take that serious. Not anymore, I have learned I should carefully weigh the answers given by anyone. I shall be very cautious when a seemingly uber-guru on the subject gives me some advice. These people look at things differently and may well put you on the wrong track. Trust me, been there, done that!

Anyway, here's one of those ideas that turn into a screenshot of some sorts.  I do not know where it is going but I like the looks of this (yeah I know it's just rocks with my previous drawing copied onto it, but you should see this moving...hint.!)!  

 

Tags:

Drawings | Games

Happy Birthday dog!

by Niels Brouwers 23. November 2011 07:54

I drew this dog for my nephew who turned 7 recently.

I don't know why exactly I drew him a dog but there is a story involving him and dogs:

Once upon a time, in a temple in Hua Hin, he and his brothers were mocking a couple of dogs from up a ledge, the dogs were below them and the boys were unreachable and they were challenging the dogs.  Then I remember my little nephew walking into a cavern, dissappearing around the corner and after a few seconds he came back yelling and screaming. The group of dogs was chasing him out! Luckily they didn't hurt him, but it probably though him a lesson! It would have been a great funniest home vid!

Tags:

Drawings

Wappy dog

by Niels Brouwers 9. November 2011 06:33

So, I noticed this trailer for wappy dog from Nintendo. It's like a Sony Aibo connected with your Nintendo DS. Cool idea, mixing reality with the virtual world. Skylanders is another game doing this. I am not sure if these games are really worth playing, but it is just another way of interfacing with your players. And that's cool!

It inspired me to draw this 'Appy Dog' which is a little further in the future from now. I imagined an iphone / android app that you can use to control your pet. Just plug in the two antenna's in your pet and off you go!

On to some Carter Jones progress, I finally fixed a weird nasty bug in the level drawing. Also the level 3 (background) graphics are nearly done, I still need to do a lot of variations and waterfall animations but it's getting there! I am also investigating other platforms as well, it seems that with a little effort (I am an optimist with estimations! ) I can port CJA to other platforms like IPhone and Android. But first it has to become an XBOX Live Indie - I need focus! And time, lots of it!

Last but not least, and something completely different: the Dutch Ice Carving Championship 2011 is coming up. I am participating again, so that will take up some time as well the next couple of weeks. I will keep you updated!