Jump to content

Battlepass re-write


Recommended Posts



The battlepass system was disabled last week, instead of biting my tongue and writing a new system (properly) I attempted to re-write some of the core functions of the old system, this was not feasible was left in an incomplete state whilst I was away for my mums birthday, and had medical appointments.


Today, I removed the old system and replaced it with a new mor flexible system, but with this comes some changes, which I will address below.


  • Start and End Date
    • Previously I was trying to be clever and enable sort of "Flexible" passes, in which a pass would last from X date to X Date in the next month, this is what caused the issues, this is no longer the case a battlepass will expire now on the last day of the month regardless of whether a month has passed or not, I.E starting a pass on the 29th in some months mean it will expire at 00:00 that night (or 30th/31st).
  • Rewards
    • The way objects were previously stored was OK, except one thing, the object that held data about claimed and unclaimed were stored separately, creating large amounts of unnecessary storage to be consumed, in the re-write this has been rectified, with this I was able to remove some specifically designed systems for the battlepass.
  • Cleaner code
    • The original battle pass was around 3,500 lines of code this is now 836 Lines of code
  • Bugs that could have been catastrophic
    • Previously the battle was designed to be dynamic, however an unforeseen bug would've occurred in January which would of caused accounts to be removed completely, this has been avoided with the rewrite and a smarter system has been implemented.



Any pre-existing battlepasses are no longer active and will be deleted upon login and a new battlepass that will expire in 19 Days (as of posting) will start in its place.

Link to comment
Share on other sites

  • Create New...