TypeScript GameserveršŸ˜Ž

My most interesting fully solo OT project so far.
The server runs on pixie dust and haters’ tears.
Download link

Core basic features

  • Tiny codebase (<10% of TFS’s sources).
  • Simple and elegant system design, far less source files (30 to TFS’s 163), ASCII file formats for all server data, elegant solutions to reduce unnecessary complexity.
  • Multicore map loading (took about 1 day to add including bug fixes).
  • Linux, Windows and probably Mac compatible (untested).
  • 10 seconds compilation time on Linux (single core, full rebuild), 40 seconds on Windows (3 seconds without optimization and multicore disabled).
  • Builtin login server & more.

Basic Commands

  • /a length
  • /z aid
  • /up
  • /down
  • /tp
  • /goto x,y,z
  • /save accountid (saves player data in memory to accountid x)
  • /reset (kicks and resets player data in current account)
  • /town name
  • /speed number (0 is max)
  • /flags number (set player flags)
  • /dump x,y,z (dump map data on tile x,y,z in console)
  • /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 (2020)

Not much documentation to go on here as I didn’t use git or anything until 2021. There’s been tons of bugs, bug fixes and rewrites. Server has been fully rewritten 3 times in the early stages to improve core design.
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, some EQ and containers mechanics, but this server version had tons of core issues so to speak.
Version 4 has great core design, but less game mechanics.

Some pre-git changes/fixes documented in text files:

  • 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 others from memory:

  • Added (and later perfected) 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).
  • Large update: 15 fixes + other improvements including fixing everything related to creature movement (March 23rd 2021).
  • Minor update: 3 fixes, 2 changes, 1 of the fixes being sending too many floors underground (March 27 2021).
  • Large update: a few small fixes, many medium fixes + 1 weak memory leak + 2 segfault fixes, fixed spawning algorithm, preparing to implement A* (Apr 9th 2021)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s