Development Blog

Where we pretend to know how to code.


BBase: Electric Bungalow

Published: 2013-10-04

Author: Santamon

This is probably going to be quiet a boring blog post for some people, especially as it’s not RP related but I though I’d share this.

I’m sure most of you have probably heard what BBase is and it’s title is relatively self descriptive of what it does, but I’ll explain what it is for those that don’t. BBase is the very core of every BB gamemode that we host - that rages from Lobby, to Surf, to RP; they all use the same core. This in turn allows simple access to common functions that are used across all BB gamemodes - such as platinum.

Over the past 2 months, I’ve been writing some core systems for it. These effectively act as a library which makes it very easy for us to create gamemodes. This includes system such as the round system, AFK system and spectate system and so forth; but this created a bit of a problem for us as we added more and more to BBase.

BBase fatty

The above diagram probably explains it best; as you can see, when we add a system, it adds flab to BBase (This doesn’t show all the systems BBase has internally). Technically, the system is always loaded, even if we’re not using it and although each system has internal ways of disabling, any functions, hooks and global tables / vars (until garbage collection comes along) are still loaded into memory in some form

What does that mean for us? Well, think about it. Would RP ever need a round System? Would Surf ever need a spectate system? Would lobby ever need an Votemap system? And yet, even though these gamemodes will never use these system, they’re still being loaded.

So, to combat this, we designed a simple solution - a module system. This means you get a core BBase which contains the likes of Amen, SQL and group management and then you tell BBase what you want to load on top of that. This means gamemodes such as RP no longer need to load the round system, AFK system…etc.

This now means we get something like this instead!

bbase mod

This now means the gamemode can choose what to load, instead of being forced to load everything. This has a number of implications for pretty much every BB gamemode out there and requires a bit of work on the gamemode for it to work with the module system. At the moment, Privateer and Deathrun are the only ones running this new shinier BBase.

This is only one of the changes we’ve made the BBase over the past2 months, Teddi and I have been hard at work performing optimisation and have reduced the server memory footprint by about 40% - 50% in some cases; some other changes include Teddi’s re-write of the entire MySQL system (which he will blog about). At the moment, our GIT change log numbers at 166 changes over the past 2 months on BBase alone with Deathrun clocking in about 110 changes.

All of this is important prep work for what we currently have planned in future.


Historical Posts