Greetings to all in my period of life, in which I decided to take up my long-held dream. Creator's illness, or how to create my own virtual matrix, didn’t leave my mind exactly as much as I can remember. And so, after so many deferred attempts, having gathered a lot of knowledge and experience, I am glad that I take this matter seriously.
My knowledge
- HTML, CSS
- Javascript, Jquery, Ajax
- PHP, OOP
- Mysql
- Laravel Framework
Go to the point. I want to create a huge virtual city, medieval times, that will live their lives, regardless of me. I can’t afford 3D graphics, because everything will be in the form of regular graphs and numbers, and then I’ll come up with a visual shell for all of this.
The city will have small neighborhoods in which it is necessary to realize the growth of vegetation and the activity of a certain fauna.
Residents in the beginning will create in the amount of 1000 pieces. Everyone should have their daily routine, position on the map, financial operations, production and resource costs. I implement the script for unforeseen circumstances in the form of relationships, weddings, diseases, births, desires, and so on.
An important part of the implementation will be the economy - a primitive economy. Prices of goods and services will be set depending on demand and quantity.
So questions
First of all, I need absolutely any information that can help me. I will be very grateful if you direct me to what to study and what will be useful for the realization of this goal.
Question - Since my city can be divided into logical calculations on the economy, the behavior of residents, the growth and activity of the fauna, and so on, I think, and if I do not divide these processes on different servers. One server will calculate the growth of trees, the movement of deer through forests, the number of fish in the lakes, while the other server will calculate the economy. There will be some intermediate server that will collect information from the servers and transfer to the user. What do you think about it? And how would you implement communication between these servers?
Question - As you know, there is one problem with scripting languages like PHP, they die immediately after execution. And I need something that will work constantly and be engaged in a constant calculation. The first thing that comes to my mind is CRON.
I propose to simplify the whole thing for understanding to the level of Tamagotchi. There is a little man in MySQL. This man has a Field Hunger. Every second, this hunger should increase. When the hunger character is full, he must stupidly send me an email. How can I check him every second for hunger? What do you recommend?
Again, bring specifics! I want to create a world that will live its life. Take for example the Cities Skyline. If I launch the game before going to work, I will know that life is flowing there. What is at this moment, a certain character in the game woke up, got into his car, went somewhere, etc.

phpnot a normal language? In its sphere of application (web) - there will be better pluses. - Klimenkomud