Little changes but lots of fixs and improvements. Really happy with what I accomplished :)
Changes :
- Reworked the base64 loading of tile. I now load the image from memory instead of writing a temporary file on disk and loading the temp file. \o/
- We can now load maps created with Tiled that have the option to base64 encode each layer. This reduce the map file size and the load time.
- Animated gif support. N00b mistakes on my part costed me alot of debugging time for this :(
Challenge 500:
For this progress report : 15h
YTD : 22h45 / 500h
Todo :
- Fix gif transparency
- Timer Manager
- Pixel perfect collision detection
- Write a “Making of” page on how I load map created with Tiled.
- Write “Lua part 2″ extending on the first tutorial to show how we can manage game states with lua.
- Rework the split of a tileset image. I should copy the pixel of the big image in the tile, instead of each time copying the big image and cropping it.
What to say about Clint’s presentation other than it was awesome, to the point and very entertaining. He seems to really have made his research and knew what he was talking about. He talked about exploration in game (system exploration, spacial exploration and self-exploration).
Guess who was the lucky guy to win 3D Game Programming All in One during the raffle. I did \o/ That’s one hefty book I tell you!
Knowing a couple of people at the chapter, networking after the conference was way easier than the first time.
The easiest way to debug a game that I know of is using printf or cout and tell Visual C++ 2005 to redirect the output to a file. To do that, simply go to Project > MyProject properties. Under Configuration Properties > Debugging > Command Arguments and write “> debug.txt”. This will redirect everything that is written on the standard output to debug.txt
Another way is to use the OutputDebugString. Everything printed with that function will be shown in the Output section of the debugger. Here’s a function that I use (source : unixwiz.net)
#include "windows.h"
#include "stdio.h"
#include "stdarg.h"
#include "ctype.h"
void __cdecl odprintf(const char *format, ...)
{
char buf[4096], *p = buf;
va_list args;
int n;
va_start(args, format);
n = _vsnprintf(p, sizeof buf - 3, format, args); // buf-3 is room for CR/LF/NUL
va_end(args);
p += (n < 0) ? sizeof buf - 3 : n;
while ( p > buf && isspace(p[-1]) )
*--p = '\0';
*p++ = '\r';
*p++ = '\n';
*p = '\0';
OutputDebugString(buf);
}
And use it like this :
...
odprintf("Cannot open file %s [err=%ld]", fname, GetLastError());
...
If you know easier way to debug or would like to point out that one of those two methods aren’t recommended, post a comment.
Alexey Pajitnov and Shigeru Miyamoto in the “special” spotlight for GDCA 2007.
Alexey Pajitnov will receive the First Penguin Award. Award that acknowledges developers who dive head first into unknown territory and pave the way for the rest of the development community.
Miyamoto-san will joins the ranks of Richard “Lord British” Garriott (Origin Systems – Ultime Online, NCSoft – City of Heroes/Vilains), Will Wright (Maxis – SimCity and The Sims), Yuji Naka (Sega – Sonic The Hedgehog), Gunpei Yokoi(Nintendo – Game & Watch and GameBoy creator), Mark Cerny and Eugene Jarvis by receiving the Lifetime Achievement Award. Miyamoto-san we wub roo!
You may have seen in my last progress report a new section called “Challenge 500″. I challenged one of my best friend to 500 hours of practice in a chosen area during one year. So in the next year, I’ll be practicing game programming for 500 hours (or plus). I’ll be updating my Challenge 500 in my progress report to keep you posted.