program that makes a randomized city

👉 BlitzCoder will be building a new platform and other plans to preserve and continue the Blitz legacy.

To be able to achieve this goal, we need your support by becoming a Patreon Paid Member 👈




BlitzCoder commented:

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

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?


BlitzCoder 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.

RemiD commented:

@Tonit79 :
take a look at this code, it may help :

Tonit79 commented:

Thanks RemiD. I study this code starting tonight.

Reply To Topic (minimum 10 characters)

Please log in to reply