How to make loading levels in the game?

0 favourites
  • 3 posts
From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • You may not understand what I am going to say now, but I will try to explain:

    How to make loading levels in the game, that is, I have a level editor in my game, and I need to make it so that players can export their levels and share them with players who can import them into the editor or play at this level.

    How difficult is it and is it possible?

    Tagged:

  • You need to build a string of all objects and their positions in the level, then export this string. And you need a code which will do this in reverse - decode the string and restore objects and positions from it.

    How you do this really depends on your game and the complexity of levels.

    If your level is just one tilemap, you can simply export all tiles in JSON. If your level consists of many different sprites, you can put their names, coordinates, sizes, angle and other properties into an array, and then save this array as JSON.

    If your game is grid based, you can invent some creative and compact way to save it, for example see how the chess board is saved in FEN format:

    dailychess.com/chess/chess-fen-viewer.php

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You need to build a string of all objects and their positions in the level, then export this string. And you need a code which will do this in reverse - decode the string and restore objects and positions from it.

    How you do this really depends on your game and the complexity of levels.

    If your level is just one tilemap, you can simply export all tiles in JSON. If your level consists of many different sprites, you can put their names, coordinates, sizes, angle and other properties into an array, and then save this array as JSON.

    If your game is grid based, you can invent some creative and compact way to save it, for example see how the chess board is saved in FEN format:

    https://www.dailychess.com/chess/chess-fen-viewer.php

    Thanks, I'll try to figure it out!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)