-
Notifications
You must be signed in to change notification settings - Fork 11
Home
A lot of the elementary stuff is implemented, such as Tibia and Open Tibia's file format interpreters (.dat, .otb, .otbm, .pic, .spr), TCP socket management for login and game servers, packets and communication protocol (with RSA, Xtea, Adler32), task scheduler thread, main game dispatcher thread, the base objects, the base structures, etc.
I tried to implement the base Tibia's game mechanics on top of that. Controlling the character (walking, turning, changing outfit, etc), interacting with other players (say, whisper, yell, direct chat, channels, private channel, rule violation channel, etc), interacting with the game world (look item, move item, rotate item, use item, use item with creature, use item with item, etc).
And on top of that, basic game actions, like, gamemaster commands, spells, runes, tools, etc.
But there is still a lot to be done.
The server architecture is the following:
Packets are the primary unity. Incoming packets wrap the intent of the client and Outgoing packets wrap all the information of a server change that the client needs to receive in order to keep in sync.
Commands abstract away how and which clients needs to receive this information.
Commands can be intercepted and changed as they pass throw a pipeline of Command Handlers before executing.
Commands may generate events, which can be listened by Event Handlers.
Before starting the server, all the classes that implement Script are loaded. This is when the pipeline order is set.
Every game object (item, monster, npc and player) can have some Behaviour attached to it. Behaviour is like Unity's Component.