This is a really simple and not efficient level Maker to build levels.
you have to run the main method in FileParserFacotry.java with your idea and respond to all the questions. it's painfully slow but less than doing it by hand on a paper I guess.
I added level11.level as an example for where to put the level when finished.
To access it you have to do: `new File(getClass().getResources("level11.level").getFile())` and put it into `FileParserFactory.loadMapFromFile(File f)`
Co-authored-by: Debucquoy <debucqquoy.anthony@gmail.com>
Co-authored-by: Anthony Debucquoy <debucquoy.anthony@gmail.com>
Reviewed-on: #36
Reviewed-by: Mat_02 <diletomatteo@gmail.com>
Just adding a color field to pieces for drawing later
Carefull when you review, I also moved Vec2 to Utils where I feel it belong.
Solve #29
Co-authored-by: Anthony Debucquoy <debucquoy.anthony@gmail.com>
Reviewed-on: #31
Reviewed-by: Mat_02 <diletomatteo@gmail.com>
This generate maps following a simple structure
First we choose map size depending on the difficulty
we grind the edge with a random pattern so the map is not just a square
we pick a random open piece and try to make a piece out of it between a size of 1 to 3
and we do this in a loop until all open spaces are filled
this is not the best but it's efficient
known problem:
- We can have sometime a lot of small pieces
- We can have weird shape, for instance pieces that are only connected by corner
I think this is technically not a problem in the end. but this could be changed
Co-authored-by: Debucquoy <debucqquoy.anthony@gmail.com>
Reviewed-on: #34
Reviewed-by: Mat_02 <diletomatteo@gmail.com>