• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

j33lee

How to coordinate players on a game map

5 posts in this topic

> The game will also be entirely on the server.

That simplifies things alot.

> 1. What is an efficient method of implementing a "map" such that the locations
> of all objects and players on the map are kept track of.

For tile based games, it's usually just an array of structures, maybe with a linked list of objects on the square. For 3D games, you'll need some sort of BSP tree. The format of the data is pretty much up to you.

> 2. When an event or a change on a part of the map changes, how will we determine
> which players need to be sent data notifying them of the change?
>
> 3. Similarly, how should we send map data to a player when he or she moves to a
> new area?

There are 2 ways to do this: players know what goes on everywhere on the map (lots of unnecessary messages for remote chagnes) -or- players know only what goes on nearby (and need to access the server as they move through the world).

In both cases, tho, you'll need to send an update to every nearby player so they can draw the change.

You should check out http://www.codewhore.com for lots of documents on network game design.

0

Share this post


Link to post
Share on other sites
For such a person, developing a multi-player, client server based game, one would think that you would already know that.
0

Share this post


Link to post
Share on other sites
Hi,
I'm a newbie, and I am really stuck.
I have a few questions regarding a game map.

1. What is an efficient method of implementing a "map" such that the locations of all objects and players on the map are kept track of.

2. When an event or a change on a part of the map changes, how will we determine which
players need to be sent data notifying them of the change?

3. Similarly, how should we send map data to a player when he or she moves to a new area?
This game implementation is not screen based, in other words, the screen moves with the character. The game will also be entirely on the server.

Thanks in advance.

0

Share this post


Link to post
Share on other sites
In the 3D world there is a problem that is pretty involved to discuss. I will attempt it here.

In 3D the coordinate system has lots of coordinates. 3D usually uses floating point coordinates to determine the position of an object. When redrawing at some number of frames per second it is possible for an objects position to change during every frame. Communication of the position of every object to every other object every frame consumes a tun of bandwidth. This is why Doom could only handle 4 players in its network modes during the first version.

The problem is resolved by increasing the time between broadcasts of position data to other objects. Bandwidth goes down and the clients effectively sample the position data over time of other objects. Since this is a sample of data it is bound by all of the rules of statistics and is prone to error of some percent.

We have achieved the bandwidth reduction we are looking for but the outcome was that you could never be sure where objects were on the client side because of statistical probabilities. This is where prediction algorithms come into play. The client takes not only position data but speed data and vector data. An object moving on vector PQ at a given speed will arrive at Q in such an amount of time. Comparing that time to the refresh time allows us to extrapolate where the object should be at all points between PQ for any time t. This works wonderfully as now the position data can be generated by the client and interactivity with the object increases as statistical probabilities decrease.

The drawback here happens when the object on vector PQ decides to change to vector RS which is some angle off of PQ. If this event occurs before the broadcast time to other clients then the clients prediction algorith thinks the object is at Q after time t when in fact it is following vector RS and no where near position Q. Solving this is finding the balance between your bandwith restrictions, the broadcast interval, and a myriad of other pieces of information. I hope this helps you see the problem. There are ways to speed this up, some are effective while others are not.

In the 3D world flagging objects as immobile allows prediction algorithms to always correctly position the object with respect to its position on the server.

Having the broadcast interval shorten as a user gets closer to the object is another way to decrease the percent error of the prediction algorithm as compared to the server.

Less acceleration and more constant speed helps the prediction algorithm tremendously. The faster the object moves the larger the real position error can be over a given time. Acceleration is speed over time over time and since time is the problem in the prediction the percentage of error rises when time is factored into the equation twice. Acceleration and deceleration only exascerbate the problem inherent to the prediction algorithm.

When you see this problem to its fullest you will have a new appreciation for what games like Quake, EverQuest, Asheron's Call, Ultima Online and others are doing. Again I hope this helps you out.

Kressilac
ps If you have questions please feel free to email me. I will try to help as much as possible. Geometry books and Physics books can help the Vector math and acceleration/speed math as well.

------------------
Derek Licciardi

0

Share this post


Link to post
Share on other sites