I fixed a bunch of bugs in holdem last night. I got career mode working really well, both continue career and new career. I moved a bunch of the player game save logic out into it's own class called 'SaveData'. This aggregates the player basic information as well as extended stats. It uses a binary format with a version header tag to ensure consistency. I was smart about deserialization this time to avoid the unaligned memory read problem that I ran into with the pack file index.
On the UI side I cleaned up the main menu so continue career only shows up when you have a save game. From the in game options menu when you cash out or save and quit it does a nice transition back to the game and then either fades out to career or play now or shows the currently slightly broken quit confirmation.
I would love to get one more art pass over all the menus and background stuff. I may just experiment with altering the existing menu background to make it more color blend friendly and change to a larger font. I want the UI to feel very tangible and inviting.
Showing posts with label texas holdem. Show all posts
Showing posts with label texas holdem. Show all posts
Friday, September 29, 2006
Tuesday, September 12, 2006
Holdem: bugs, bugs, bugs
I've gotten a lot of bugs fixed in holdem in a short ammount of time. I have to rework the in-game overlay UI as it covers up important information right now. I'm considering cutting the in game AI chatter. I am reluctant to do it though because I think it breaths a lot of life into the game. One thing I was considering is still having an AI chat system but making it more event based. When an AI character has something important to say or a key event is triggered in career mode.
Sunday, September 10, 2006
Holdem: Nokia 6682 photo
This picture is of a pretty low quality. I'll just blame the camera.. the display on the phone is nice and makes the game look pretty sharp. I think I need to scale the fonts up a bit though as they seem a little on the small side.
Massimo says:
Well somebody has to keep me honest.
Massimo says:
so what are you up to now? working on getting the animation running? Cuz I know what you're not doing :) you're not posting pictures of Hold'em running on your phone :)
Well somebody has to keep me honest.
Labels:
games,
nokia,
programming,
screenshots,
symbian,
texas holdem
Holdem is finally running, woot!
And it looks amazing! For the record Dragonfly by Lemon D was the song that was playing when the app actually started up and ran and the time is 3am. I have been pursuing this goal of having this game engine run on a symbian smart phone for some time now. I finally tracked down the finaly serious problem pretty much by accident.
The line that was crashing first was:
if(path.compare(rec->name, rec->namelen))
This looks totally innocent.. I'll just say right away that it wasn't any of the usual suspects. Keep in mind that this ran fine on other hardware architectures. The problem was actually memory alignment.
The records that are being referenced here are part of a block of index records stored in the resource file. I have a tool that transforms and packs files into a single file and creates one block of memory to be used as a searchable index. The structure in memory used to look like this:
struct RecordRef
{
uint32 offset;
uint16 nextrec;
uint16 namelen;
// char name[namelen + 1]
};
If I tried to access offset or nextrec and the field didn't lay on a 4 or 2 byte boundary respectively my application would crash. This kind of problems are pretty hard to track down without a debugger. I used loglines traced to a text file on the phones internal memory through multiple builds to track this down.
The new structure looks like this:
struct RecordRef
{
uint32 offset;
uint16 nextrec;
uint16 namelen;
uint16 padding;
uint16 reserved;
// char name[namelen + 1]
};
I calculate the padding when the records are built in memory and before they are stored into the resource file. When they load from the file they are all nicely aligned and the code that searches the index just has to take into account padding when doing any pointer/index math.
Seeing the title screen on my phone makes me very happy!
The line that was crashing first was:
if(path.compare(rec->name, rec->namelen))
This looks totally innocent.. I'll just say right away that it wasn't any of the usual suspects. Keep in mind that this ran fine on other hardware architectures. The problem was actually memory alignment.
The records that are being referenced here are part of a block of index records stored in the resource file. I have a tool that transforms and packs files into a single file and creates one block of memory to be used as a searchable index. The structure in memory used to look like this:
struct RecordRef
{
uint32 offset;
uint16 nextrec;
uint16 namelen;
// char name[namelen + 1]
};
If I tried to access offset or nextrec and the field didn't lay on a 4 or 2 byte boundary respectively my application would crash. This kind of problems are pretty hard to track down without a debugger. I used loglines traced to a text file on the phones internal memory through multiple builds to track this down.
The new structure looks like this:
struct RecordRef
{
uint32 offset;
uint16 nextrec;
uint16 namelen;
uint16 padding;
uint16 reserved;
// char name[namelen + 1]
};
I calculate the padding when the records are built in memory and before they are stored into the resource file. When they load from the file they are all nicely aligned and the code that searches the index just has to take into account padding when doing any pointer/index math.
Seeing the title screen on my phone makes me very happy!
Saturday, September 09, 2006
Holdem: More progress
So the game is running on my phone and I'm getting closer to tracking down what is stopping the game from starting.
..\..\..\..\..\DEV\ZTEAM\HOLDEM\S60\SRC\Series60.cpp(220): Starting window session
..\..\..\..\..\DEV\ZTEAM\HOLDEM\S60\SRC\Series60.cpp(232): Setting up direct screen access
..\..\..\..\..\DEV\ZTEAM\HOLDEM\S60\SRC\Series60.cpp(236): Creating double buffered drawable
..\..\..\..\..\DEV\ZTEAM\HOLDEM\S60\SRC\Series60.cpp(270): Initializating game engine with data path: E:\System\Apps\Holdem\data
..\..\..\..\..\DEV\ZTEAM\CORE\SRC\Gameengine.cpp(56): GameEngine::initialize(): game engine data path: E:\System\Apps\Holdem\data
..\..\..\..\..\DEV\ZTEAM\CORE\SRC\Gamearchive.cpp(68): GRPIndex::_reserve(): reserving: 1409 bytes, buffer: 0x00000000
..\..\..\..\..\DEV\ZTEAM\CORE\SRC\Gamearchive.cpp(95): GRPIndex::_reserve(): finished, buffer: 0x004121c4
..\..\..\..\..\DEV\ZTEAM\CORE\SRC\Gamearchive.cpp(734): GRPFileSystem: loading file: default.ini, packfile: E:\System\Apps\Holdem\data.grp
Could be a few things right now but pretty promising that game engine startup has gotten this far. Now if I can get that config file to load it will be on like donkey kong.
..\..\..\..\..\DEV\ZTEAM\HOLDEM\S60\SRC\Series60.cpp(220): Starting window session
..\..\..\..\..\DEV\ZTEAM\HOLDEM\S60\SRC\Series60.cpp(232): Setting up direct screen access
..\..\..\..\..\DEV\ZTEAM\HOLDEM\S60\SRC\Series60.cpp(236): Creating double buffered drawable
..\..\..\..\..\DEV\ZTEAM\HOLDEM\S60\SRC\Series60.cpp(270): Initializating game engine with data path: E:\System\Apps\Holdem\data
..\..\..\..\..\DEV\ZTEAM\CORE\SRC\Gameengine.cpp(56): GameEngine::initialize(): game engine data path: E:\System\Apps\Holdem\data
..\..\..\..\..\DEV\ZTEAM\CORE\SRC\Gamearchive.cpp(68): GRPIndex::_reserve(): reserving: 1409 bytes, buffer: 0x00000000
..\..\..\..\..\DEV\ZTEAM\CORE\SRC\Gamearchive.cpp(95): GRPIndex::_reserve(): finished, buffer: 0x004121c4
..\..\..\..\..\DEV\ZTEAM\CORE\SRC\Gamearchive.cpp(734): GRPFileSystem: loading file: default.ini, packfile: E:\System\Apps\Holdem\data.grp
Could be a few things right now but pretty promising that game engine startup has gotten this far. Now if I can get that config file to load it will be on like donkey kong.
Subscribe to:
Posts (Atom)


