brokilodeluxe

Members
  • Content count

    12
  • Joined

  • Last visited

Community Reputation

115 Neutral

About brokilodeluxe

  • Rank
    Member
  1. I'm designing a top down fighting game called No Quarter in XNA/C#. I've done the host/joiner architecture and it works great. The only problem is you have to know the host's ip address, so I'm trying to design a tracker that lists games you can join a la TF2.   I have a few questions:   I doubt the game is going to be really, really huge. Can I host this server on my own machine?   Are there any tutorials out there that can get me started with this sort of thing? I've already designed servers for the host machines, but making a main one that you connect to to view avaliable games seems a little more intricate. Do I have to do it in a UNIX environment? I really just honestly don't even know how to get started.
  2. Scalability issues (UDP)

    Alright, thanks for the info guys! I think I understand what to do now. Back to the grindstone.
  3. Scalability issues (UDP)

    So from what I've read, that means I should basically try to cut down on my byte size, right?   So it doesn't get all multiplicative and evil.
  4. Scalability issues (UDP)

    I'm designing an online top down fighting game with the XNA C# framework. It uses the host/joiner architecture common in first person shooter games. It's supposed to support up to 16 players.   The game works fine up to ~6 players. After that, every player besides the host (all the joiners) starts getting bad latency issues for some reason. I've had my nose in server/client code for months, and I'm honestly at a loss. Is there a certain tool besides Visual Studio that specializes in analyzing server/client communication?   The fact that the host works completely fine despite everyone else lagging concerns me. I know the server isn't getting bottlenecked since the host has a client just like anyone else, and has to communicate with it, even if it is just through the loopback address. My packet sizes also tend to stay under 1kB so I dunno. Logic is:   Game.Update: Client.Update; If you're the host: Server.Update; Server.Update: Check for inputs; Assign inputs to players; Level.Update; Send level data unreliable sequenced to all clients;   Client.Update: Check for server messages Fill in level with message data Level.Update Send input unreliable sequenced to server
  5. Sound Effects with UDP packets

    Nevermind. I figured it out. Thanks guys. You were right; just going to have to do hit collisions on the client side too.
  6. Sound Effects with UDP packets

    Let me try to elaborate a little bit. If I create an explosion object for example, I want the sound to be played once whenever it is created/first frame or whatever. This works fine for single player.   But in multiplayer, the server sends the client the list of objects to populate the level, so entities are created a whole bunch of times on the client.   This leads to explosion sounds being played numerous times until they despawn. The only other option (as I saw it) was to create a sound list and only play sounds from there, so that's why I have it set up in this way. But this leads to packet loss if you rely on the server to send it to you, which leads to sounds not being played since they get removed from the list as soon as they are played once.   I could just send a bunch of flags for each entity like a "isSoundPlayed" boolean whenever I repopulate my level, but that's still relying on the server for sound information, which would lead to the same problems I would guess.
  7. I have a little top down fighter game I've been working on that uses unreliable sequenced UDP-packet networking.   I've just started to add sound effects. Some sound effects are dependant on certain hit collisions happening (fighter hits a wizard with his sword *CLANK*). I don't have hit collisions taking place client side for cheating/performance reasons, so I have to send the sound effects somehow. My level class has a sound list that certain entities within the level populate. The level plays each sound and then removes it from the list. The server sends it's level's sound list in every packet, and the client takes those sounds and populate's its level's sound list, which are then played and removed. The problem is, with packet loss, a lot of sounds never get played. Any suggestions on how to approach this?
  8. So I've got the basic server and client set up for my game. (C# using XNA, lidgren for networking). I can connect and send/receive integers, which is great. You obviously can't typecast whole objects as bytes and transfer them, though. My game is set up (as I assume most games are) as a list of entities. Each entity has data like position, current frame, etc. that are important to drawing them to the client screens. Here are my options transferring data from server to client, unless there's a (hopefully) easier way: 1) Traverse the entity list on the server, write only data important to the client to the message, and then upon receiving the data, the client traverses the list and backwards engineers the level before drawing it. 2) For each client, draw the level on the server and somehow send the pixel data so the client can draw it (I have no idea how to do this) 3) Maybe there is a way to send whole objects in messages. Please tell me if I'm on the right track and thank you in advance!
  9. I've been working on a little top down fighter (XNA, C#) in what spare time I've had over the last month and a half. If you've ever played Bloodline Champions, its like a really dumb downed version of that. Y'know, just something me and my friends can mess around with and maybe it'll double as some decent résumé fodder before I graduate. I plan on using the "one player hosts, other players join" type of architecture. I've spent literally all day trying to wrap my head around networking and I'm just hoping to clarify a few things before I start to dive in and code. I know this is probably a premature post and I should probably do a little bit more research before I start asking for help, but I have like 13 different tabs open all discussing different specific aspects of networking and I'm getting a little overwhelmed. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] Just let me know if I'm on the right track. Here's what I -think- I know: 1) UDP is generally faster than TCP. This is part in due to the overhead packet checking/management of TCP, and partly (and most detrimentally) due to the fact that TCP halts everything in order to resend and re-receive (is that even a word) any packets that fail. Since my game is a fighting game, and latency will be very very bad, I want to use a managed UDP system. Past this, I start getting confused, so bear with me. 2) So if I want UDP, I have to manage it a little. First, I have to know if the clients are staying "connected" with the server. So I have to have a two way connection abstraction in the packet header to check against. Just to see how long its been since the client sent a packet. 3) Second, packets can't arrive out of order. If you input "W" exclusively on one frame, and then "A" exclusively on the next, you don't want the server to receive "A" and then "W". Likewise, you don't want the server sending you the game world and then sending you the game world from 4 seconds ago (exaggeration, of course). So I have to keep track of and manually order my packets in the packet header. 4) Past this, is packet loss a huge deal? As long as I keep giving both sides the most recent packet, does it matter if one slips by? 5) The standard algorithm is just taking input exclusively from the clients, using these to update the actual game world on the server, and then drawing them back to the clients' screens. Is this right? Or is that somehow inefficient? Thanks in advance!
  10. Algorithm for determining turn order in a turn-based rpg.

    Quote:Original post by stonemetal Everybody has a counter, every second add a point to their counter. When the points in their counter hits Max speed - their speed they get to go. If you want different moves to have different costs subtract that move from their counter otherwise set it to zero. This makes sense, but the counter's max couldn't be his speed value, otherwise faster characters would take longer to get to their turns. There would have to be a delay value that is inversely proportional to speed like someone else was talking about. int delay=math.floor(1/speed*100) or something. Quote:put all the characters into an array, then sort that array by the speed value, and there you have your order. of course you can go further and make the players characters take precedence over the cpus or vice versa. There would be no reason to max out your speed stat if the only benefit it gave you was going first in a battle. The way I'm thinking of it is if you were to fight a really slow boss for an extended amount of time with a super fast character, your Speedy Gonzales would have a significantly higher overall turn count comparatively.
  11. Algorithm for determining turn order in a turn-based rpg.

    Thanks, I think I understand. I tried plotting each character's turn on a clock, with the fastest character taking a turn ever ten minutes, the second fast taking a turn every 20, and the third every 25. You're saying the algorithm would basically be the minute hand going through each minute: 12:01, 12:02, etc. until it found out it was someone's turn right? Am I getting this right, because it's starting to make more sense thinking about it that way. EDIT: The only problem I'm thinking of is how to figure out what interval the algorithm should progress (what a "clock-tick" should be I guess). I guess you would take the LCD of all the entities in the battle?
  12. I'm making a flash final fantasy-esque RPG, and I'm having trouble figuring out how a character's speed attribute should affect his/her turn order in battle. The first final fantasy gives the first turn to the character with the highest speed, the second turn to the character with the second highest speed, all the way to the slowest and therefore last person. Then it just resets and goes through the list again. That's simple enough to handle, but not what I want to happen. Every other game after used the ATB system, but this is my first game and developing a smooth and working ATB system seems like something that's way too difficult for my first go around. I want turn ordered combat, but I want a character's speed to mean more in the long run. I want it to be possible for fast entities to "lap" slower entities over a long enough amount of time. I guess the best example I could give would be final fantasy tactics. I have an algorithm that currently does not work, but it's fairly elaborate so I won't post it here unless anyone needs it to help me see what I did wrong/try to fix it. Thanks