Skip to content

djad04/2dMapEditor

Repository files navigation

2D Map Editor

A small SDL2-based tilemap editor. Use the menu to view or edit maps, navigate with the arrow keys, open the palette (P) and paint tiles with the mouse.

demo

Build & Run (Windows / PowerShell)

Prerequisites:

  • A working g++ toolchain (MinGW or similar) available in PATH.
  • SDL2 development files placed in the sdl2 folder of the project. This repository includes sdl2/include and sdl2/lib and a sdl2/bin folder with DLLs.

Steps:

  1. Create the build folder (if it doesn't already exist):
mkdir build
  1. Copy the runtime DLLs and any helper files from sdl2/bin into build so the executable can find SDL at runtime:

  2. Copy the map files into the build folder so the editor can find them (maps in this repo are named like map*.txt):

Copy-Item -Path .\map*.txt -Destination .\build
  1. Build the application from the project root (this compiles the main sources and links against SDL2, SDL2_image and SDL2_ttf):
g++ main.cpp mainView.cpp menu.cpp error.cpp -o build/main.exe -I sdl2/include -L sdl2/lib -lSDL2 -lSDL2main -lSDL2_image -lSDL2_ttf
  1. Run the built executable from the build folder:
.\build\main.exe

After the build step the application binary will be in the build folder along with the SDL runtime DLLs and the map files.

About

A small SDL2 based tilemap editor. Use the menu to view or edit maps, navigate with the arrow keys, open the palette (P) and paint tiles with the mouse

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages