program that makes a randomized city


Tweet rated
(Posted 3 months ago) Tonit79

:-)

(Posted 3 months ago) RonTek commented:

cool thing you got here Tonit79! how about adding roads next? Welcome to the forums. cheers

(Posted 3 months ago) Tonit79 commented:

RonTek Yes. I could add roads there next. I could do it just with textures or with roadblock entities.

those cubes in the map are randomly placed, and to prevent buildings being placed on each other I made array for building coordinates but I tried to find a way how to check if an entity exists in a certain coordinates so it wouldn´t have to check the whole list of buildings for each new randomly placed buildings, this would be also useful when placing other stuff there like road blocks, because the program might become slow.

my plan for the city program is also to make the buildings from walls, floors etc instead of just cubes, but maybe I add the roads first.

But can you or anybody give me advice on my problem? How to check if an entity exists in given coordinates?

-Toni

(Posted 3 months ago) RonTek commented:

Nice! For entity checking on any given coordinate, you could do some basic collision and have a very small entity like a bullet to handle this.

(Posted 3 months ago) RemiD commented:

@Tonit79 :
take a look at this code, it may help :
https://www.blitzcoder.org/forum/topic.php?id=812

(Posted 3 months ago) Tonit79 commented:

Thanks RemiD. I study this code starting tonight.

Reply To Topic (minimum 10 characters)

Please log in to reply