Commit Graph

5 Commits

Author SHA1 Message Date
564512225f [Add] Beginning of login UI and db persistance. 2025-10-05 19:52:17 +01:00
6272800a22 [Refactor] Migrate networking from SDL_net to Asio.
the SDL3_net implementation was causing blocking behaviour and was
difficult to debug and has bad docs due to not being released. Caused
crashes all over. so moved to Asio. This thing took so damn long as this
also had it's issues!

- All networking now uses Asio's async callback model.
- TcpConnection class encapsulates logic for a single client-server
  connection, managing socket and message framing.
- Implmented thread-safe queues for handling incoming and outgoing
  messages between the network thread and the main application.
- Refactored ClientNetwork and NetworkManager, the primary client and
  server networking classes have been rewritten to use the new
asio-based architecture.
- Player objects on the server are not managed by std::unique_ptr to
  ensure proper lifetime management and prevent memleaks.
- VFSManager is now a single instance on the server, passed by reference
  to new players, avoding redundant script loading for every connection.
- Resolved server crash that occured immediately upon client connection.
  This was traced to an object lifetime issue within Asio's async
handlers which was fixed by simplifying the send operation.
2025-09-25 22:41:01 +01:00
fbf70c43b3 [Add] Embedded Lua scripting language.
Over the past couple of commits, the build process now automates the
dependenices you'd normally compile from source.
This commit is focused on laying the foundation for scriptable in-game
commands using Lua.

- sol2 and lua5.4 are the new project dependencies.
- Created a new 'LuaProcessor' class to manage a Lua state and eecute
  scripts.
- The 'CommandProcessor' now contains a 'LuaProcessor' instance.
- Replaced the hardcoded c++ 'ls' command with a system that executes a
  '/bin/ls.lua' script from the Virtual File System.
- Implemented C++ -> Lua bindings for the 'vfs_node' struct, allowing
  Lua scripts to inspect the VFS and perform actions (i.e, list files).
2025-09-21 20:13:43 +01:00
019059e209 [Add] Dependency management to build system. 2025-09-21 16:36:45 +01:00
01e6d432a4 [Add] Initial project structure. 2025-09-20 01:03:03 +01:00