• 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.
Sign in to follow this  
Followers 0
SillyCow

Lock Stepping For RTS

6 posts in this topic

I've finished my naive multiplayer implementation for my RTS game, and I've measured how many bytes I'm sending through.

The figure I got was ~70 Kilobytes-per-second for a small map (~30 units).
This is raw game data, without the added overhead of network protocols.
Since I want to use a remote game-server, this rate is unacceptable.

The technique I am using is lock-stepping. I send a message each time a unit moves from one square to another on the grid.
I've read the 1,500 archers article [url="http://www.gamasutra.com/view/feature/3094/1500_archers_on_a_288_network_.php/"]http://www.gamasutra...8_network_.php/[/url] .
I'm targeting androids, so I'm not sure it is an option. I'd probably have to clear the code of every floating point calculation I have.
And besides, it seems harder, and I'm lazy [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img].

I can probably optimize the 70 kB/s figure by a factor of 10.
But 7 kB/s is still bad for a small map on an RTS which has to link to a remote server.
I've read somewhere that Star-Craft 2 uses ~15kb/s for large maps.

So what I want to ask is:
Is lock-stepping even an option for an RTS?
Would you try to implement the same-state-simulation as described in "1,500 archers" on Android phones?
Should I try to compress (Huffman) my communications on an ARM chip allready running an RTS game? Edited by SillyCow
0

Share this post


Link to post
Share on other sites
[quote]Is lock-stepping even an option for an RTS?[/quote]
Lock step is the only option for RTS games.

[quote]I send a message each time a unit moves from one square to another on the grid.[/quote]
As I understand it you just send each player's input, not each unit's action.
0

Share this post


Link to post
Share on other sites
What is you 'tick' rate? How often do you run your 'step' logic on each client?
[quote name='AdrianC' timestamp='1344049181' post='4966022']As I understand it you just send each player's input, not each unit's action.[/quote]That's generally the point of lock-step systems, yep.
0

Share this post


Link to post
Share on other sites
A unit get's a logic step ~every 1-2 seconds. There are many other logic steps, but those are generally related to path-finding, and U don't send those.

I think I might have misunderstood what lock-step is, I'm new to multi-player.

I send each unit's action: 1 message each for each moving unit ~every second. Aside from that, game state is replicated on both machines. But only one machine does path-finding. I only send the complete state once at the beginning of the game. I thought that was lock-step.

"you just send each player's input" is what's described in the "1,500 archers" article and is what I didn't do. Is that method what is necessary?
0

Share this post


Link to post
Share on other sites
[quote]"you just send each player's input" is what's described in the "1,500 archers" article and is what I didn't do. Is that method what is necessary?
[/quote]

Yes; that's the whole point of "lock step."

[quote]A unit get's a logic step ~every 1-2 seconds.[/quote]

I don't think that's often enough, but it might be, depending on the game. Typically, your logic step rate will be between 10 and 30 steps per second in a typical RTS (if such a thing exists :-)
0

Share this post


Link to post
Share on other sites
The logic step for thr game occurs 50 times a second. A meaningful step happens only once per second per unit. A meaningful step being one that results in a message. Most other steps concern path finding and ai, which are not sent.
0

Share this post


Link to post
Share on other sites
[quote]The logic step for thr game occurs 50 times a second. A meaningful step happens only once per second per unit. A meaningful step being one that results in a message. Most other steps concern path finding and ai, which are not sent.[/quote]

If you do lock stepping, then no step will result in a message. The only thing that results in messages is user commands.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0