Hi!
I'm making a simple 2D-space shooter where everybody who is playing the game is cooperating on defeating an enemy population. For every enemy ship you shoot down, this population should decrease by 1, and it should increase according to some specified growth rate (1.01 per month/year/week/whatever).
What I need is to be able to report kills made in-game to a central system, and get the number of remaining individuals in the population to each device playing the game.
I plan on uploading the "kill count" in bursts to lessen the load on what ever server is getting these reports, and will use some prediction of population growth on each device so I don't have to poll the server too often to get the remaining population count.
If the problem is unclear, please let me know so I can go into more detail
I have access to a personal domain (but no possibility to run timed scripts / server side applications on this webserver), and a database. I know enough PhP to interact with the database, and can do simple arithmetics in PhP. Any good ideas to how I can solve this problem?
My current plan looks like this:
The devices report kill count once per day to a PhP script, which stores this in a database, and updates a "population-file" whenever this happens.
The devices can get the population count frim a PhP script which reads this file.
I have no idea how to fix population growth.
Any feedback is appreciated!