I changed the design of the engine in the next version. In the new design, I have separate main library of the engine. It includes memory allocators, containers, random system, basic math functions, simple memory leak and memory corruption detector, callstack system and crash reporter. All of these stuffs are now simpler, more optimized and more easy to use.
Developing memory leak detector and callstack system is straight forward and you can find many samples on the net easily. But I was thinking to find a solution to detect memory corruptions. I found that it’s really complicated and it isn’t suits on me. My problem was not much trouble and there was no need to use complex solutions. All I needs was a simple system to checks the array bounds. So my memory corruption detector does that for me fast and secure. Although it may not report all memory corruptions but it can do for many of them.
The new system can report memory status, callstack with every value in every call when the system is running or crashed. It is a trick. When a crash happens on the application side, the function “DllMain()” called to detach the library. There I check the flags and memory status to verify that application closed unexpectedly and report memory statuses. This works well on Microsoft Windows. But I have no idea about the other platforms.
My next news title is about the network system. The new version has a basic network system based on UDP protocol. The system has been guaranteed to create a connection which supports reliable data order, request for loosed critical data, merge and compress data packets and connection speed controller to prevent data accumulation. The network system contains Client, Server, Connection and socket objects which allows the developer to design any network paradigm based on the genre of the game.
In the Client/Server architecture, the Server object has been featured by broadcast capabilities to create a game session with specified number of clients to join. The Client object can list the game sessions and let the player to choose a game to join. Also there are Connection object and Socket object to design the other network architectures as like as peer to peer connections, stars, mesh, etc. I wrote the network system recently and still need more optimization and debug and probably we will test it on “Rush for Glory”.
Categorised as: Game World