Skip to content

This is an very very basic example of procedural map generation

Notifications You must be signed in to change notification settings

Blize/mini-map-generation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mini-map-generation

This is an very very basic example of an procedural map generation algorithm, which was quickly coded for an procedural map generation presentation the night before. The map only consists of four blocks (5 if you count air).

Those are:

  • Stone
  • Grass
  • Dirt
  • Water
  • (Air)

Install & Run

The Project is coded in c and for rendering we use the library raylib (version 4.5). To run the project install an c compiler and install raylib. After that run following command

make

To remove the generate files from make run

make clean

Code adjustments for diffrent results

Size of map

To change the size of map just change the makros at the beginning of the c file. Altough you probably need to change the starting position of the camera, so you can see the whole map.

#define MAP_X 12
#define MAP_Y 10
#define MAP_Z 7

Chances of blocks

To change the chances of blocks like water or width of mountains go into the code (its commented)

Camera control

To enable camera control uncommented the function in the main game loop

UpdateCamera(&camera, 0);

Info

This Project was coded in 1h at home and is not good at all. Its as mentioned at top just an little example for an presentation and I am pretty sure I won't change the code later on

About

This is an very very basic example of procedural map generation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published