• entries
122
246
• views
90809

# In a rush

117 views

Not so much progress as I been spending a bit of time at dance practice. Nonetheless, Ive got basic random town creation. At the moment its very basic, you give a radius, center,number and disc thickness and it populates the scene with the selected model, filling the disc or if you chose rectangular the border the thickness limits it to. Right now stuff is being place on top of each other, I want to turn it off for some buildings as it dont look too good.

Im thinking that for each object being placed send a ray from its position and see if it intersects or picks some triangle in the scene, if so then check if the bounding volume of the picked object intersects its own. If intersection is not allowed then the building will not be placed.
[source lang = "python"]import map_interfacet = map_interface.terrain()o = map_interface.objs()tex1 = t.load_texture(engine,".\\textures\\Stone_Sample_002.JPG")plane = t.Create_Terrain_with_plane(engine, width = 3000, height = 3000)plane_node = t.Add_Terrain_to_scene(engine, plane, tex1)engine.terrain.Add_Sky_Box(".\\textures\\sk5n.bmp", ".\\textures\\sk5n.bmp",                   ".\\textures\\sk4n.bmp", ".\\textures\\sk2n.bmp",                   ".\\textures\\sk1n.bmp", ".\\textures\\sk3n.bmp")                   house = o.Load_Mesh(engine, ".\\models\\house 1\\house1.x")house2 = o.Load_Mesh(engine, ".\\models\\house f\\fachwerk12_LOWPOLY_TS.3ds")o.Add_Animated_Entity(engine, handle = house)engine.entities.Populate_Scene_with_object(house,5, 1500,1500,40)engine.entities.Populate_Scene_with_object(house2,20, 1500,1500,0.4)

## 1 Comment

Those screenshots look interesting. nice work.

## Create an account

Register a new account

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.