Commit Graph

9 Commits

Author SHA1 Message Date
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
03b56b44e4 Explicitly tell linker where to find SDL3_net 2025-09-21 17:10:04 +01:00
274ff9f665 [Fix] SDL3_net has no official release. Use main branch. 2025-09-21 17:04:41 +01:00
019059e209 [Add] Dependency management to build system. 2025-09-21 16:36:45 +01:00
92106a3c44 [Add] Client/server networking and 'ls' command. 2025-09-20 18:58:24 +01:00
a0c5eab1cf [Add] Implement basic UI windowing system. 2025-09-20 12:30:57 +01:00
f86015736d [Add] Text rendering. 2025-09-20 03:16:59 +01:00
c3ebd0e501 [Add] Initialise SDL and OpenGL window. 2025-09-20 01:39:32 +01:00
01e6d432a4 [Add] Initial project structure. 2025-09-20 01:03:03 +01:00