I am writing an online game and progressing nicely with PHP and MySQL (of course)
I need a script to run in the background that processes player positions, combat and stats etc which is getting quite long and difficult to read.
What is the best way to handle a large script? I've tried using includes but due to some looping they were getting messy and caused more errors than it was worth as I've not got an environment I can debug so I'm a notepad developer.
The script is triggered by ajax so the length of time it runs for doesn't bother me and there is no direct return to the client either.
It's just getting a bit difficult to read and manage.
Any tips?
I need a script to run in the background that processes player positions, combat and stats etc which is getting quite long and difficult to read.
What is the best way to handle a large script? I've tried using includes but due to some looping they were getting messy and caused more errors than it was worth as I've not got an environment I can debug so I'm a notepad developer.
The script is triggered by ajax so the length of time it runs for doesn't bother me and there is no direct return to the client either.
It's just getting a bit difficult to read and manage.
Any tips?