Jump to content

  • Log In with Google      Sign In   
  • Create Account

Profiling project with procedurally generated content


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 AlexF   Members   -  Reputation: 166

Like
0Likes
Like

Posted 15 May 2012 - 09:41 AM

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.

Sponsor:

#2 MJP   Moderators   -  Reputation: 11770

Like
0Likes
Like

Posted 15 May 2012 - 11:52 AM

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, 15 May 2012 - 11:54 AM.


#3 Jutaris   Members   -  Reputation: 478

Like
0Likes
Like

Posted 18 May 2012 - 02:16 PM

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 Site -- My Music  -- My Ramblings -- My Game

 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!





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS