SFML community forums

Help => General => Topic started by: Stauricus on September 23, 2019, 04:38:02 pm

Title: (almost) binary space partitioning example
Post by: Stauricus on September 23, 2019, 04:38:02 pm
hello everybody
I created this small example of BSP... its not done yet, and still a little buggy. but I wanted to share and ask for opinions
i'm planning to use it in some kind of random city creator. you press spacebar and it starts partitioning:

(https://i.postimg.cc/qtTmP9zC/Captura-de-tela-de-2019-09-23-11-15-35.png) (https://postimg.cc/qtTmP9zC)

and here goes the code:
(I know most people don't like globals, but its just for testing a prototype...)
(click to show/hide)


=====EDIT=====

changed the code a bit
still produces some weirdness, but its much better. now it have streets  ;D
its kind of messy, tough. not intended for real life usage like it is, i guess.

(https://i.postimg.cc/c6SHpjkR/Captura-de-tela-de-2019-09-23-15-45-00.png) (https://postimg.cc/c6SHpjkR)

(click to show/hide)