Commit Graph
58 Commits
Author SHA1 Message Date
andrew 848c36cd1e fake_client: track players & handle disconnects
Add in-memory remote player state tracking and disconnect handling to fake_client.py: validate and store transform packets by playerId (position, angle, movementType, cellId, worldspaceId, clientTime, serverTime, lastReceivedLocalTime), print readable per-player summaries, and remove players on disconnect packets. Also add warning/log helpers and route packets to the new handlers. Update server/README.md and docs/dev-log.md to document the new behavior, test results, and next steps (clientTime verification and disconnect broadcasting).
2026-05-31 19:19:18 +12:00
andrew 32ed2aeedb Update dev-log.md 2026-05-31 19:10:04 +12:00
andrew bdbe5d7ac0 Add server broadcasts, fake client, timestamps
Enable transform broadcast testing and time syncing: server now assigns incrementing player IDs, sends a welcome packet with playerId and serverTime, and appends serverTime/playerId to incoming transform packets before broadcasting them to all other connected clients. Added thread-safe client tracking, send_packet helper, client removal on send errors, and improved logging. Plugin now includes a clientTime timestamp in transform packets. Added server/fake_client.py to receive and print welcome and broadcasted transform packets, and updated server README and dev-log with usage and test notes.
2026-05-31 19:06:58 +12:00
andrew 4d43ecfc6c Include movement/cell/worldspace in transforms
Extend transform packets to carry movement metadata and optional cell/worldspace IDs. Public API updated (SendTransformPacket signature) and implementation now formats movementType, cellId and worldspaceId when present (buffer size increased and formatting safety checks added). Player tracking in main.cpp now computes PlayerLocation, detects cell/worldspace changes and large teleports (threshold 5000), sends immediate updates with movementType="cell_change"/"worldspace_change"/"teleport", and preserves last-sent state. Server logging updated to print movementType and extra fields. Dev log updated with an entry describing these changes.
2026-05-31 18:59:22 +12:00
andrew b24ce17751 Add local networking and test server
Introduce a localhost-only networking milestone and a tiny Python test server to verify packet flow from the plugin to an external process. Added F4T::Networking API (include and src) which uses non-blocking Winsock to connect to 127.0.0.1:7777, send JSON newline-separated transform packets, and handle reconnect/backoff and disconnects safely. Plugin changes: call ConnectToLocalServer() at load, register DisconnectFromLocalServer on exit, and send transform packets from main.cpp when logging player movement. Build: xmake updated to include new headers and link ws2_32. Server: server/server.py implements a simple multi-client TCP server that prints parsed transform packets; server/README.md and docs/dev-log.md updated to document the test setup and results. All networking failures are non-fatal so the game continues if the server isn't running.
2026-05-31 18:50:38 +12:00
andrew 88506e0415 Rename plugin and add player position logging
Replace CommonLibF4 template identity with Fallout4Together across README, setup and xmake; update developer log with build/test entries. Implement player transform tracking in src: add PlayerTransform struct, change detection (position + wrapped Z rotation), throttling (minimum interval), and logging to Fallout4Together.log. Wire up F4SE messaging listener and a permanent task to poll on the game thread; include <chrono> and update startup log message. Add warnings for missing task/messaging interfaces and when player reference is unavailable.
2026-05-31 17:55:27 +12:00
andrew a643f86c34 Add initial docs: dev log and version targets
Add docs/dev-log.md and docs/version-targets.md to seed project documentation. dev-log.md provides a development log and template for recording setup steps, decisions, current focus, status, and next steps. version-targets.md records primary target platform and exact Fallout 4/F4SE version targets, testing notes, and compatibility guidance to ensure consistent environment for early native plugin development.
2026-05-30 18:21:02 +12:00
andrew f248b6f99f Files / folder structure added 2026-05-30 18:13:54 +12:00