Skip to content

Commit

Permalink
Added a "server progress" section to track how far along the entire p…
Browse files Browse the repository at this point in the history
…roject is
  • Loading branch information
justinfarrelldev committed Aug 29, 2024
1 parent 45871d9 commit 233656f
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 2 deletions.
106 changes: 106 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,109 @@ See `CONTRIBUTING.md` for information on how to contribute to this effort. All s
## Can I Fork This Repo?

You absolutely can, so long as you follow the license in `LICENSE.md`. I am really looking forward to server-side modifications in the future!


## Server Progress

### Overall
- [x] Server deployed to Fly.io
- [x] Health check is present
- [x] Docs are present within the site
- [x] GitHub Actions set up for continuous delivery
- [x] Air added for live reloading
- [x] Task added for CLI task management
- [x] Supabase set up for local development
- [x] Supabase set up remotely
- [x] Husky set up for automatic documentation generation after each commit
- [] Health check is used in Fly.io
- [] Blue-green deploys are used in Fly.io
- [] Versioning done automatically on push to master (need to research how to do this)
- [] CTP2 version games are able to be booted into
- [] CTP2 version games are able to be completed
- [] CTP1 version games are able to be booted into
- [] CTP1 version games are able to be completed

### Accounts (/account)
- [x] Accounts can be created
- [] Accounts can be deleted
- [] Accounts can be updated
- [] Passwords can be reset
- [] Passwords can be compared to find if passwords are correct
- [] Accounts can be logged into (and will provide a valid JWT token / session for future calls) [I need to research JWTs vs session-based auth for this task]
- [] All account endpoints are rate-limited appropriately

### Lobbies (/lobby)

- [] Lobbies can be created
- [] Lobbies can be deleted
- [] Lobbies can be updated
- [] Lobby name can be changed
- [] Lobby can be "muted"
- [] Lobby can be set to "public"
- [] Lobbies will auto-close after a period of inactivity
- [] Valid accounts can connect via streams to the lobbies (via streams so chats and events can be sent in the future)
- [] Valid accounts can leave any lobbies they are in
- [] Accounts can only be in one lobby at once
- [] "Player connected" event is sent when players join the lobby
- [] Chats can be sent in lobbies
- [] All lobby endpoints are rate-limited appropriately

### Games (/game)
*Note: profiles can be changed in the game (as seen in the UI), but this should be handled client-side using the account endpoints.

- [] Games can be created
- [] Games can be deleted
- [] Games can be updated
- [] Games can be renamed
- [] Games can be "locked"
- [] Games can be set to "public"
- [] Game style can be changed
- [] Game rules can be changed
- [] Game exclusions can be changed
- [] "Add AI" endpoint should exist, but should only return 404 (since AI may be added later). This should still exist in the docs for this reason
- [] Games should allow the owner to kick players
- [] Games should allow players to change their country
- [] Games should allow players to choose their number of settlers (is this an owner-only privilege?)
- [] Games should allow players to choose their starting gold (is this an owner-only privilege?)
- [] Games should return player ping
- [] Games should be able to be started
- [] Chats can be sent in games via the lobby above (chat messages should come in through the lobby chats, not via the game endpoint itself)

### World (/world)

- [] World generation should be available (and done the same way as within the Spyroviper Edition, as checked via seeding and automated testing)
- [] Players should spawn in the same locations as the Spyroviper Edition (checked via seeding and automated testing)
- [] Chats can be sent in active games via the lobby above (chat messages should come in through the lobby chats, not via the game endpoint itself)
- [] "Space Layer" endpoint should exist, but should only return 404 (since it will be added later with the addition of CTP1 mechanics). This should still exist in the docs for this reason
- [] Endpoints should exist for ratings (overall, science, etc.)
- [] Endpoint should exist to get world pollution
- [] World is recalculated each turn in the same way as the Spyroviper Edition (for pollution, events, creating units & buildings in cities, etc.)
- [] All world endpoints are rate-limited appropriately

### GamePlay (/game)
- [] Players should be able to pass turns
- [] Games should save every turn (Supabase)
- [] Players should be able to move units
- [] Players should be able to disband units
- [] Players should be able to embark units
- [] Players should be able to fortify units
- [] Settlers should be able to settle cities
- [] Separate combat endpoint for determining victories and defeats in combat (returned immediately, but clients play out the animation - check original source code to verify how it worked in multiplayer)
- [] Special Forces units act as they do in the base game
- [] Unit movement should be the same as the base game (zone of control)
- [] Special unit actions should be able to be done (Embassies, Soothsaying, Stealing Tech)
- [] Players should be able to terraform terrain
- [] Buildings affect cities properly
- [] Wonders affect nations properly
- [] Players can build armies
- [] Players should have a "Player disconnected" event when they leave the game
- [] All channels and database handles relevant to the player should be defer-closed when a player leaves the game
- [] Clients should only be able to access information about tiles they can see (view distances)
- [] Clients should be able to see previous information they knew about for tiles they have seen before but do not see now (fog of war)
- [] Game owner should be able to end the game early
- [] When players leave an in-progress game, follow the same rules as the Spyroviper Edition (or original game version, if that code has been ripped out)
- [] All game endpoints are rate-limited appropriately

### Convenience Endpoints
- [] Great Library details should be available via a separate endpoint (/great-library)
- [] All convenience endpoints are rate-limited appropriately
2 changes: 0 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ func main() {
tollboothLimiterHealth.SetBasicAuthExpirationTTL(time.Hour)
tollboothLimiterHealth.SetHeaderEntryExpirationTTL(time.Hour)

fmt.Println("env: ", os.Getenv("SUPABASE_DB_URL"))

// Postgres
db, err := sql.Open("postgres", os.Getenv("SUPABASE_DB_URL"))
if err != nil {
Expand Down

0 comments on commit 233656f

Please sign in to comment.