Friday, March 30, 2012

Getting Ahead of Myself

Here's a teaser photo of the inventory screen I'm working on.



But, I think I am getting ahead of myself. I really think this game needs multiplayer functionality, and if I do not start incorporating it soon, I'm going to have to gut a lot of code, and I don't want that.

So, I'm going to start with a new project.  My goal is to create a server based "game" where each person connected moves a dot around on screen, and that dot is moved for everyone else. Sounds exciting? No, but I've never dealt with any multiplayer mechanics though, so I'll see what happens. Anyone want to try it out when its ready?

Edit (Additional Comments): There's a lot online about lag compensation and client side prediction.  To keep the cheating down, your game should send the server the button presses and what have you, and then have the server determine where you are, what you hit, etc. This seems like a lot of work, but I think it's only really important for competitive games, especially when you don't know who you are playing with. This keeps players from telling the server "I'm here" then teleporting elsewhere and saying "Now I'm here" without the server having any say. They can also say "Hey, my health is actually full now for no reason!" and the server, if not controlling this, just accepts it. This is bad for games like Counterstrike, or Mario Cart.

For this game, I could care less if you cheat. When you play online, you typically will only be playing with up to 4 of your friends. Everyone is working together towards the same common goal. If you cheat, you lose on the experience of the game. Your friends are less likely to play with you, unless they are cheating too. If your all cheaters, then heck, more power to you. You will be drying up the fun in the game in no time.

I do, however, intend to have the server control some things that ARE competitive in a sense. Two people who think they have picked up an item just before someone else (because of the delay over the internet) can't BOTH have the item. I also have to make sure that the person who runs the server and has the fastest speed isn't the one who is taking all the loot, leaving everyone high and dry.

Again, suggestions are welcome. At the moment, I am thinking items will be assigned to a random person in the group with a timer, after which the time is up anyone can grab the item. Coin/Treasure pickup will be instant, and will not be worth anything until the end of a level. Everyone puts the treasure they picked up into a pot (more people means more treasure chests, monsters, items, etc.) at the end of a level, and then is paid out "evenly" at the end of the level. Items acquired are for keeps and can be sold for straight cash to player.

When I say paid "evenly" this depends. Before the level starts, each player will "sign a contract" which they can set the % of money they take from all the treasure they find. This starts even for everyone.  But if you have a friend who you want to catch up to the group or doesn't have as much cash to buy some items, you can adjust your own percentage down so they can adjust yours up.  You then "sign" the contract to agree. Any percentage not accounted for (players dropped their percentages without raising any others) will go to "charity". This does nothing, and you lose out on that money. So much for charity work.

3 comments:

  1. I would love to help test your multiplayer system! Also, I have some thoughts regarding treasure and money spitting, but I'd rather go into it in person. Would take way too long to try to explain it here. :)

    ReplyDelete
  2. Sure I can also help you test things, especially if it's in game maker... Any case I think as soon as you allow trading then people will abuse the pot percentages or it will become redundant. Also, why not just let separate items drop for each co-op player class specific...I so hate wasted loot drops. You could also make it like Diablo3 where each player only see items they can pick up and it doesn't become a chace

    ReplyDelete
  3. I agree. Currently I am on the route of making dropped items and cash only appear client side, similar to Diablo 3 so that no one sees the same drops. However, if a player drops an item, it will be seen by all. There will be a common storage for all of your characters, so unusable loot is not completely useless. Of course it can always be sold. However, there is a carrying cap as to how much weight you can carry, so you may think twice about grabbing everything that falls.

    ReplyDelete