How do Real Time Strategy games work in PHP?

前端 未结 5 1704
遥遥无期
遥遥无期 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:33

    Well as user1842120 said: Travian realtime is a illusion..

    Ill simply explain how 'realtime' works in Web Games...

    Imagine there are 3 players, 2 of them are online.., P1 attacks P3, When reloading the page or changing page the script will be activated and P3 will be attacked..

    P3 is offline, He can't see the attack but it's happening., When P3 comes online P3 sees that his/her village is being attacked, Simply:

    You only 1 need one client (Online user / Browser on page) to run the game....

提交回复
热议问题