User:Admin/Projects/OpenTibia/CustomEngine: Difference between revisions

From Open Tibia Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 3: Line 3:
As with my [[User:Admin/Projects/Open_Tibia/Otclient|otclient project]] I will avoid spilling any details, but the gist of it is:
As with my [[User:Admin/Projects/Open_Tibia/Otclient|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)
* 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, vague function names, complex objects and binary formats, etc
* Much simpler design, easier to use and understand, no more relying on layers on layers of nested function calls, vague function names, complex objects and binary formats
* Better performance in some areas
* Better performance in some areas
* Relies less on classes
* Relies less on classes
* No hardcoded data except for loading player and town positions. Map, monsters and items are all loaded from disk in known easy to understand and manipulate human-readable formats
* No hardcoded data except for loading player and town positions. Map, monsters and items are all loaded from disk in human-readable formats that are easy to read and manipulate with a text editor


== Commands ==
== Commands ==
Line 28: Line 28:
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.
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.
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.
Version 4 has less game mechanics, but great core design, also has shift+click to see all items on tile and 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:
Some documented pre-git changes/fixes:
Line 52: Line 52:
* Minor bug fix: logging out -> inbuf/outbuf error (Jan 25th 2021)
* Minor bug fix: logging out -> inbuf/outbuf error (Jan 25th 2021)
* Minor documentation/tool feature (Jan 25th 2021)
* Minor documentation/tool feature (Jan 25th 2021)
* Made some more code more portable/independent, added function, secret tweak, added bench for items class (Feb 22nd 2021)
* Minor update: Some more code portability/independence, added function, secret tweak, added bench for items class (Feb 22nd 2021)

Revision as of 09:53, 25 February 2021

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 more relying on layers on layers of nested function calls, vague function names, complex objects and binary formats
  • Better performance in some areas
  • Relies less on classes
  • No hardcoded data except for loading player and town positions. Map, monsters and items are all loaded from disk in human-readable formats that are easy to read and manipulate with a text editor

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)

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 shift+click to see all items on tile and 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 :)

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 in server which is an 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)
  • Minor update: Some more code portability/independence, added function, secret tweak, added bench for items class (Feb 22nd 2021)