- Home /
Procedural props generated takes much of RAM?
Hi there,
I'm building a game where you need to escape from randomly generated lands meaning that even if I generate meshes (props on the island like trees, bushes, stones and rocks) via grids or make let's say 1000 spawnpoints, generate a random prop on each at Start(), then remove all those empty gameobjects the game would take up to 250mb of RAM. Note that I use low poly objects and my device can run it smoothly but I think that's way too much. Note that the island's size is fixed, and the number of props needed to be "reliable" and playable is around 1-1.5k. How could I make this to work more smoothly? I thought of disabling those props if they are not visible by the camera but it would be still there so nothing would change. If I make a prefab, then put the graph of a tree inside an empty gameobject then refer to the mesh renderer so disable it if it is not being rendered would mean to make an array of gameobjects and then enable/disable as the player moves but again there will be 1k objects, will disabling the mesh renderer help me?
I tried a few that I mentioned but the game still took about 200-250mb of ram.
I'm trying to figure out how to spawn objects around the player so it will look like there is and endlessly generated land but in fact there will be only around 20-50 objects around the main camera's view.
Any suggestions/tips are welcome and appreciated!
Thanks, Christian
Your answer
Follow this Question
Related Questions
creating a mesh procedurally 4 Answers
weird shadows in the procedurally created mesh 1 Answer
Easy way to convert a bunch of vertices to triangles or uv's? 1 Answer
minimize vertex artifacting for procedural mesh manipulations - vertex collision same object? 0 Answers
Procedurally generated mesh JS - explain the error please 0 Answers