Profiling project with procedurally generated content

Started by
1 comment, last by FalconDragoon 11 years, 11 months ago
Hello everybody,

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.

so long
AlexF
Student of Computer Science - Digital Media and Games

Check out my blog, where I document my learning process in game development:
http://nighttimedeve...nt.blogspot.de/

Always thankful for help.
Advertisement
If it's half a second it's probably not GPU time...my guess would be the driver allocating resources or something like that.
An important thing to ask here would be what's actually IN the Draw method. Just because it's named Draw doesn't mean it's filled only with code to control the GPU. ;)

My Games -- My Music 

Come join us for some friendly game dev discussions over in XNA Chat!

This topic is closed to new replies.

Advertisement