How to make a Map editor in Pygame – MEPygame 2.1

I am making map editor for Crystal of time by Smelly frog. (Previous post with version 1.6)

MEP stands for Map Editor in Pygame, a map editor for videogames made with tile that I am building.

Some gameplay with the maps made with the editor

Collect the crystals to avoid going out of time.

In the editor you can add the crystals with the middle mouse button click. The arrows tiles can make you jump. In the new version you got the tiles at the bottom, so that you can pick them at ease. The left button click of the mouse makes you choose a tile from the bottom and with the left button you can place is in the area of the game. Wi the right click of the mouse you delete the tiles from the scene.

I build it around a game by Smelly Frog, called Crystals of time, but I want to make it suitable for as many games as possible of this kind. It generates a file called levels2.py that contains a list of tuple and into each tuple there are strings with numbers that represent each one a tile that you can use to display different layouts for your game, taking this tuples with the data about the number that stands for the tiles disposed in a grid layout. In this case the grid is 15×9. You can easily pass from one room of the map to anothere with the arrow keys, while you can add or change the tiles with a click of the mouse. First you choose a tile in the bottom of the screen and then you place it into a room. You save it all pressing s. You can also copy a room with k and copy to another room with l. You can add another room at the end pressing n. The new room will be like the last one.

In this version I put the tiles on the main screen, so that you do not have to go back and forth through 2 screens, but you got all the tiles at the bottom of the screen. Now your workflow will skyrocket and you can refine your maps for the joy of the players.

the commands

Where are the files?

Github

https://github.com/formazione/timecrystals

Icht

Original game by Smelly frog

Video tutorials about the map editors


Subscribe to the newsletter for updates
Tkinter templates
Avatar My youtube channel

Twitter: @pythonprogrammi - python_pygame

Videos

Speech recognition game

Pygame's Platform Game

Other Pygame's posts

Published by pythonprogramming

Started with basic on the spectrum, loved javascript in the 90ies and python in the 2000, now I am back with python, still making some javascript stuff when needed.