Sign in to follow this  

Online beat 'em up

This topic is 4289 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

First things first, this IS an MMO I am actually working on, but before you turn away, there are some things I should explain first. 1. I am aware of the hardware requirements of an MMO, both client and server side. To allow for this, I am drastically reducing the amount of data that needs to be sent both ways. For one, in a lot of MMOs these days, movement seems to be pretty complex, with a lot of range of motion (WoW, wtf lol) up to and possibly over 256 different directions. I have 8 different directions the player can move in. While this does really make what comes across as over simplification, I don't exactly have a lot of dedicated resources. Since I don't give the player metric assloads of directions to move in, I can do one of two things now: further decrease server load by lowering the updates per second, or I could keep them the same and implement my next idea: command queuing(sp?), but I'll explain that later in the post. 2. I am aware that, even with all my reductions I have planned, that self-hosting an MMO is highly impractical. I'm not even thinking about hosting this myself. My main plan at the moment is to host a miniature version of it with a player cap of about 30 - 50 just to mess around. Given the size of the world, though, a 30 - 50 player cap would be barely noticeable. What I plan to do with the client and server is basically just toss a download online and let people do what they want with it. Now that my disclaimer is officially over, I can begin the bulk of my post. Basically what I want is help with hammering out a few ideas I'm working with in order to get a better grasp of how to implement them before I begin the bulk of coding. The first of these ideas is "command queuing". COMMAND QUEUING Basically, I thought of this idea as I was trying to further reduce the amount of information that had to be sent to and from the server, and also may allow me to implement a basic combo system. The primary idea is that the player can enter a sequence of commands (probably a maximum of 5) that would then be sent to the server in a single message, as opposed to an individual message per command. Since I'm using a single message, I could havethe game automagically find combos in the sent commands, asllowing for more elaborate attacks. The good: 1. Allows me to reduce server load by sending more information in a single message. 2. Allows me to very easily implement a combo system, furthering my goal for an MMO that rewards skill over levelling. 3. Pretty easy to implement as a whole The bad: 1. I'm using UDP, which means its possible that the message will not be recieved by the server unless I put in some sort of verification system. 2. A verification system would probably increase server load, and is one of the reasons I'm not using TCP. 3. Depending on how much I dedicate to the client, it could be VERY easy to hack. Now, that explains nicely my command queuing system, but I would like other opinions on it, and information on how I can get over some of the shortcomings. Also, if anyone here has any idea on how I can further reduce the need for levels, I'd be glad to hear them.

Share this post


Link to post
Share on other sites
Sounds like a pretty neat idea. Though, i'm not sure what you mean by directions. I'm sure most 3D games use vectors for movement. I'm no expert with network programming, but 3 floats for x,y,z = 12 bytes can't be your biggest concern while designing a protocol, or?

Share this post


Link to post
Share on other sites
Quote:
Original post by DarkZoulz
Sounds like a pretty neat idea. Though, i'm not sure what you mean by directions. I'm sure most 3D games use vectors for movement. I'm no expert with network programming, but 3 floats for x,y,z = 12 bytes can't be your biggest concern while designing a protocol, or?


Oh shit...

I thin I can see why I was stressing over that so much earlier, I totally fucked up my conversion and got 12 KILObytes.

Me for the win :(

Share this post


Link to post
Share on other sites
kinda belong in networking, no?

I dont think this system is feasable for a networked beat-them up. Im having trouble explaining why in words, altough it seems obvious to me. In networked games, only the server knows the real state of the game, every client gets a varied slightly delayed view. If I hit *punch*, the client should not be able to know if the punch landed. It send a 'punch command' message to the server, which updates the game's state and send new info to the clients, who gets to see if the punch landed or not.

So lets say I have a ping of 100ms, and that I need half a second to enter a 5 key combo. That means I will have a least a 600ms delay between hitting the first punch and seeing if it lands or not. That means every combo will have to be done "blindly". That also means that combos can't really be interrupted by the opponent.

So not practicable in a real-time game.

If its Turn-based or pseudo turn-bases, then ok, altough a TB beat-em-up sounds wierd :)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Steadtler
kinda belong in networking, no?

I dont think this system is feasable for a networked beat-them up. Im having trouble explaining why in words, altough it seems obvious to me. In networked games, only the server knows the real state of the game, every client gets a varied slightly delayed view. If I hit *punch*, the client should not be able to know if the punch landed. It send a 'punch command' message to the server, which updates the game's state and send new info to the clients, who gets to see if the punch landed or not.

So lets say I have a ping of 100ms, and that I need half a second to enter a 5 key combo. That means I will have a least a 600ms delay between hitting the first punch and seeing if it lands or not. That means every combo will have to be done "blindly". That also means that combos can't really be interrupted by the opponent.

So not practicable in a real-time game.

If its Turn-based or pseudo turn-bases, then ok, altough a TB beat-em-up sounds wierd :)





The entire game could be in a Matrix-style slo-mo....

It could be the 'slowest fast game' on the internet!!!!!


The OP needs to consider that the stripping a few bytes out of the communications will be the least of the problems of making an MMO.....

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Quote:
Original post by Steadtler
kinda belong in networking, no?

I dont think this system is feasable for a networked beat-them up. Im having trouble explaining why in words, altough it seems obvious to me. In networked games, only the server knows the real state of the game, every client gets a varied slightly delayed view. If I hit *punch*, the client should not be able to know if the punch landed. It send a 'punch command' message to the server, which updates the game's state and send new info to the clients, who gets to see if the punch landed or not.

So lets say I have a ping of 100ms, and that I need half a second to enter a 5 key combo. That means I will have a least a 600ms delay between hitting the first punch and seeing if it lands or not. That means every combo will have to be done "blindly". That also means that combos can't really be interrupted by the opponent.

So not practicable in a real-time game.

If its Turn-based or pseudo turn-bases, then ok, altough a TB beat-em-up sounds wierd :)





The entire game could be in a Matrix-style slo-mo....

It could be the 'slowest fast game' on the internet!!!!!


The OP needs to consider that the stripping a few bytes out of the communications will be the least of the problems of making an MMO.....


Yeah, because I don't know that already :P

And where did I ever say this was real time? A real time implementation of ANYTHING on an MMO scale is pretty much impossible at my skill level.

Share this post


Link to post
Share on other sites
You kind of implied it by the game genre: fighting games with significant latency suck really badly, because it's a 'twitch' genre. (In general, of course; if you have some unique gameplay ideas such that it's fun without instant response then more power to you.)

Share this post


Link to post
Share on other sites
Also, usually in an online game you want both UDP and TCP. I've heard there are better and faster implementations of TCP out there, might want to look for that. Sadly, a LOT of packets gets lost 'out there'. And while you can afford a few packets here in there when transmitting voice, you can't take the chance that critical player commands will get lost.

Share this post


Link to post
Share on other sites
Quote:
Original post by Steadtler
Also, usually in an online game you want both UDP and TCP. I've heard there are better and faster implementations of TCP out there, might want to look for that. Sadly, a LOT of packets gets lost 'out there'. And while you can afford a few packets here in there when transmitting voice, you can't take the chance that critical player commands will get lost.


Well, right now I'm messing around with Raknet, which has a REALLY nice verification system for UDP which I'm currently testing. I found a nice little way to get a system that can simulate dropped packets involves hitting a wireless router with a hammer. Things like movement and such I am sending as unverified since the info updates so often, it seems foolish to verifiy every walk command.

Custom UDP wrappers are pimp.

Quote:
Original post by Bob Janova
You kind of implied it by the game genre: fighting games with significant latency suck really badly, because it's a 'twitch' genre. (In general, of course; if you have some unique gameplay ideas such that it's fun without instant response then more power to you.)


I've got several ideas I'm messing about with that should be able to at least give some of the urgency of a fighting game like system.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
wouldnt it be possible to make a twitch style game that just responds in a slower manner? I mean, people are constantly saying you cannot do it because of lag - but look at counter strike and other games. They are fairly twitch based. You move around and click a bunch. Lets say you have a ping of 200ms. Then your updates will be sent every 100 ms to the server. That will give you several clicks that are possible each second. For a standard punch (aka knife attack in CS) this should be possible cosidering that CS even uses TCP. The problem arises when you introduce combos. Youobviously have two choices:

A) gather clicks on client side then send out "i did a combo"
B) gather click on server then send out "player did a combo"

Both obviously have thier pros and cons (if it would even be possible). The obvious flaw seems to be: in order to do a combo you must collect several peices of data in a very short amount of time and then conclude that combo is done (while determining that a basic move has not been done). This to me seems the real problem to me because of the introduced lag (er waiting) and determining if the combo was executed. Twitch play isnt the problem, twitch play with chained moves to determine combos is the real problem. With the MMO setup I would say you could not get basic twitch play (no combos). You would probably be able to pull it off with 20 or less clients.

I would like to hear other peoples ideas for doing combos in fast paced games, ive always thought this would be a cool thing to play. As for the OP, Im pretty sure you were asking about reatime, because if it was not realtime the problem is easy - send all the packets time stamped, wait a little bit, reformulate them serverside, then conclude if there was a combo.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
wouldnt it be possible to make a twitch style game that just responds in a slower manner? I mean, people are constantly saying you cannot do it because of lag - but look at counter strike and other games. They are fairly twitch based. You move around and click a bunch. Lets say you have a ping of 200ms. Then your updates will be sent every 100 ms to the server. That will give you several clicks that are possible each second. For a standard punch (aka knife attack in CS) this should be possible cosidering that CS even uses TCP. The problem arises when you introduce combos. Youobviously have two choices:

A) gather clicks on client side then send out "i did a combo"
B) gather click on server then send out "player did a combo"

Both obviously have thier pros and cons (if it would even be possible). The obvious flaw seems to be: in order to do a combo you must collect several peices of data in a very short amount of time and then conclude that combo is done (while determining that a basic move has not been done). This to me seems the real problem to me because of the introduced lag (er waiting) and determining if the combo was executed. Twitch play isnt the problem, twitch play with chained moves to determine combos is the real problem. With the MMO setup I would say you could not get basic twitch play (no combos). You would probably be able to pull it off with 20 or less clients.

I would like to hear other peoples ideas for doing combos in fast paced games, ive always thought this would be a cool thing to play. As for the OP, Im pretty sure you were asking about reatime, because if it was not realtime the problem is easy - send all the packets time stamped, wait a little bit, reformulate them serverside, then conclude if there was a combo.


I REALLY would like to send the "I did a combo" command right from the client, but naturally I would run into the issue of hacked clients sending combo after combo.

Share this post


Link to post
Share on other sites
Quote:
Original post by TheyDontCallMeMatt
combo cooldown =]


I've never liked the idea of a cooldown in games. Not to mention that the cooldown could be over by the time the player finishes inputting the combo anyways. I'm thinking more of a system where, since all combos drain player stamina, that once the stamina is fully depleted, it starts draining the other stats so that the combos are effectively less powerful than a conventional attack.

Share this post


Link to post
Share on other sites
Why does everything have to be MMO? A fighting game could easily be made to have less than 30 players and I don't think anyone would mind, they can only be fighting so many players at once. Look at Soldat, that is loads of fun and yet not MMO.

Share this post


Link to post
Share on other sites
Quote:
Original post by TheyDontCallMeMatt
but the fight might be over way before all stamina is depleted


Well, obviously some numerical balance issues would have to be resolved, but thats no big thing to fix. It'll be trial and error for a while during the beta, but I can fix it.

Quote:
Original post by ussnewjersey4
Why does everything have to be MMO? A fighting game could easily be made to have less than 30 players and I don't think anyone would mind, they can only be fighting so many players at once. Look at Soldat, that is loads of fun and yet not MMO.


Yeah, heaven forbid I want to make an MMO for my own fun, and to expose people to something I think they might enjoy.

This is as much about the fun of myself and others as it is about me fixing some of the problems I see everyday in the rampant clickfest that makes up other MMOs as well.

Share this post


Link to post
Share on other sites
So I've slightly reworked the combo execution system so that it will be a lot easier for me to balance. Basically, instead of just removing from stamina and arbitrarily adding to other stats, I'm having it so that stat value can be detracted from any battle stat, with a few other slight twists.

Enter "The Divine Fist of Crazy Punching Arm Flailing Madness"
Now, with the old stats, I would subtract an arbitrary amount from the stamina guage and let the player wail away, but last night I got to thinking. Now, I'll only add as much to another stat as I subtract from a stat.

So lets say that The DFOCPAFM has the following subtraction value:
Stamina - 5

Obviously, we subtract value 5 from stamina, and add 5 points to ATK, or add 3 to ATK and 2 to agility. We never take more than we give, so we don't get crazy high values for combos like I used to.

Expanding on that, we can also make it so that combos drain stats OTHER than just stamina. Lets say we have an attack called the "Blind Strongman". What this would do is drain everything from the players natural accuracy rating, and put it all into the attack power. So basically, we'll have a very low hit rate, but a high attack power.

Share this post


Link to post
Share on other sites
Quote:
Original post by Steadtler
kinda belong in networking, no?

I dont think this system is feasable for a networked beat-them up. Im having trouble explaining why in words, altough it seems obvious to me. In networked games, only the server knows the real state of the game, every client gets a varied slightly delayed view. If I hit *punch*, the client should not be able to know if the punch landed. It send a 'punch command' message to the server, which updates the game's state and send new info to the clients, who gets to see if the punch landed or not.

So lets say I have a ping of 100ms, and that I need half a second to enter a 5 key combo. That means I will have a least a 600ms delay between hitting the first punch and seeing if it lands or not. That means every combo will have to be done "blindly". That also means that combos can't really be interrupted by the opponent.

So not practicable in a real-time game.

If its Turn-based or pseudo turn-bases, then ok, altough a TB beat-em-up sounds wierd :)


Client side prediction means that you'll likely see you punch hit - even though it might miss. It works most of the time. In any case, what most games do is favor the client for those things - e.g, the server checks to see if you shot where YOU saw the player, not where the server sees the player. The latency issues are what cripple gameplay in MMO's though still - but only because of the security needed to prevent cheating. If you could give the client the benefit of the doubt, you'd be good to go. Unfortunately, you can't.

Nonetheless, I'd suggest trying a system where the server records it's last x number of states and then performs actions relative to the time that the client actually performs them. E.g., if you hit punch at 2:02:45:001, the server checks to see if your punch connected at the time that you hit (the update package sent from the client leaves with a timestamp). This way, the client behaves as if it's version of events is true and shows you hitting the enemy, and the server will ultimately ok this action because it checks your action against the state it has stored in memory. Barring huge amounts of server side slowdown, by the time the server checks your action, the simulation should not have advanced too far for it to still be plausible to update the results. E.g, unless you enemy teleports at the split second you attack him and the server lags for awhile, you should be able to hit punch and have the damage register before the opponent moves away.

There are lots of topics about CSP out there though along with networking in general. This is probably going to be moved, BTW.

Share this post


Link to post
Share on other sites
Quote:
Original post by Nytehauq
Quote:
Original post by Steadtler
kinda belong in networking, no?

I dont think this system is feasable for a networked beat-them up. Im having trouble explaining why in words, altough it seems obvious to me. In networked games, only the server knows the real state of the game, every client gets a varied slightly delayed view. If I hit *punch*, the client should not be able to know if the punch landed. It send a 'punch command' message to the server, which updates the game's state and send new info to the clients, who gets to see if the punch landed or not.

So lets say I have a ping of 100ms, and that I need half a second to enter a 5 key combo. That means I will have a least a 600ms delay between hitting the first punch and seeing if it lands or not. That means every combo will have to be done "blindly". That also means that combos can't really be interrupted by the opponent.

So not practicable in a real-time game.

If its Turn-based or pseudo turn-bases, then ok, altough a TB beat-em-up sounds wierd :)


Client side prediction means that you'll likely see you punch hit - even though it might miss. It works most of the time. In any case, what most games do is favor the client for those things - e.g, the server checks to see if you shot where YOU saw the player, not where the server sees the player. The latency issues are what cripple gameplay in MMO's though still - but only because of the security needed to prevent cheating. If you could give the client the benefit of the doubt, you'd be good to go. Unfortunately, you can't.

Nonetheless, I'd suggest trying a system where the server records it's last x number of states and then performs actions relative to the time that the client actually performs them. E.g., if you hit punch at 2:02:45:001, the server checks to see if your punch connected at the time that you hit (the update package sent from the client leaves with a timestamp). This way, the client behaves as if it's version of events is true and shows you hitting the enemy, and the server will ultimately ok this action because it checks your action against the state it has stored in memory. Barring huge amounts of server side slowdown, by the time the server checks your action, the simulation should not have advanced too far for it to still be plausible to update the results. E.g, unless you enemy teleports at the split second you attack him and the server lags for awhile, you should be able to hit punch and have the damage register before the opponent moves away.

There are lots of topics about CSP out there though along with networking in general. This is probably going to be moved, BTW.


:P wouldnt bother me in the least, I was going to open a thread in networking two days ago, but my router wouldn't let me access gamedev.

Share this post


Link to post
Share on other sites

This topic is 4289 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this