Phaser Tutorial – How to Load Level Data from JSON Files

When making a game there are three main areas you have to work on. In large projects each task is performed by many people, but in smaller projects you’ll have to do most of it yourself (at least 1 and 3).

1) Game programming / development. Coding the logic of your game.

2) Game asset. Artwork, music, animations. All the visuals/audio elements of your game.

3) Game content. The actual levels!

Creating the game content is usually an underestimated task by indie developers. You spend months programming and making beautiful artwork for months, only to discover that making levels for your game takes just as much time.

Making the game content can be bit simpler if you separate it from the game code itself. A common way to do it is by loading levels from external files.

The following Phaser video tutorial, part of The Complete Mobile Game Development Course – Make 15 Games shows step by step how to load level data from an external text/JSON file.

As you can see it’s quite a straightforward task!

Access the course to continue learning.

Published by

Pablo Farias Navarro

Pablo is an educator, developer and entrepreneur. Founder of Zenva, Pablo has published over 30 online courses that teach game, app and web development. Pablo has also created educational content for companies such as Amazon and Intel.

Share this article