Algorithm for Client-Server Games

后端 未结 6 1568
谎友^
谎友^ 2021-01-30 11:59

For stand alone games, the basic game loop is (source: wikipedia)

while( user doesn\'t exit )
  check for user input
  run AI
  move enemies
  resolve collisions         


        
6条回答
  •  时光取名叫无心
    2021-01-30 12:20

    You can use almost the same thing, but the most of you logic would be on the server, you can put timers, sounds, grafics, and other UI components on the client app. Any business rule (AI,Movements) goes in the server side.

提交回复
热议问题