Archives for: April 2011

04/29/11

Permalink 01:48:53 am, by jdunlap Email , 243 words   English (US)
Categories: City Builder

Thought it was going good...

After my last entry, complete with a video of the engine running on the PC, I took a day or two off before trying to run it on the 360.  Eagerly anticipating the great results that I had seen on the PC, I fired up XNA Studio Connect, set my target in VS 2010 to XBox 360, and pressed the run command.  Everything looked great, until I got into the actual terrain rendering portion.  The framerate crashed (or so I was assuming.)

That was when I realized that I had no frame rate counter on the game, so I quickly coded one and ran it on the PC.  I was getting 59 FPS on the PC.  I ran it on the XBox, and my frame rate dropped to 14 FPS.  I then started my journey into multi-threaded programming.  I attempted to run the ROAM algorithm on one thread and then update the buffers when it was complete.  It still ran at 59 FPS on my PC.  The XBox had improved to about 35 FPS, which I could live with except that it would occasionally pause, presumably while the index buffer was being updated.  I am still working on this issue, and if I can''t resolve it, I will just fall back to using triangle strips on the 360.

This has become the highest priority for me, and I will not be able to continue the game until I get this resolved.

Permalink 01:43:00 am, by jdunlap Email , 203 words   English (US)
Categories: City Builder

Terrain Engine

I have been spending time working on a terrain engine for XNA to be used to develop a game for the XBox 360.  So far, I have implemented several terrain generation techniques: Flat, Random, Perlin noise, Random Blend, and fault generation.  There is also a river generation technique, but this still needs some tweaking, and the river needs to be created.  Currently, there is only a riverbed.  Two rendering techniques have been implemented.  It will render using either triangle strips or triangles.  When using strips, each row of triangles is implemented as a strip.  Therefore, a 257x257 terrain will result in 256 strips being rendered using 66,049 vertices.  When using triangles, ROAM has been implemented so triangles will split and merge based upon their distance from the camera and their visibility.  Below, there is a YouTube video of the engine being implemeted in my game that I am working on.  Beware, though, the music is a little loud.  The video has an overlay of the triangles being used to render the terrain. The terrain looks rough due to the codec. I will use a different one in the future.

 Enjoy!

April 2011
Sun Mon Tue Wed Thu Fri Sat
 << < Current> >>
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Search

XML Feeds

powered by b2evolution