Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About Silenex

  • Rank
  1. Silenex

    Multiplayer syncing logic

    Now that I think about it, because most of the timing inconsistencies are likely to be very small, in most cases the compensation probably won't even be noticeable. I'll try implementing this idea and report back how it goes. Thanks for your help.
  2. Silenex

    Multiplayer syncing logic

    The game has a fairly low frame-rate, about 10FPS. Maybe I misunderstand what an "authoritative server" is. In my case, the client is pretty intelligent, but the server ultimately has last say over everything. For example, the client keeps track of the map and determines where they can move. A client doesn't wait for a response from the server to tell it can move. If it thinks it can move, then it moves. However, the server will check that it can in fact move before it relays that command to the other clients.
  3. Silenex

    Multiplayer syncing logic

    There is an authoritative server. Is lock step common solution to problems like this? Or does it introduce too much latency. What exactly is "predictive movement" can you explain the idea behind that?
  4. Silenex

    Multiplayer syncing logic

    I can think of a few possible solutions, but I don't feel like any of them are the best solution. I'm just not sure. Here are a few of my ideas: When a new movement command comes in, regardless of the current position of the animation just put it at the end. This might make animations look broken even under short periods, I'm not sure. Similar to the last one, except just speed up the animation. This seems like a bad idea. A queue where each animation is completed in its own time and the next one played afterwards. The only problem I see with this is if things get very backed up the user could be seeing things potentially seconds in the past, which isn't very good.
  5. I'm a fairly experienced programmer, but not too much of a game programmer, but I'm learning.. I'm developing a simple tile based game demo. Players can move from one tile to the next, but can't be between tiles. There's a smooth animation between tiles of about 500ms. The problem comes when implementing networking to the game. Imagine a client gets a message to move a certain player to some tile, and then it gets a message to move that same player before the previous movement is completed, even if only a few ms before it's done. What's the typical approach to mitigating these differences? Previously I attempted a type of "action queue" system. Where actions of stored in a queue and played one after another, but I'm unsure if that's the best approach. I ran into some troubles with it, so I'm assuming it's a bad idea. What's the typical approach to mitigating small differences like this?
  6. Silenex

    Walking - Logic

    The formatting makes it seem so at a glance. At any rate, my advice stands. There's not really enough information to guess what might be wrong. I have no idea what your animate or move functions do or how you detect that you've reached a new tile and what you do then. Who knows, maybe the animation itself just doesn't loop seamlessly. There's nothing really special to game development in this case, if you're an experienced programmer then bring your standard deductive reasoning skills to to bear =P [/quote] Oh, I see how you could have been lead to believe that now. The else condition on the statement only applied to this line: left_key_down_frames = 0; I have a few new ideas, so I'll try some things.
  7. Silenex

    Walking - Logic

    I understand what you're saying, but I'm fairly set on this control mechanism, and yes I have seen it in other games. The problem with your solution is that users can't be permanently be in between tiles. A player must be on a specific tile while they're stationary. The only time a user can be in between tiles is when they're in the process of walking between two tiles. Perhaps a demo of what I'm talking about will makes things much more clear: http://dev.rakuhana....NVAS/wut/pc.php (You'll have to be using a newer browser that supports canvas, preferably chrome). As you can see, the turning mechanism works pretty good, but when you hold down a key and walk for multiple tiles there's an ever so slight pause between tiles. And yeah, the code is pretty hacky at the moment.
  8. Silenex

    Walking - Logic

    The movement doesn't start after the button is released. It starts while the button is being pressed. I know my method doesn't work. I'm not a very experienced game developer and it's the small things like this that get me stuck. What I want to happen: If the button is pressed for a short period of time it will just turn the user. If the button is held for a longer period of time it will move the user continuously between tiles, without a short pause between tiles.
  9. Silenex

    Walking - Logic

    Sorry I wasn't clear. The player does move incrementally, it's a smooth animation during which there's also a walking animation played on the character. The reason there's a 6 frame delay for walking is because there's also the ability to turn in place. I didn't include that in the pseudo-code, but basically any pressing of the key less than 6 frames long will simply turn the player in place rather than move them.
  10. I'm a fairly experienced programmer, not particularly in games, but anyway, I'm trying to accomplish a simple task and I'm having trouble with it. The concept is straightforward: I have a tile based game and moving with the arrow keys moves you in 1 of four directions. I also have animations sequenced with these movements. Seems very simple, right? Well the problem that I'm running into is that I want the animations between tiles to be very smooth when continuously walking, for example holding down the arrow key for several tiles. Currently, at best I can get a short pause between tiles. I know the problem must be that I'm simply not a very experienced game developer so I'm probably going about it all wrong. I would really appreciate it if someone could give me some pseudo code and explain the general process that this should be done. Here's what I'm basically attempting right now (pseudo code, will write code for only 1 key, to simplify it) // called every frame function () { if(left_key_down) ++left_key_down_frames; else left_key_down_frames = 0; if(left_key_down_frames > 6) player.walk() } player.walk function() { if(!player.canWalk) return; // player can't walk player.move(movement_finished_callback()); // move player to correct place player.animate(); // animate the frames accordingly.. } movement_finished_callback function() { player.canWalk = true; }
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!