Due to all the issues resulting from the Server Update it has made me look into the code and how it is currently working and how it should be working.
I think some stuff is seems ok like I like how Composer works with the auto-loading of files and the ease of adding new packages to the list, the only issue that I do have is the overhead some of the composer packages have, I mean we may only require a small package to replace a small chuck of our code so we off load that to a set package so that we don't have to worry about that and can be rest assured that it will be kept update, I have no issues with that, the issue that I have is the packages that that package requires, what may of started off as say 2KB of PHP code now becomes 50KB or maybe more.
It was the same with the database parts of the code, we use to originally only support MySQL so we had hardcoded MySQL PHP code in the files which was fine due to we was only supporting MySQL.
But when we wanted to support other databases like MsSQL (Microsoft SQL), Postgress, Oracle and others we had to use ADODB which was great at first and was for a while until it stopped getting updated, bugs started to appear speed was reduced due to bugs and no matter what we reported to the author it was ignored, this went on for many years until we saw that ADODB was added to the Composer's packages list and did have some small changes, but we still had some issues, so we had to hack parts of the ADODB package and put it into our own local package which resolved that issue.
All the issues that we have in BNT I cannot pass the blame on all the authors of the packages that we are using, some are partly to blame, but most of the issues we have are due to our code, I am not happy about it but I can admit our code sucks and really needs to change.
We (thekabal and myself) mostly thekabal did loads of changes to the code to resolve this, I even at one point did run a version which got updated on a daily basis but had to close that game due to the amount of changes which broke a fair amount of the code until that part was completed.
To be honest I really did want to recode the entire game from scratch a while ago, and was to use completely new clean easy to read commented code.
This code was to be coded in OOP style i.e. all classed up, so anything to-do with the ship will be stored in the Ships class and all Combat related stuff will be in the Combat Class and so on.
And each of these classes if done right will load up the required sub modules (code for the classes) when they need to be used resulting in smaller files to load.
We may still use Smarty Templates for the HTML stuff in the browser, but I have plans to remove that in the future in favour to using the Unity 3D Engine.
The Unity 3D Engine is free which ticks my box
![Wink ;)](./images/smilies/icon_e_wink.gif)
The cool thing with Unity is that we could have 3D stuff added, however we are still limited to how the game works, i.e. we request a page and we get send back the result, but this isn't seen by the user playing.
So all this got me thinking about doing a complete recode the game from scratch, that game play "shouldn't" change at all, just how it works in the browser, the only issue is that the user will need to install the Unity Webplayer Plugin when it pops up.
Now me being realistic...
Its only me now, so this may be a slow process and to even make things worse as some of you are aware I have been rather ill the last few years, so there maybe days where I don't feel well enough to do any coding and stuff.
[Account, Character, Ship Table separation]
I plan to have the Account, Character and Ship information all separated to their own table in the database, this is so that when the game is reset the Account information is still available and the user only needs to login and will be told that they have no Character in the game where they then create one and then start to play the game, This will reduce the amount of emails being sent from this server.
Also having the Character and Ship information separated will allow for Multi-Ship Support maybe later on.
[Password Recovery]
This will be changed, due to the nature of the code change having the password emailed to you will be impossible, so changes will need to be done to allow the user to be able to request for a password change.
This will result in an email being sent to the users email address supplied with a link which will take the user to a page and allow them to enter the new password twice (2nd for validation) and then a 2nd email will be sent to the users email address with the new password displayed.
There is loads more that I could say, but this post is getting large as it is.