Hey.
I am trying to create a turn-based rpg game.
I want to plan out how I will keep scores, turn actions, and rankings...
First of all, I need to do alot of calculations to get the score for a player. And the rankings are based on the score of the player.
What way can I keep the scoring and ranking database design in an organized structure? I think that if the rankings are generated everytime a person browses the rankings page.... it would take too long and overload the server. I am thinking about keeping the ranking in a seperate table then the player_accounts table which I am keeping the variables that I need to use to calculate the score. I could set a cronjob to calculate the rankings of the players every 10 minutes and change the rankings table. That way when a person browses the rankings; the page is only retrieving one field from the database (rankings table).
I have never created a game before in PHP... so I am new to all this. Please bear with me lol.
Also.. I have realized that I have been using alot of nested if statements in the coding; what would be the best way to solve this problem? I do not mind them... but its just that I have heard they can slow down the performance of the application.
I welcome any advise anybody can give me about how to structure the database for a turnbased rpg game. How should I manage the turns? Any suggestions would be greatly appreciated!
Does anybody know of any good articles or tutorials about basic RPG/Turn Based php coding?
Thanks in advanced!