Previous post about the browser game:
A[nother] strange idea: browser game

* * *

I learnt how to create MySQL databases from within php scripts and started the game initialization module. Next I want to create a table for grid cells and randomly populate the game map.

Plan:

  1. Populate the table based on hex coordinates
  2. Create a formula to convert from hex to Cartesian coordinates (e.g. for distance calculations).
  3. Create a script to plot them on the screen.

Ideas here:

  1. Cells might be divided into inhabitable (with different humidity, sunlight and minerals) and non-inhabitable.
  2. “Desert” would correspond to zero humidity or zero minerals, and be good only for sunlight. “swamp/river/lake/sea” would be good for water and/or minerals only. Non-inhabitable cells will be exploitable by a player, if they are adjacent to the player’s plantation.
  3. Possible types of cells, ranges of parameters and frequencies of appearance are to be stored in “constants.php” and used by “init.php”.

Another problem is security. Who will run init.php? How to protect it?

* * *

Followup posts on the game progress:

Leave a Reply