• Advertisement
Sign in to follow this  

Profiling project with procedurally generated content

This topic is 2071 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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. Edited by MJP

Share this post


Link to post
Share on other sites
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. ;)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement