Determining what is visible for a network client

Started by
5 comments, last by pink_daisy 15 years, 8 months ago
Greetings, You'll have to excuse my ignorance on this one. This is my first attempt at any sort of networked gameplay. I'm working on putting together a very simple 2D, top down networked game. My plan is to only transmit packets that are relevant to the client's field of view + a little of what's outside. My question is what is the process for handling different resolutions? I might have one client connected who's running 1900x1200 and another at 800x600. Is screen resolution information normally transmitted along with the 'hey I want to enter the game' information or is there another process that takes place? That seems so simple that it has me worried. Heh. Thanks!
Advertisement
you can do that, sure. that's client side info, so everytime the client changes his resolution, he needs to notify the server of his settings.

also, you have to think of the advantage a player would gain from having a higher resolution.

Everything is better with Metal.

The problem with variable resolutions in a 2d game is that 2d games draw a larger area, unlike 3d games which draw the same view space but with more pixels. Sony's 2d top-down shooter Infantry allowed this, and as a result, people who could run at higher resolutions could see a lot more of the screen. Being on a crappy computer, I was stuck with a much smaller view and often was being shot at by people I couldn't even see.
NetGore - Open source multiplayer RPG engine
Hi! I'm also working on a "simple" top down 2d network game.

I agree that the variable resolutions could make the game unbalanced...
The way I'm handling player updates is just by having my worlds be made up of separate levels (800 * 640 pixel which is also my game's resolution), and updating players if an event occurs in the level they are in and the 8 levels around them.

It may not be the most efficient system, but it saved me code headaches and it's more important for me to just get this thing finished and polish it later.
I would not display more game map info on a higher resolution screen. Either, I would scale the map I have to the resolution selected, or I would change the resolution to the defined resolution when going full-screen.
enum Bool { True, False, FileNotFound };
Thanks for the all feedback guys. I think I'm going to give the scaling thing a shot and see how that works out. Thanks again!
You could also use a "radar" to help level the playing field among players with various screen resolutions. If everyone has the same field of view on their radar then the bounding box for what information to send is the same for all clients.

In truth there is never a completely egalitarian game. Even if you lock the resolution to the same value on all clients there is still an advantage to those with better computers, or faster/lower latency networks connections, and so on.

Again a radar would give everyone access to the same amount of information.
www.ChippedDagger.com"They that can give up essential liberty to obtain temporary safety deserve neither." -- Benjamin Franklin"If opportunity doesn't knock, build a door." -- Milton Berle

This topic is closed to new replies.

Advertisement