• 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.

Bigshot

Synchronizing computers in a network game

2 posts in this topic

Is it possible to synchronize computers in a network game so that each computer can individually process the movement of, say a missile. For example, if one player launches a missile it will collide with a wall on their computer at the same time that it does on the other person''s computer, but both computers individually processed the movement of the missile. Does that make sense? How can you synchronize the computers? Maybe keep the frame rate the same on both? Make the faster computer go only as fast as the slower computer? Theories are good, but I''d really appreciate actual code examples. Thanks, Alex
0

Share this post


Link to post
Share on other sites
Yep, you''ve had a very good idea.... Luckily others have already baked it for you.

Read about 2-3 months down the list for a post by drone. He links to the source you could use.

The idea is simple, and independant of framerate. It all come doen to timeslices.

All you need to do is say x happened at y time then send that message to everyone. As each person recieved the message they integrate that event at the appropriate time in the past and display how the world would look should that event have happened.

It''s a VERY efficient method as all you need send is "user5 fired weapon7". It''s a little more complicated at each client end as you need to be able to have the ability to integrate things that happened say 500ms ago and forward calculate how things have changed since then.

Look up all posts by Drone about 3 months ago and any post that contains the word "Lockstep"

Drone also lists a forum on an ezboard where specific question can be asked and more info obtained.

Drone has offered his code openly, I''m still working on my code which is a little more difficult to understand as I use UDP and have to do more to make it work.

The moral of the story it, this works wonders but you have to make sure that EVERY person gets every event. This method doesn''t handle packetloss.

Good luck, it''s a good method which whips quakes ass when it comes to lag and efficiency...

gimp
0

Share this post


Link to post
Share on other sites
Good question. There are 2 possible approaches to solving the problem.

The first method is described by gimp: each host runs his copy of the simulation in lock step with the others. You tell everyone the exact time the missle was launched and it''s trajectory, and everyone performs collision checks every frame. As long as the hosts are perfectly in synch, then they will all see it hit the wall or not.

The biggest drawback of this method is that the networking is limited to the speed of the slowest host (since he must handle every network message before anyone else can proceed). This method may work for turn-based or RTS games, but probably not so well for action games.

The second method is to divide data into 2 categories: status updates and state changes. The first kind of data is just basic position and direction information for the player''s object (his character or ship), which can be sent quickly and unreliably -- giving pretty smooth motion at the cost of a little accuracy. It also includes other status information like current score, visible damage, or whatever.

The second kind of data, state changes, are actually negotiated with a "simulation authority". The simulation on this host has the final say -- he manages the creation, destruction, capture, and collision of objects in the world. He tracks the locations of everything, so when you have a potential collision, he confirms it. When 2 players aim for the same resource, he checks the timestamps of the requests, and picks the first one.

Finally, to put a spin on it, the simulation authority doesn''t have to be a single computer. You can divide the responsibility among several hosts (eg, each player controls his own zone), or pass the authority from host to host in order (eg, a turn-based game).


0

Share this post


Link to post
Share on other sites