I keep working on OpenGBH (OpenGTA2 is another name). Today I rewrote convar system (although it’s better, I’m still not yet pleased with it – will rewrite it again), and it’s now nifty – can have variables of three types (float, int, string), and can have commands (you redefine read/write routines). But I’m gonna rewrite it in such way, that each convar holds both float and integer – everything else is handled via callbacks/custom convars of a sort.
I’m also having a neat aim now – I’m aiming to make OpenGBH completly uncrashable by anything, and any kind of input garbage. It should try to extract as much useful stuff from garbage as it is possible, otherwise just drop it and keep running. And of course no memory problems & violations (today I had some fun time eliminating some bug, although it was be who made it consciously in the first place).
You can see this small test of calling console commands, and setting console variables, you can change font in the console like this (I’m sorry, but GTA2 fonts lack many special characters, so left one looks much worse than right one. I added all custom chars to right one myself):

And I added new function called logError – it logs an error, and when application is in debug mode it calls interrupt #3, which results in breakpoint. This means you’ll instantly be able to see where the error came from, and stuff like call stack (in MSVS at least):

To move towards aim of avoiding crashes I’m going to do two things: first, do a general code revision, every line and statement. And second would be simply feeding the program garbage, hoping it works (more or less).
Recent comments