Profiling project with procedurally generated content
Members - Reputation: 166
Posted 15 May 2012 - 09:41 AM
this is my first post in these forums and i already come to you with a problem. So, I'm writing a program for my thesis on procedural content generation in games for my university.
Right now the program creates a bunch of objects which hold vertex data of ground squares as well as a seed. As these come into view (implemented view frustum culling) some string is created based on the random seed of the ground square object through a parametric L-System. Then based on that string a lot of street elements are created which hold the vertex data(DynamicVertexBuffer) of the streets on the ground square. When the square leaves view the street elements and therefore the vertex data is destroyed again.
Now to the actual problem. When those ground squares come into view the "game" stops for like half a second to a second and goes on then (although not showing me any problems with frames). Naturally I thought there must be a problem with the creation of the vertex data during the update method. But profiling showed me that most of the time is spend in the Draw() method and Update() doesn't seem at all critical.
I also downloaded the cpu profiling program Very Sleepy and profiled the game. Which showed me that the process spends a lot of time in Kernel32 waitForSingleObject or waitForMultipleObjects.
So I'm pretty new to this. I cannot even say whether this means the game is CPU or GPU bound.
If you have any clues for me I'd be very grateful.
Check out my blog, where I document my learning process in game development:
Always thankful for help.
Members - Reputation: 478
Posted 18 May 2012 - 02:16 PM
Basic Flying Rules:Try to stay in the middle of the air. Do not go near the edges of it. The edges of the air can be recognized by the appearance of ground, buildings, sea, trees and interstellar space. It is much more difficult to fly there.
Come join us for some friendly game dev discussions over in XNA Chat!