Streaming Editable Procedural infinite World Canvas

(BluePrintRandom) #1

ever want to make a open world game in blender game engine?

me too…

it took me years of testing and trial and error and getting new skills but I think I have finally cracked it.

    1. I libfree the first 100 tiles on frame zero and I also create a large kdtree of points to place tiles (I can do many small ones later as needed using grid position*

    1. I use kdtree to get tiles to place, values are in order of distance.

    1. I free 8 tiles per frame and place them while ‘Firing up’ until the edge of the ‘loading bubble’ is reached,

    1. I then flip the order of the kdtree return data so it filles from the outside edge in instead of out and only fill 1 tile per frame dropping the logic usage considerably.

  • 5.after this point I only run the placer/generator when moving using upbge movement sensor.
    after generating a mesh it can be edited.

    1. After moving away if a tile is unloaded it is saved in a dictionary

pressing escape(at the moment)/or saving updates all active tiles positions to the save, and pickles the data.

in theory this data can be used by any game engine***

after initial loading peak logic usage is 3.5 ms for me.

Next up is the UI and the tools to place game objects, then I am moving this tool to the blender market!

expect patches later for export to unreal and unity!

(BluePrintRandom) #2

I was able to further accelerate mesh editing / meshFX using a kdtree per tile,
now we are smooth and buttery even when walking/loading/unloading and checking 9 tiles x 16x16 vertex per frame.

(pqftgs) #3

I firmly believe that whoever learns to harness your power can solve the world’s energy problem. Or at least make a dope blender game.

That’s pretty cool btw.

(JustinBarrett) #4

Agreed, this is cool…I’ve been watching this for a while now.

(BluePrintRandom) #5

Thank you!

Now with shiny new UI and “MeshFX” that will later be used for plasma damage is making a really slick looking eraser now :smiley:

(BluePrintRandom) #6

ok much of the tool UI is in, or uses the same pieces as already made,

[arrow] - changes a target vector float value based on value set in spawn code, slot = int, value = float

[Text] - update using function or set using spawn codes

[checkbox] - set intial value using spawn codes, changing value changes targeted game object prop to match own[‘Switch’]

[Slide] - Set intial value, scalar and base offset using spawn codes, and updates targeted game object on changes

tools so far
Vertex paint , sculpt, average, and undo changes-color-sculpt.

still to go -

  1. more intuitive road building tool
    2.object pick/place tool
  2. and ai route tool.

potentially more,
have any ideas?

(BluePrintRandom) #7

place object is in, checkbox in ui and display of selected item, next up is to ‘pin’ the object to the tile that owns it’s data so it will load in/out / update object properties.

(BluePrintRandom) #8

pin obj data to tiles is in and so much cleaner than my work on manic mack :smiley:
(before I was trying to catch / store/ free data in a few places, now there is only 1 load in tile/objects and free tile(updateSave), and quit.

Next up is edit placed object on grid,

(Fred/K.S) #9

I will definitely try this method on my projects !!!
AWESOME @BluePrintRandom
Your work is increadible bro.
You have my RESPECT !!!


(BluePrintRandom) #10

Thanks fred!

world position manipulator is in,
local position manipulator is next (checkbox)

then is rotate world, rotate local, and lock to grid, and maybe sensitivity.

(BluePrintRandom) #11

got a few hours in

(BluePrintRandom) #12

ok! Rot Transform system is in and rot/position inspector element.

End of 3/16/2018

(BluePrintRandom) #13

(BluePrintRandom) #14

no geo shader at work atm (just good ol instancing)

(BluePrintRandom) #15

brought in the draw, and setup physics LOD, and freed up some resources for badguys / spawning building pieces.