informa
/
2 MIN READ
Blogs

Of Large Levels and Small Devices

One of the fun things we get to deal with while developing the Fixbot game engine is management of the iPhone's short-term memory.

"I suffer from short-term memory loss. It runs in my family. At least I think it does..." Speaking of which, one of the fun things we get to deal with while developing the Fixbot game engine is management of the device's short-term memory. iDevices have a very small amount of short-term memory compared to desktop computers or consoles. While it is not uncommon for a PC/Mac game to require upwards of 1GB of RAM these days, iOS apps are hard pressed to get 20MB without running the device out of memory. This presents a slight problem for games like Fixbot, whose levels can exceed 10,000 x 10,000px. As you can imagine, an image this size would consume quite a bit of memory.

In addition to the sheer memory usage of this image, there is another problem that needs addressing. Fixbot, like most other iOS games, used OpenGL to handle rendering. This imposes a texture size limitation of 1024x1024 or 2048x2048 (this limitation is device-specific). In order to handle levels up to 10 times this size, we specially designed our level editor to split the levels up into multiple images. The location of each "chunk" is then written to the level file so that the game engine knows where to draw each piece.

As previously noted, we don't have enough memory to keep the entire level loaded in memory, even if it is chunked up into manageable textures, so the engine has to be smart about which textures it keeps around and which get unloaded. We're still deciding on the proper balance for each device, but the game engine basically checks where the player is periodically and then makes sure that all chunks within about a 3x3 screen block (with the player in the middle) stays loaded. Everything else is "forgotten" as quickly as those random facts after the history test :)

Reposted from Fixbot Blog: http://demergostudios.com/fixbot/

Latest Jobs

IO Interactive

Hybrid (Malmö, Sweden)
3.02.23
Gameplay Director (Project Fantasy)

Arizona State University

Los Angeles, CA, USA
2.27.23
Assistant Professor of XR Technologies

IO Interactive

Hybrid (Copenhagen, Denmark)
3.02.23
Animation Tech Programmer

Purdue University

West Lafayette, IN, USA
3.02.23
Assistant Professor in Game Design and Development
More Jobs   

CONNECT WITH US

Explore the
Advertise with
Follow us

Game Developer Job Board

Game Developer

@gamedevdotcom

Explore the

Game Developer Job Board

Browse open positions across the game industry or recruit new talent for your studio

Browse
Advertise with

Game Developer

Engage game professionals and drive sales using an array of Game Developer media solutions to meet your objectives.

Learn More
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more