Multiple simulataneous games
I've been trying to get simultaneous games to work, which basically means changing a lot of static fields/methods and singleton classes to normal objects. However, I've come across something which I don't know how to solve... When a PlayerControllerHuman is asked to make a decision, it directs that decision to SGuiChoose, which will always direct it to the static GuiDesktop (or GuiMobile). But that GuiDesktop then has no idea in which game something is asked, so it can't place the dialog in the proper game window. Somehow the PlayerControllerHuman needs to know a little bit more specific to which Gui it's connected.
Which brings me to the following: this is actually what I implemented in first instance with the Gui code overhaul, but was quickly (and rightly so) removed again by Dan. The problem was that I had made a variable out of the entire IGuiBase, which is definitely not right, as that encompasses much more than a single game. However, I do believe we need some kind of variable to which a PlayerControllerHuman can direct its questions; like an IGameGui, which then gets picked up by the right screen so that multiple games don't interfere. I think we'll otherwise never get to simultaneous games (or network games, for that matter).
Any thoughts on this? Maybe any alternatives that would be less work to implement? I'm not very experienced with this kind of stuff, but right now I'm hitting a wall in coding this, so somewhere something probably has to change...
Which brings me to the following: this is actually what I implemented in first instance with the Gui code overhaul, but was quickly (and rightly so) removed again by Dan. The problem was that I had made a variable out of the entire IGuiBase, which is definitely not right, as that encompasses much more than a single game. However, I do believe we need some kind of variable to which a PlayerControllerHuman can direct its questions; like an IGameGui, which then gets picked up by the right screen so that multiple games don't interfere. I think we'll otherwise never get to simultaneous games (or network games, for that matter).
Any thoughts on this? Maybe any alternatives that would be less work to implement? I'm not very experienced with this kind of stuff, but right now I'm hitting a wall in coding this, so somewhere something probably has to change...