• Create Account

Need scary sound effects or creepy audio loops for your next horror-themed game? Check out Highscore Vol.3 - The Horror Edition in our marketplace. 50 sounds and 10 loops for only \$9.99!

### #Actualjeffkingdev

Posted 10 July 2012 - 10:03 PM

hplus,

Thanks for help so far!

I was talking to someone else on IRC. They seem to believe that really only RTS's use lock-step and that sports games should probably be using a server-client system.

Discussing further, he set it up like this....
Computer1
- Is Client1
- Runs the server

Computer2
- Is Client2

So each game is a client, but one of the computers runs the 'server' which is responsible for doing the AI simulations and telling the clients what to do.

Do you agree/disagree with that?

So, using your syntax, it might be something like this:

// SERVER
forever()
{
if (i_have_any_data_put_into_queue())
{
process_queue();
}

update_ai_simulation();
send_all_data_to_clients(); // ?
}

// EACH CLIENT
forever()
{
if (i_have_any_data_put_into_queue())
{
process_queue();
}

update_my_game_sim();
send_only_my_user_data_to_server();
}


Does that seem right?

Thanks
Jeff.

### #1jeffkingdev

Posted 10 July 2012 - 10:03 PM

hplus,

Thanks for help so far!

I was talking to someone else on IRC. They seem to believe that really only RTS's use lock-step and that sports games should probably be using a server-client system.

Discussing further, he set it up like this....
Computer1
- Is Client1
- Runs the server

Computer2
- Is Client2

So each game is a client, but one of the computers runs the 'server' which is responsible for doing the AI simulations and telling the clients what to do.

Do you agree/disagree with that?

So, using your syntax, it might be something like this:

[source lang="java"]// SERVERforever(){receive_packets();if (i_have_any_data_put_into_queue()) { process_queue(); }update_ai_simulation();send_all_data_to_clients(); // ?}// EACH CLIENT forever(){receive_packets();if (i_have_any_data_put_into_queue()) { process_queue(); }update_my_game_sim();send_only_my_user_data_to_server();}[/source]
Does that seem right?

Thanks
Jeff.

PARTNERS