O'Reilly logo

Game Programming in C++: Creating 3D Games, First Edition by Sanjay Madhav

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14

Level Files and Binary Data

This chapter explores how to load and save JSON-based level files representing the game world. These level files store global properties as well as properties of all the actors and components in the game.

In addition, this chapter explores the trade-offs of using text-based file formats versus binary file formats. As an example, it discusses an implementation of a binary mesh file format.

Level File Loading

To this point, this book hasn’t used a data-driven approach to the placement of objects in the game world. Instead, the Game::LoadData function code dictates the actors and components in the game, as well as global properties, such as the ambient light. The current approach has several disadvantages, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required