Apian-Framework / BeamGameCode

Engine-independent C# core game code for Beam
0 stars 0 forks source link

Maybe selecting GroupType for a game should really be selecting BeamApian instance type #29

Open jimkberry opened 2 years ago

jimkberry commented 2 years ago

Currently an Apian GroupType can be selected on the fly when creating a new game, and likewise when joining an in-progress game the GroupType (which is a string naming an ApianGroupType) member of the GameInfo for it is used to select which BeamApian instance type gets created.

But the BeamApian instance type and the Apian GroupType aren't really the same thing. As it stands, a BeamApianCreatorSez, for inastance:

But a CoopApianClock would make sense with CreatorSez, too - tho maybe not quite as much. It might be good to be able to have a BeamApianCreatorSezCoopClk instance and be able to specify it as the thing to create for a game.

Also, there might be a situation where it would be useful to be able to create a custom BeamApian instance (say "BeamApianFoo") that overrides a bunch (or even just one) of the BeamApian class' virtual methods as well.

Both of these would be very useful during development to to A/B comparisons with a single build.

But it can't happen since I've got things done in such a way that it's the ApianGroup type that is specified - and gets validated.

Just in general it's wrong to be using the Apian GroupType name as the specifier to select a BeamInstance type to be created.

OTOH - this is not a pressing issue.