Game Design, Programming and running a one-man games business…

How the (sort-of) multiplayer will work

Ok, I need some feedback on this, and I can’t shut up about it any longer. Here are my plans for multi player GSB, and they are going quite nicely in terms of being almost playable already…

GSB is a single player game with a number of scenarios each of which has a normal, hard and expert AI fleet to fight against. You will probably play each scenario several times, trying to reconfigure your fleet each time to beat the opposition. You will also gradually unlock new races, so there will be the urge to beat every scenario with every race eventually.

However, nothing beats going up against the brains of another player. The problems with a mutiplayer version are:

  • This isnt a real-time game, so you would sit there for ages waiting for the other guy to design his fleet.
  • Indie games dont have big sales, so finding people to play against is hard.

The solution is PBEM (play by email) but WITHOUT the email. Basically it works like this:

You load up a scenario as usual, having selected your race, and probably already with a big bank of pre-designed ships from battles against the AI. You probably have an uber-fleet that kicks ass against the expert AI already. You then click the ‘challenge’ button. This takes you to a screen where you type in the username of the other GSB player (someone you know, who has the full game), and a taunt to tell them how their pathetic space fleet will be ground to dust by your mighty lasers. You click send.

That uploads a tiny data file onto my server, where it’s stored in a database. The next time your friend launches the game, and clicks ‘refresh challenges’ he/she will see your challenge, with taunt in all its glory. He/she can then download that challenge file and play against your fleet in their own free time. Eventually, they should find a fleet that beats your fleet, and no doubt they will then challenge you back.

Obviously its possible to see how many of your challenges have been beaten, and to even track how many attempts it took. There are also tons of high score and metagame possibilities, as are the theoretical possibility of me posting ‘open’ challenges’ which get sent to everyone.

This is tons of work, especially for a net-coding n00b, but it’s in and working at the server side, I’m just tweaking client-side UI code to get it to work smoothly.

Thoughts?


32 thoughts on How the (sort-of) multiplayer will work

  1. Sounds like a good idea, but let me ask a few questions:

    1) how is this different from a “scenario editor”? One player defines the enemy fleet, the other player plays against that fleet like any AI fleet. The difference is the that the designer doesn’t get carte blanche, they have a certain amount of resources to work with.

    2) any reason those scenarios couldn’t be flat files that could be sent to whoever, however? If you wanted to have a managed file drop on your server for this purpose, great, but it wouldn’t be strictly necessary.

    Thanks,
    Keith

  2. Ah, the metagame possibilities would exceed a simple filedrop, certainly. But aside from that, just to allow simple 1-on-1 matches, any reason we couldn’t just create a scenario and email the file to the opponent?

  3. There is no vital technical reason why not, but having it centralised has a lot of advantages, because I can do some decent stats tracking and see what ships and weapons are unbalanced. If every player is using certain modules or combinations and ignoring other ones, I can tell this, and then re-balance the game.
    That, and the fact that for the casual gamer, typing “Die alien scum” and clicking ‘send’ is way easier than saving out files, attaching them to emails etc.

  4. The stats tracking for your analysis is a big advantage. Ease is also a big issue; I forget that a lot of people have not achieved oneness with their file system.

    Are you thinking of a web app with db backend (could send http or web service from the client, even), or a non-web-server custom server app with db?

  5. Of course, you’re past the “thinking” stage if the code’s already there, I’m just curious since I write web/db apps for a living and my mind has been reorganized as a relational database ;)

  6. its implemented as a MySQL database on the server, and some php and the game talks directly to it using wininet. It talks to php which interfaces with the database, and wininet is used to shuffle the challenge files up and down from the server.

  7. Cool; are you extracting stats from the challenge files into the DB, or just using the DB to track the files? It’d be interesting to be able to run SQL queries to see how frequently a given module is used, or what percentage of ship space (or money, or power) is used for engines or shields or weapons, etc.

    When the challenge is beaten, will the client upload the challenger’s config? For one, it could be an auto-challenge-back to see if someone can beat the victorious fleet, for another I imagine it would be much easier when doing balance analysis if you could see both sides of the equation.

    Finally, will it be possible for you to analyze the actual battles, or would it suffice to include the initial random seed and both fleet files and re-simulate?

  8. The sever just tracks the files, and some basic data like sender and recipient. I haven’t yet got any server-side code to do stats analysis, but it will definitely happen, and I can always dump all the challenges to my dev machine and run some number crunching on it.
    Sadly the games are not (at the moment) at all deterministic, so playing a battle twice *may* result in different outcomes.
    I’m not sure if that is worth the grief required to change it.

  9. Even if they’re not deterministic you could actually run a battle between the two fleets if you had both files. I’m not sure how separated-out the rendering code is, but if you can leave that part out you could also have an auto-sim that could re-run a battle a few hundred times to see what the actual odds are in case you think a given victory was a fluke.

    But determinism would really help the whole “save a replay” idea, I imagine.

    On the server-side stats analysis, if you’d like a hand I have a fair bit of experience with php and mysql (and tons with other web/db platforms), as well as text-mining and xml (dunno what format your challenge files are in). Entirely free/volunteer, of course.

  10. It would be really cool to have you send out uber-challenges that would require multiple people to design fleets. You could have one that required 2-3 people to design fleets that would all go up against some uber-fleet of your design. Or anyone could try to create an uber-challenge and you could get awards/achievements for your single fleet fending off multiple fleets.

    Just a thought. It would add a nice bit of co-op to the game. :)

  11. Have you thought about LAN options. This looks like a great game, and would love the possibility to play with some friends “live”.

  12. “LAN” play, in the current structure, would just be exchanging challenge files directly without involving Cliff’s server. At no point would more than one player be interacting with the same battle.

    If by “live” you mean more than one player actually influencing the battle during “battle-time”, that would require a whole new layer of networking code and complexity.

    It would be cool, though.

  13. One more question… Will there be “environmental” objects or effects? Planets or black holes that could change the course of battles or what fleets should be selected? (Maybe stars that might randomly go supernova?)

  14. Great idea, since that’s what I am planning for our motocross game :)

    In our case there will also be real-time multiplayer, but for reasons mentioned there might not be many players online when you want to play. And essentially, playing against someone’s “ghost” will be the same.

    Basically, every track will have lots of uploaded replays you can compete against.

  15. 1. I think it’s okay if there’s some randomness to battle outcomes
    2. Multiplayer is a great idea and having a database with challenges is definitely the way to go.
    3. i would propose that you allow for the sending of challenges, but have all the challenges searchable and open to everyone.
    4. I think you should track each fleets wins/losses and espeically post the top 10 or whatever fleets for people to challenge (I assume that if a player downloads a fleet and loses 5 and wins 1 that you can track this as well).
    5. Great feature which gives the game some legs.

  16. Just out of interest, are the economics of supporting this feature viable?

    I looked into something similar but hosting costs and subscription rates sort of made it less appealing to a gaming audience (and to me). I’ve noticed some online gaming communities which use advertising revenue but that’s probably not too healthy at the moment.

    http://www.streetcrime.cc

    Running an online service presents different challenges might be useful to ask someone who has already been there what might happen, anyone?

  17. I am somewhat worried that watching battles over and over will quickly become a boring task, especially if there are no rewards other than beating the opposing fleet. Of course, they look absolutely stunning, but since theres no interaction involved, everything might seem the same after a few hundred battles.

  18. Few things I could think of

    1. This service can be easily implemented and hosted on Google App Engine and would cost you nothing assuming you don’t get more than 5 million hits per month. [ But you will have to code it either in Python or Java. :( ]

    2. For every fleet setting stored in your server DB, you can also provide a URL, something like http://www.gsb.com/play/some-unique-id, which can be entered in your game and the game loads that particular setting. This way you can also maintain fleet setting rank list and related stuff :)
    And this will also allow a user to use same saved configuration with multiple friends without sending setting over and over again.

  19. as far as challenges go that sounds good.

    i also was thinking about a point system where fleets get a score based on their offensive defensive capability.

    with this in place it could be used as a way of matching various fleets against each other .

    this may not be doable or even used by the player base.
    A way to watch these battles would be really cool ala spectator mode. and even cooler would be to implement a screen saver that can monitor different battles.

    of course im using the point system as a way of implementing real time play.
    the points is used to have a pre setup fleet so you enter battle and go at it .

    i envision several scenarios where you could have a mega fleet with really big points vs several smaller fleets equaling or maybe even surpassing the big fleets points regardless you would have several player vs one player and it would take the team work of the others to defeat the large fleet.

    either way real time play with a spectator system would be really cool and hopefully im not fantasizing to far out in left feild

  20. Sending static challenges doesn’t sound look fun at all to me, unfortunately. I imagined the multiplayer being a lot like the Total War series’, and waiting a bit for other players to design their army there is not an issue. Even if it’s not real time, the fun would be in designing a fleet without knowing what your opponent is going to do. Presumably no fleet is all-powerful so you’ll be second-guessing what tricks the other player will do. And then there’d be the excitement of nervously watching the battle play out in real time and commenting on it to your opponent (“Damn! I should’ve used more frigates.”, “I can’t believe your ship A got my ship B!”).

    As for the 2nd problem, I suppose we’d just have to organise matches in advance with friends or in the forum? But swapping prepared fleets for other people to crack seems more like the GSB equivalent of level editing than multiplayer.

  21. I agree with Joe: for GSB, PBEM does not sound fun at all (to me).

    Maybe players can store a bunch of fleets on the hard disk and pick the most suitable one just before a multiplayer game?

    Or, another option, the players may have a fixed amount of time (say 2 minutes), to configure their fleets before starting the game?

  22. Not sure if this has been mentioned but I would like to be able to go to a site (Gratuitous Space battles) and see a list of submitted challenges. When you win you upload your “cheapest?” solution and this is recorded for others to improve upon. Similar to Armadillo Run method…..

  23. Having re-read your blog… I notice your mention of “open” challenges.. I guess my previous comment is somewhat redundant! :)

  24. That…is an absolute stroke of masterful genius. It…it…the beautiful simplicity boggles my mind.
    Add another notch to my tally of “Reasons I follow this website waiting for the magic words ‘gone gold’ to appear.”

  25. Hi Cliffski,
    What are the server loads likely to be on this, looking at this game possibly being your most ‘mainstream'(and successfull) to date? Seperate server/backup server needed?
    re the ‘open’ comments on challanges, is it a free-for-all or will there be some kind of hierarchy in general for battle match ups?

  26. I’m hoping that the server load will not be too bad. A challenge file is only about 3 or 4k, and unless I sell 10,000 copies and have each of them issuing and retrieving 10 challenges a day or more, I can’t really see it being an issue. I have a dedicated server running positech, and it is woefully under-used right now, so I’m not anticipating mega-server overload.
    Famous last words eh? :D

  27. I like Mike’s idea. Because of the rarity, one isn’t likely to have more than one friend (if that) with this game. Being able to get a list of all challenges out there, trying them out, and submitting your own challenges with score tracking sounds like fun.

  28. I have an idea to that “offtime” challange system.

    Apart from a 1 to 1 fight with a specific player:
    How about you create a “roster” list.

    -you initially put a number of levels or variations of oposing fleets on the server,
    and the player can download them and play against them.

    -If the player beats tis oponent-fleet, the time and “special points”
    are recoded and send to the server.

    -now the player is put into a roster-list, and can see his position, and
    how much he moved up the roster.

    -the fleet of the best player is then stored as the best fleet of this “level”
    and gets rewarded as “fleet-master”.
    People can then download this one, and try to beat it, or at least move up the roster-list

    —-

    Its a nice way to let multiple players participate, without the need
    to look for a specific player
    (wich is always a problem in smaller multiplayer-games)

    Damocles

  29. Besides a ladder type system, this functionality is dying to have a “meta-game” written around it…

    I can imagine something akin to Fantasy Baseball, but with Fleets instead of teams.

Comments are currently closed.