How do Real Time Strategy games work in PHP?

前端 未结 5 1702
遥遥无期
遥遥无期 2021-02-01 23:55

Some MMO Real Time Strategy games such as Travian or oGame are coded in PHP.

Could you briefly explain how such a game works behind the scenes ? How does the game make r

5条回答
  •  北荒
    北荒 (楼主)
    2021-02-02 00:19

    The updates are done by cron jobs most likely or another possibility is that they do it at login/any page change. Bandwidth may vary a lot, based on how active users are, how much possibilities there are, etc. I think you should measure it on localhost/test hist with example requests because it depends very much on the project.

    Also, if there'll be considerable amount of players, etc., I'd think of not coding it in PHP+MySQL but in Python&PostgreSQL, maybe even Java, or another systems.

提交回复
热议问题