~ Started on: 31/03/2025 ~ *** ~ Ended on: In progress
Is a Map Generator for so-long project.
It will generate for you a closed random map:
- With random width & height
- Random number of items
- Random position of player
- Random positon of exit
You have several options:
-
Clonethis repository with:git@github.com:Sulig/MapGenerator_So-Long.gitGo inside it, and ejecute
make all -
(Not ready) Dowload the executable
I will upload in a especific branch ->executable
And you will need only to execute it
with or without the number of maps desired -
(Considering) Visit my (not created yet) web for generate a map!
You can control the MAP_MAX_WIDTH && MAP_MAX_HEIGHT of the maps, just edite map_const.h included in /inc
Note
By default, the MAP_MAX_WIDTH && MAP_MAX_HEIGHT are defined with the MAX_INT definition.
MAX_INT definition = 2147483647
The values can't be more small than:
3 in WIDTH & 5 in HEIGHT
or
5 in WIDTH & 3 in HEIGHT
You can directy set the desired MAP_HEIGHT and MAP_WIDTH of the maps!
Only set that valors on map_const.h included in /inc
Note
By default, the MAP_WIDTH && MAP_HEIGHT are defined with 0
If the values of MAP_WIDTH && MAP_HEIGHT are more small than:
3 in WIDTH & 5 in HEIGHT
or
5 in WIDTH & 3 in HEIGHT
The MAP_WIDTH && MAP_HEIGHT will be random.
Just set the NUM_OF_ITEMS with diferent number, on map_const.h included in /inc
Note
By default, the NUM_OF_ITEMS are defined with 0
- If = 0 -> Number of items will be random. (Can't be 0)
-
0 -> Number of items will be that number.
In my Makefile you will encounter two variables you can edit.
- The
MAPNUM-> Number of maps to create (each one in diferent file) - The
MAPDIR-> Directory where you will encounter the file maps
Note
If you leave MAPNUM at 0, the Generator will generate at least one map
If you leave MAPDIR in some bad value, the maps will be saved in current directory
** In same directory where map_gen is allocated
~ Made by sadoming ~