Skip to content

Sulig/MapGenerator_So-Long

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MapGenerator_So-Long

~ Started on: 31/03/2025 ~ *** ~ Ended on: In progress

Stars Size Activity


What is this?

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

How to use it ->

You have several options:

  • Clone this repository with:

    git@github.com:Sulig/MapGenerator_So-Long.git
    

    Go 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!


Well, I cloned the repo, What I can do?

Change the Max valors of Map Width and Map Height

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

Change the HEIGHT and WIDTH of map

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.

Set the Cuantity of Items

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.

More interesting things

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


MORE THINGS IN GOING!

~ Made by sadoming ~


About

And thanks for all the maps! -----------> Map Generator for so-long project, with several tools for custom your map or just for generate random map

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors