User:Admin/Projects/OpenTibia/CustomEngine
Core features
As with my otclient project I will avoid spilling any details, but the gist of it is:
- Smaller codebase (10% of TFS's sources without counting Lua and XML)
- Much simpler design, easier to use and understand, no unnecessary nested function calls, complex objects and binary formats, etc
- Better performance in some areas
- Relies less on classes
- No hardcoded data except for loading player. Map, monsters and items are all loaded from disk in known easy to understand and manipulate human-readable formats
Changelogs
Pre git
Not much documentation to go on... There's been tons of bugs, bug fixes and rewrites. Server has been fully rewritten 3 times due to early core design issues which has at this point been fully solved. Server version 1 had a lot of game mechanics working such as moving items, stacking items, use item -> replaces items such as torch, vials, etc, also in EQ and containers, but this server version had tons of core issues. Version 4 has less game mechanics, but great core design, also has use item -> replace item mechanic (doors, street lights, etc), but not for EQ or containers, no mechanic to open containers yet, etc.
Some documented pre-git changes/fixes:
- Fixed /a 1 (player should walk, not teleport, this short distance)
- Old memory leak fixed (design issue, fully replaced)
- /save slotid command saves copy of character to slot n
A few more from memory:
- Added loading of monsters, spawning and random walking
- Game loop frequency can be adjusted in config and changed ingame with /gamefrequency command
- Players and monsters can no longer walk through walls and other non-traversable objects
- Instruments works, because music rocks :)
Other commands:
- /a length
- /z aid
- /up
- /down
- /tp
- /goto x,y,z
- /reset (kicks and deletes character from memory, loading static player data on next login instead of saving on logout -> load saved data from memory on login as per default)
- /save slotid (saves player data in memory to slotid = accountid)
- /town name
- /speed number (0 is max)
- /flags number (set player flags)
- /dump x,y,z (print map data on tile x,y,z)
- /build list itemid (sends full data of item to player ingame)
- /taint (defunct: marks tiles explored with persistent "taint" effect, was used to explore a weird persistent "silently drop connection" bug that's since disappeared)
Post git (Dec 30th 2020)
- Multicore map loading - reduces map loading time by 300% when using 4 cores (Dec 30th 2020)
- Maximally optimized map loading - 2x speed from last commit + 2x with -O1 (Jan 2nd 2021)
- Fixed bug: random ~1% loss of tiles caused by unreliable C function (Jan 2nd 2021)
- Fixed bug: ~5% chance of segfaulting during map load after introducing multicore map loading - only 1 known segfault bug left [easy fix] (Jan 3rd 2021)
- Added tools: manual and automated networked map data analysis tool and objects.srv to json converter (Jan 14th 2021)
- Made 1 core file/class independent of other code (Jan 15th 2021)
- Added /taint command to explore strange "silently dropped connection" bug (Jan 21st 2021)
- Got rid of persistent 6 months old "silently dropped connection" bug with still unknown origins (Jan 21st 2021)
- Minor bug fix: logging out -> inbuf/outbuf error (Jan 25th 2021)
- Minor documentation/tool feature (Jan 25th 2021)