Dev Blog: Interaction, Admins and Vehicle Skins
#1
[Image: raw]

Hello all,

Welcome to our first dev blog, focusing on a few key features we've been working on for our relaunch. We're going to be focusing on features that look good enough to show off, so this blog isn't an indication of everything we've done over the past few months.

Topics:
Everything shown here is still work in progress and may change on release.



What took so long?

We've had a lot of complications behind the scenes, such as our new server being unstable and the inventory refactor facing several blockers. Initially we decided to delay the dev blog until we can feature the new inventory system as a headline topic, this proved to be a mistake and we're not going to be doing it again.

To go into more detail, we received our new server at the start of last month. During our testing we found that pings were significantly higher than expected and we also had the server go down a few times. This delayed our server move and resulted us spending a lot of time investigating to try and resolve the issue. We're now happy with the stability of the server, however, we have more work to do when it comes to ping and hope to do further tests once we start team-wide tests later on.

With inventory we faced issues when it comes to stackable items. The new inventory system essentially has two different types of items, stackable and unstackable. Stackable items work similarly to how items do now, with unstackable items having the ability to store unique data and much more. We're confident we have a solution for this and are currently in the process of re-working parts of the system to accommodate this better, as the system wasn't originally designed to support stackable items at all. 

While it's disappointing that we weren't able to meet our original timeframe, inventory is by far the biggest change for the relaunch with it changing hundreds of files within the game mode. Once completed we'll be able to spend resources finishing up the rest of the changes we'd like to get done and begin testing. Going forward we're going to avoid delaying the dev blogs, and instead talk about issues we're working through if we're unable to feature a key topic. Dev blogs are a new thing to us, there's definitely a lot we've learned here and we hope to improve going forward.
Pollux
Fearless Management
bork
__________________________________________________________________
#2
[Image: raw]



The interaction menu is designed to help reduce the learning curve to the gamemode, especially with the amount of commands many players need to know. Holding E on any interactable object will open up the new menu. This won't completely replace all commands, so don't worry if you're used to them instead. The aim of this system is to just provide an easier alternative system, not replace the current completely. Holding E brings up the menu, while tapping it will use the item the same way as before (for example, tapping E will open a door while holding will open the interaction menu)

The base system is complete and a few interactions have already been added to various entities, such as doors and vehicle as shown in the video. We put a lot of work into making sure the system is as intuitive as it can be, with a focus easing the new player experience. We'll be expanding on this system by adding an interaction menu to almost anything that could benefit from one over the coming weeks.
Pollux
Fearless Management
bork
__________________________________________________________________
#3
[Image: raw]

One common complaint throughout FLs history has been responses to @ calls, most of the time due to the lack of information on a player's end about what is actually happening behind the scenes. Another issue is also how admin activity is tracked, with the current method of tracking hours not providing a complete picture of what an admin may do on the server. Our solution to this is an admin ticket system we're porting over, where players send in tickets for admins to process.

Tickets are created by either sending an @ call as usual or sending a report in the F3 menu:

[Image: raw]

Once created, admins will be able to see all reports in their version of the F3 menu:

[Image: raw]

Players will be able to see when their report is claimed by an admin and be able to open up a chat window:

[Image: raw]

Staff will be able to talk to you in this window and ask any further questions, they will also have options to easily go to you or create an admin sit. All reports are also sent to our discord, which would let an admin connect if no one else is on. Our goal with this system is to provide more transparency in what is going on with an @ call you send in the server and avoid any @ calls being missed.
#4
[Image: raw]

[Image: raw]

FL hasn't had a cohesive set of vehicle skins for a while, since the old skins were lost when the content packs were overhauled. I've been spending a bit of time fixing that, starting with a generic skin for all the police vehicles. This is just the start, as we have more skins planned too.
[Image: lewis-hamilton-silverstone2022.gif]
#5
[Image: raw]

So, my specialist topic, database design and other stuff.

Current State of the Databases
So, starting where we were when I started, the databases were not in a good shape. Tables used a mix of latin1, utf8mb3 and utf8mb4 encodings, and one table still used the MyISAM engine. This sounds confusing, so lets break it down.

Character encodings are how letters are stored on a hard disk, as a series of "on" or "off" bits:

latin1 is the oldest, storing each character as 8 bits. Using this, we can store regular English characters, numbers, and some symbols, so we can store most of Danish, Irish, Italian and many other European languages.

utf8mb3 is newer, following the Unicode Standard, from 8 bits per letter, up to 24 bits per letter. This means we can store other languages, such as Greek, Hebrew and Indonesian. However, this means that some things like Emoji, Symbols and some other languages are not supported. This encoding is also deprecated, meaning that it may be removed in the future.

Finally, utf8mb4 stores letters from 8 bits to 32 bits, and supports all of the Unicode standard.

So, why do we need Emoji and Ancient Greek Numbers in our DB?
Without their support, someone who put one in their Steam name could break lots of things, such as not having their data saved, or logs which included them failing to save. An admin who put an emoji in a ban reason could have the ban fail to save.

Overall, lots of places we can fail.

Next, what is a storage engine? Again, like an encoding, it's how the database stores its data on disk. MyISAM is old, and like utf8mb3, might be removed with any upgrade; also lacking features we use, such foreign keys, and is slower than its replacement, InnoDB.


Not great, I'm sure we'll agree.
Combined onto this however, is the data that's stored.
For example, did you know that blacklists have two places where the admin's name can be stored?
Or that both clans and organisations exist in the database.

Migrations
So, how do we sort this out, while also making sure every database we have is in sync with the data it stores, and the formats it uses?

Before now, we would copy the structure of the database, and send that file to anyone who needed to make a new database, but those often got out of sync.

To rectify this, we created our migrations system. Loosely based on Laravels's migrations, these are files which run once, in a defined order, and run changes on the database. This means that instead of having to write code to ensure that the database is up to date, a developer only needs to write a new file and all the backend is handled for them.

For example, when @Arny was updating the chatbox, he had to increase the maximum size of a logging column. Instead of having to write all the code to manage that, it was a <20 line file (which could have been smaller too).

Code:
cityrp.migrations.register({
up = function(done)
mysql:RawQuery([[
ALTER TABLE
logs
    MODIFY
value1 VARCHAR(4096) NULL;
]], done)
end,
down = function(done)
mysql:RawQuery([[
ALTER TABLE
logs
    MODIFY
value1 VARCHAR(255) NULL;
]], done)
end
})

Cleanup
With that out of the way, what are we going to do? Aside from changing from deprecated engines and encodings, we are also doing a number of things to cleanup the data we store and making it easier to write code for.

For the main data table, we'll be changing how rows are keyed, for example. Currently, players are stored by their key field, which is calculated from their SteamID, but we also store both the SteamID and CommunityID, and require them to be unique (so a single SteamID can only have a single row). However, this also breaks bots, as their SteamID is "BOT", but their CommunityID is different for each bot.

Overall, we're storing 3 unique IDs, all of which are based on each-other and can be converted, but the one we're using right now breaks bots. Fixing this, we'll use the CommunityID as the key, store the SteamID while it's used in other tables, and drop the key column.

With that one change, we reduce our data storage by 1/3rd for those columns, and fix the bots issue, which makes testing easier.

Along with that, there's a number of columns which aren't used anymore. Players can have access and flags, which is how the old admin and donator systems worked, but haven't been used in years. Players used to be able to type in their own clans (mine was a mix of 3 clans), but since the clan system got added, that hasn't been used. Loading screen music state used to be stored, but since loading screen music crashes people's audio, it was removed, but the flag never was.

Conclusion
I know this isn't the most typically interesting topic, but it is a topic I love to bore people with, as by looking at what hasn't changed, you can really look back at the history of the code changes over time.
Yours
Doctor Internet;

Developer, Systems Operator,
Data Protection Officer, Business Advisor,
Server Administrator, Community Moderator
#6
I'm glad to see concrete action being taken. Here's to success.
[Image: 7EmE7CZ.png]
Have I helped you or am I friendly?
+rep
The following 3 users Like Archer's post:
  • Pollux, Doctor Internet, Ausverkauft
#7
cool :]
The following 2 users Like MrTibo's post:
  • Doctor Internet, Pollux
#8
Here's hoping we get to play FL again soon. Been playing for god knows how many years, and can't wait to get back into it. Hopefully having a management team, as opposed to a single owner, will help improve the FL game mode.
The following 3 users Like Pooples's post:
  • Doctor Internet, Pollux, Ausverkauft
#9
and i not make map dw
The following 3 users Like User 19014's post:
  • Pollux, max., tgn
#10
Update actually looks promising! I didn't realize you were working on some much, these are definitely big changes that will make the overall experience of playing FL better, my only concern is retaining older players though. While these updates will make the general experience of playing better and while I think people will likely play regardless of what you do at this point because of people missing access to play, I do hope that you have some sort of 'meat' of an update to go alongside whatever launch you do have, not that I would blame you if you didn't as it seems all of you have equally been working hard on restoring FL, but as a general consumer I think people won't get hyped over these important changes.

Also some transparency on what is happening with the rollback update you did while Conn was owner (with getting rid of farming and changing of weapons) would be appreciated. It seems that a lot of you openly stated on the forums that you weren't a fan of it but were just going with it to shoot ideas and see what stuck, I hope we get to see some of these updates returned to us as I don't think there was much of a point of removing them in the first place. Also using #teasers on the official discord again could be good, even with some things such as teasing what map the server will host upon it's return ( I see that Evoside banner and I'm side eyeing ).

As much as I personally would love to see FL switch gamemodes at some point I don't have much hope that this management is interested in that and so I have to respect that - but if you are sticking with the gm I would love to see the content be completely overhauled - there's a lot of props etc which are no longer used. I would also like to see people scout the workshop more often, a few years ago when the team was full of passive rpers there was a huge appeal with building when it came to FL - I know there's been some useful new tools added and I would love to see some added. 

All the best anyway and thanks for putting in effort with this!
[Image: f2kzlKW.png]
The following 4 users Like Divey's post:
  • Boonan, Pollux, Ausverkauft, Ludo


Forum Jump:


Users browsing this thread: 1 Guest(s)