Add single-player optimizations
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 202
- Forks
- 22
- Avg merge
- 6h 8m
- Merged PRs (30d)
- 7
Description
When playing Hypermine in single-player, there are a few things that it does that do not make sense from an outsider's perspective:
- In Windows, the first time you play it, a Windows Firewall message pops up. This could be prevented by simulating network features by doing everything in memory instead of sending TCP/UDP packets through localhost.
- Both the server and client generate chunks independently, which, in single player, means that many chunks are generated twice unnecessarily.
- The server and client's steps are timed independently, meaning that one can lag without the other, causing difficult-to-justify jerky movement.
Ideally, it should be possible to resolve the above issues without significantly increasing maintenance burden.
I don't think it makes sense to prioritize this issue until enough gameplay features are fleshed out that the codebase has stabilized somewhat, and render-distance related optimizations have been improved. This is especially true because doing this early risks single-player and multi-player code diverging, making testing netcode difficult (and easy to forget).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. First map the single-player server/client networking, chunk-generation paths, and independent step timing; then define how each optimization can share multiplayer code without increasing maintenance burden. Done means avoiding unnecessary localhost traffic and duplicate chunk generation while keeping single-player and multiplayer behavior testable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev, networking, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100