Pygame Editor 1.4: use the map in a real game (1)

The new version 1.4 of the Pygame map editor comes with the first attempt to use it into an actual game called flash. Let’s see what is this about.

We will use the map stored into a game… isn’t it cool?

The video of the map maker and the game that uses the map

The code to get the map created into the game

The game is not yet ready, but with this code we take a pickle file created with the map editor and show the map in the future game. Pratically we:

  • load the tiles from imgs2 folder (load_images())
  • load the pickle file with the map
  • show the map with the tiles on the screen with show_map that iterates the list of letters and substitute each letter with a tiles in the posizion x * 16, y * 16, being each tile of 16×16 pixels (not all of them, but the most part)

 

 

Post written by Avatar A python enthusiast

Pygame map editor devlog

The devlog of the Pygame map editor. A work in progress to create a map editor to create maps with tiles with an example of a game that uses these maps. The current version is 1.5 of the map editor and 0.2 of the game, not yet ready for the 1.5 version of the editor (16.9.2020). Repository of the map editor