Commit Graph

20 Commits

Author SHA1 Message Date
9d770ef9b2 [Refactor] Implment structured network protocol. 2025-10-11 19:05:14 +01:00
fce3b3aad6 [Add] Implement database persistance and Login UI.
[Build System]
- Integrate 'sqlite3' and 'sqlite_modern_cpp' using FetchContent.
- Enabled 'C' language to allow compilation of 'sqlite3' lib.

[Persistance]
- Adds a 'DatabaseManager' class to handle all SQLite operations.
- Creates a 'players' table on server startup.
- Server uses separate database for single-player 'bettola_sp.db' and
  'bettola.db'

[UI]
- Adds a new 'LoginScreen' UI.
- Game flow is now MainMenu -> LoginScreen -> bootSequence -> Desktop.
- 'LoginScreen' has interactive tabs to switch between "Login" and
  "Create Account" 'modes'.
- Full client-server communication for creating accounts and
  authentication.

[Server]
- Refactor 'NetworkManager' to handle an 'AUTHENTICATING' state for new
  connectiosn.
- Player state is only set to 'ACTIVE' after a successful login
2025-10-05 22:45:33 +01:00
564512225f [Add] Beginning of login UI and db persistance. 2025-10-05 19:52:17 +01:00
d37f632344 [Refactor] Implement batched shape rendering.
This mirrors the previous refactor of the TextRenderer. All calls to
draw_rect and draw_triangle now buffer vertex data (position and color).
A begin()/flush() system is introduced to manage batching.
2025-10-05 00:44:23 +01:00
caa482a7a0 [Add] Implement delta time game loop. 2025-10-04 21:28:16 +01:00
9d2a2f4195 [Fix] Separate single-player and multiplayer ports. 2025-10-04 05:20:50 +01:00
e7607e3fc0 [Refactor] Created UIRenderer for consistant coord system.
The UI codebase was suffering with complexity due to the need to
manually convert between two different coordinate systems:
- Top-down "screen coordinates" used by SDL for input and windowing.
- Bottom-up "GL coordinates" used by low-level renderers.

This was making layout calculations diffucult and is bug prone.

With this commit, I'm introducing a 'UIRenderer' abstraction layer that
wraps the low-level 'ShapeRenderer' and 'TextRenderer'. This is
responsible for centralising all coordinate system conversations.

All UI components has been refactored to use the 'UIRenderer' so the
entire UI code opeates exclusively in a single, top-down screen
coordinate system as one would expect.
2025-10-04 03:11:48 +01:00
a6e159f0da Menu bar for for text editor etc. 2025-10-03 23:56:30 +01:00
666b4f554b [Add] File loading and fix local 'exit' command. 2025-10-01 21:38:33 +01:00
ebd1e222d7 [Add] File saving for the fancy new text editor. 2025-09-30 21:37:24 +01:00
b4d985db29 [Add] Text editor and generic window content. 2025-09-29 23:15:46 +01:00
d34c13ef8b [Change] Tried to fix stupid fucking animation jitter 2025-09-29 20:36:49 +01:00
43907509eb [Add] Graphical application launcher. 2025-09-28 20:39:11 +01:00
996bf1c62c [Add] Temp desktop background and clock widget. 2025-09-28 17:24:41 +01:00
0e7f97ca81 [Refactor] Improve window buttons and fix state handling. 2025-09-28 15:37:15 +01:00
ea25cb6cc7 [Add] Taskbar and window management work
- Adds a taskbar that displays and manages open application windows
- close, minimise and restore functionality
- resizeable windows
- Refactored desktop event handling to manage window focus and render
  order
2025-09-28 14:12:11 +01:00
6876cbff95 [Add] Implement system boot sequence screen. 2025-09-28 03:10:12 +01:00
e72cc987ff [Add] Not your boring main menu. 2025-09-28 02:21:34 +01:00
b1bdb86b76 [Add] Implement screen manager state machine. 2025-09-28 00:09:26 +01:00
00e78cc2ba [Refactor] One GameState to rule them all!
Introduces a central GameState class to manage the client's lifecycle,
network connection and UI components. The Terminal has been demoted to a
pure UI widget and main has been simplified to a basic entrypoint as
they should be!
2025-09-27 18:07:01 +01:00