stef van de ven
New Member
- Messages
- 9
- Reaction score
- 0
- Points
- 0
Hi all,
I am developing a browser game, this forces me to use PHP.
Because this is my first attempt to develop a game like that, I face some problems. One problem I face is that I really don't know where to put variables.
What do I mean with variables?
For example, you have a town hall and that is the middle point of your empire.
You start with a town hall level 1, maximal inhabitants of 200.
Eventually your amount of inhabitants will reach the 200 limit, to get more inhabitants you need a bigger city, a higher level of town hall. A level 2 townhall costs 500 wood.
In this text above you see a few variables;
- town hall level
- maximal inhabitants
- building costs
In the future more buildings will be released to supply for wood for example.
These variables have to be saved somewhere, that's for sure, but I don't know where and how to do that.
So,
Where do I have to save these variables? (database? / a .php file?)
How to create such files, what kind of codes do I need?
Are there any examples I can use?
Do you know a website or a book I can use for resources?
Thanks for your time!
Stef
I am developing a browser game, this forces me to use PHP.
Because this is my first attempt to develop a game like that, I face some problems. One problem I face is that I really don't know where to put variables.
What do I mean with variables?
For example, you have a town hall and that is the middle point of your empire.
You start with a town hall level 1, maximal inhabitants of 200.
Eventually your amount of inhabitants will reach the 200 limit, to get more inhabitants you need a bigger city, a higher level of town hall. A level 2 townhall costs 500 wood.
In this text above you see a few variables;
- town hall level
- maximal inhabitants
- building costs
In the future more buildings will be released to supply for wood for example.
These variables have to be saved somewhere, that's for sure, but I don't know where and how to do that.
So,
Where do I have to save these variables? (database? / a .php file?)
How to create such files, what kind of codes do I need?
Are there any examples I can use?
Do you know a website or a book I can use for resources?
Thanks for your time!
Stef