jkomoros / boardgame

An in-progress framework in golang to easily build boardgame Progressive Web Apps
Apache License 2.0
31 stars 4 forks source link

Allow multiple gametypes on the same server #135

Closed jkomoros closed 7 years ago

jkomoros commented 7 years ago

Delegate.Name() should return something short and distinct, like "tictactoe" or "tickettoride". Delegate.DisplayName() returns what .Name() returns today. Unique, but pretty.

/api/new/game returns the game ID and its gamename so we can redirect correctly.

NewServer(takes multiple managers. When installed, each one is interrogated for its shortname) to hook those points. They should all use the same storage.

The rendering has /game-src//main-element

jkomoros commented 7 years ago

The hardest part is figuring out how to multi-plex /game-src/main-element

jkomoros commented 7 years ago

At some point in server we need to dispatch to the right manager based on type name.

This will be much easier to play around with and make work once we actually have two example game types.

Then we'll create an examples/metaserver that imports multiples.

jkomoros commented 7 years ago

Should we include the gamename in the URL? It is useful for people to see in the url they share with friends, and it would allow the route to extract which game renderer to load.

Then just gutcheck the name that comes back with the game is the same the route thinks it will be.

jkomoros commented 7 years ago

How do I make it so that it can fall back on rendering default content?

Maybe have a render-game-view that does the importHref, but renders default content before that loads.

Also note that if we have more fragments to load, we'll need to list more of them in polymer.json

jkomoros commented 7 years ago
jkomoros commented 7 years ago

This is actually now done now that we've captured the two remaining minor things in the two new issues.