SurviveTheNight

The server is currently offline.

Connect now using the IP mc.survivethenight.net

Internet Explorer

Internet Explorer is not supported. Please upgrade to a more modern browser.

The Backend Changes - A short update
Started by zProxxy

zProxxy

zProxxy

Administrator
Joined
07 Feb 2023
Last Seen
10 Oct 2024
Topics
34
Posts
34

Hi!

This is a thread regarding the current maintenance and backend changes.
While STN is down I thought I'd give you something to read about STN and the current backend situation since it's offline right now!

Introduction

Before I start I just want you to know:
We've NOT lost interest in working on STN nor has this project been abandoned!

STN is a somewhat RPG Minecraft server with various custom features, items, monsters etc.
Most of you probably aren't too familiar with the technical aspects behind it, so I'll introduce you a little bit to what I've been doing here.

I've split up this thread into a few parts so it's easier to navigate for you or if you only want to read certain parts of the thread:

  • Minecraft Plugins and complexity
  • Our current situation
  • The Backend Changes
  • Why is STN down and when will it be back?

 

Minecraft Plugins and complexity

Atleast some of you probably haven't coded a minecraft plugin before. The main problem with coding plugins is that coding these is pure java code above minecraft basically. You have nothing, you don't have a game engine you can work with. The only thing you can work with pretty much is a set of commands and functions to interact with the minecraft server, also known as an API.

STN itself is almost completely self-made. Our Lobby services for example only run three download plugins:

  • LuckPerms (A permissions and ranks plugin, so players have certain permissions across the entire network depending on their rank)
  • ViaVersion (A plugin which allows players to join the server even if they're joining with a newer version than the server is running on)
  • WorldEdit (Well-known plugin which allows to edit your world basically, paste in things and replace other blocks)

All of these systems run on a Cloud system (CloudNet) which hasn't been made by me either.

Everything else is coded by us - or me rather.

STN also comes with ALOT of security and background-running systems, so everything you're actually looking at works the way it does right now.

Our current situation

If you may think that everything is fine with the server because most things work as expected and those that don't work require just some minor patches: Unfortunately not.

Some pieces of code, especially code related to our STN Dungeons is EXTREMELY outdated and not coded well in any way. I've started working on this project when I was 14, so about 5 years ago from now.

Due to that and to my extremely lacking knowledge back then when it comes to Java, most of the code is poorly written and not really easy to add new features to.

I do know alot better by now, however when it comes to our Lobby systems, I basically just was too lazy to write decent code from the beginning, so the code pretty much became a mess again.

Our newest update - the early game update - was extremely painful to code: Not only because it required me to use some techniques I've never used before, but also because the Lobby code wasn't made to be extended for new features. This became an issue really fast and adding new things such as Collections require way too many lines of code to be properly implemented.
Some systems in STN are even worse as I rushed through the process of coding them instead of taking my time and thinking about what possibly could happen with it in the future and if or how we want to extend certain things or make them more customizable.

Another issue is the server performance - Accessing databases and processing their data mostly happens synchronously (It basically runs on the main thread of the server and therefore slows it down) instead of asynchronously (Runs on a seperate thread to the main thread: If anything lags out you wouldn't notice a performance drop such as bad TPS or a lagspike).

 

The Backend Changes

Backend itself is way harder for me personally to focus on and to code a proper future-proof major system like the background-running systems for STN compared to frontend.

I took a look into the general structure of our systems and immediately knew it would take a while to fix this issue.

As already said most internal systems are not coded to be extended with new features nor to be customized. Changing the drop chance of an item a monster may drop for example shouldn't require multiple changes in the code but instead only one.

Right now I'm working on our databases, adding new data to them, making them future-proof and merging your profiles to them!
It requires alot of time, especially for our system that manages all the ingame items. Items were encoded very poorly so far, aswell as them losing custom data sometimes. I won't go too much into detail with that, otherwise you'd be reading for a couple hours probably.

After the databases I can finally focus on more fun things: The overall systems.
If the databases work fine, then the rest will also work decently fine most likely. If all the data can be stored and retrieved safely, then the systems may start working and processing that data.

 

Why is STN down and when will it be back?

You may ask why STN is currently offline? Well, we are "only" doing backend changes instead of adding alot of content which may break the game, however I wasn't expecting these changes to take this long. I've already started merging your profiles to new databases, so if I'd reopen STN all of your progress you'd gain until the backend changes are fully done would be lost and I wouldn't be able to restore it.

Yes. I could merge your data again once the backend changes are done, however that is more effort than you may think and could possibly lead to some data loss.

When will STN be back? Unfortunately I can't tell. It fully depends on how the progress is going and how bad the code is that I have left to rework.

I really wasn't too motivated to work on the backend changes over the past 1-2 weeks, therefore I took a short coding break instead of writing some bad code once again that would need a rework in a couple months.
As you probably guessed: Coding on STN is not my actual job, we are not earning any money with this, this all happens in our freetime. Therefore I don't have too much time to work on this project in general and since I'm the only developer as of right now everything takes even longer.

Either way: I'm giving my best to bring back STN to all of you as soon as possible!

Once we are ready for some major testing of our backend changes, we will let you know!

 

Alright, this is it. You now got a short insight in what I'm actually doing here and why everything is delayed, aswell as why exactly we are doing these backend changes.

If you made it until here: Congratulations!

Further necessary updates on the current maintenance will be posted in the discord!

 
 
zProxxy · 6 months ago · Last edited: 6 months ago