I just got an email from my hosting provider that one of my scripts was taking up too many resources so they just disabled it completely without first checking with me.
This made it so that not only does the script not work anymore, but I also cannot download it or even view it to see what the problem was.
I'm super duper frustrated and trying to get into contact with them to fix it so I can get the game working again. In the mean time, please be aware that the game may function incorrectly and it might not even function at all. I'm so sorry everyone and I'll update this thread when I find out more.
Thank you for your patience.
Temporary Downtime, Hosting Provider Being Jerks Posted by Ageman20XX on January 8th, 2014 at 12:20pm Viewed 1417 Times
Posted on January 8th, 2014 at 9:37pmEdited on 2014/01/08 at 9:42pm
Posted 2014/01/08 at 9:37pmEdited 2014/01/08 at 9:42pm
Darn, not only the game crashed occasionally during a battle for me beforehand but now I can't access it at all. :,< Hoping that this issue gets sorted out somehow and can't wait for the solution to this, hopefully very soon.
I'd just like to update everyone on the status of this issue.
The script that was blocked is the one responsible for generating missions and all the robots/abilities/rewards associated with them. Because the missions are so dynamic / constantly changing and because there are so many of them, it takes up an incredibly high amount of memory and CPU cycles. This is partially by design, partially because I decided to write the game in PHP (not recommended), and partially because I'm still a fairly novice programmer (in my opinion).
The hosting provider will not unlock the script until I have revised it to use significantly less memory, so that's what I'm going to be doing for the next few days. I spent my entire night yesterday shaving off a mere 1.5MB from the script (of about 25MB at its peak). I still have a long way to go.
As you might imagine, the game is pretty much unplayable until I get this fixed. The demo mode still works because it (luckily) uses a different and much smaller script and the missions are not dynamic. Until I get this fixed/optimized, players will be unable to access the mission select menu at all and can only really use their account for posting on the community.
I'm really sorry and I promise to try and have the game back up ASAP. :'(
If your decreasing the amount of data, would that take anyway some stars? I wouldn't really mind, but there are some people who really like the new mechanic. I would protest somehow like I did with the wiki page, but I don't know how these things work, if there's like some sort of talk page, I would try, but I don't know what website or how it works. Also how would you put pictures in these comment sections? Like SpinStrike did? I've tried before but it exceeds the word limit.
Posted on January 10th, 2014 at 12:50pmEdited on 2014/01/10 at 1:12pm
Posted 2014/01/10 at 12:50pmEdited 2014/01/10 at 1:12pm
I can assure the Star Force mechanic will not be taken away or modified. It's more about the number of calculations and functions that take place when generating missions than any one mechanic or object.
As an example, whenever you select your player it sends a request for all that player's missions. Because the missions are dynamic, every single one of them will change slightly when a new request is sent and need to be regenerated from scratch. At its highest point (when a player has completed the main campaign) as many as 25 different missions may need to be generated on the spot and all within a few seconds of runtime.
To give you an idea of how much processing this actually requires, this is what needs to be calculated for each mission:
- Mission name, description, battle points, goal turns, and level - Missions records about how many times completed, failed, max points, etc. - Field multipliers, field type(s), which foreground/background image to use, and which music - Background and foreground mechas need to be decided and placed with randomized animations - The number of kind of robot masters and robot mechas need to be decided - The levels and stats of those robots/mechas need to be calculated (even more so for player battles) - Each robot needs to have their current abilities generated, which is actually a complex process based on how many times they have been defeated, which level they are, their core type, etc. - Which fusion or field star should appear and its typing (probably the least intensive part of the script)
After all that is decided, the actual HTML for the mission buttons need to be generated. The physical size of the images is not important to the script as the browser takes care of that, but the markup requires to display those images can be pretty complex and verbose which is the final kick-in-the-balls as far as memory is concerns.
So, my goal is not to remove anything but to try to streamline the way those things are generated. Stuff like making sure unnecessary data isn't loaded into memory too early, finding ways to not regenerate stuff that doesn't need regenerating, reorganizing my code to be more efficient, etc. When the game comes back it should be almost identical from your end, albeit (hopefully) a little faster.
Hopefully that helps to outline the issue. I am still painstakingly working on optimizing the script at home and I'll let you guys know the moment it's back up and working. Thank you again for your patience!
OH! And for your image question, just use the following format: [Image Tooltip] (http://domain.com/image.jpg) but without the space in between. :)
I just made a complete backup of the database in case there are any critical, game-breaking bugs, but I've spent the last several hours testing and I think I got everything ironed out. If you notice anything please either post it here or create a new topic depending on how severe or complex you think it might be. Worst case scenario I'll have to take the game offline for a few hours again and restore the backup to prevent losing progress up to this point.
That out of the way, YAY! Even if there are some hiccups in the next few days, I managed to save almost 50% of the memory! From about 26MB at its peak (it was a little higher than I initially thought) to a little under 14.5MB now. A lot of the optimizations were made to the mission-generation code, but some of them are tied to in-battle functionality as well and may benefit from a bit more stability and potentially a bit faster response time.
Again, I'm sooooo sorry for the inconvenience and I'm so relieved to be back online again. Fingers crossed I don't go over my memory limit again, but even if I do it's only because the game is getting a bit more popular. Silver lining, right? :P
Oh well... Let's hope that you can get this fixed soon. I was just playing 7 hours ago and the game was running smoother than ever, so I honestly don't know what is going on, or is your hosting provider just being a real jerk.