GnuGo for S60 Achieves Stability
As You can see from the above image, gnugo is is now operating pretty solidly on the S60 emulator. That's a genuine game (that i am in the process of losing :). In case you are wondering why I made the stupid moves into the corner it's because I was doing edge testing! Honestly! For some reason that I don't remember now, the GUI that I made is indexing 1 to 19, but gnugo is indexing 0 to 18. This was causing it to abort any time I played a move on the edge. It seems ok now, though I'll have to check if there is some tidy up that I can do there.
The stability is all down two things. Firstly ECompXL allowing me to leave all the global data as it was, and secondly due to the long hours I spent getting rid of all the overlarge automatic variables. They were causing a lot of stack overflows which are impossible to debug. I made a macro to malloc the memory instead of allocating on the stack. I also wrapped the affected files in C++, so that I could use automatic pointer type of class to take care of the freeing. I was having huge memory leaks before that because gnugo has lots of cpp macros that include a return statement.
I also tried to make a SIS package today. I got it to create and to install on my N90, but of course it didn't run at all or give any useful message why. No doubt I am putting some file in the wrong place or something. Symbian installation is not the nicest system in the world.
I also got some official UIDs allocated now, so I am using one of those for the application rather than one plucked out of thin air.
I also need to stop procrastinating and brush up on how to use CVS, so I can make the source code available. Need to do that before I start distributing any SIS packages anyway.
Next up to implement is the ability to play a smaller game than 19x19, so that I can test end of game conditions without waiting for hours. This should be just adding a menu basically. The board gui control and gnugo engine already support it.
0 comments:
Post a Comment