informa
2 min read
article

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

Studio Pixanoh LLC

Los Angeles, California
05.20.22
Combat Designer

Treyarch

Playa Vista, California or Vancouver, BC
05.20.22
AI Engineer

Question

Remote
05.20.22
Lead Level Designer (South Park)

Remedy Entertainment

Helsinki Metropolitan Area, Finland
05.23.22
Rigging Artist
More Jobs   

CONNECT WITH US

Register for a
Subscribe to
Follow us

Game Developer Account

Game Developer Newsletter

@gamedevdotcom

Register for a

Game Developer Account

Gain full access to resources (events, white paper, webinars, reports, etc)
Single sign-on to all Informa products

Register
Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Subscribe
Follow us

@gamedevdotcom

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