ClydeCoulter

I have started a Quadtree project. It can be downloaded at http://www.codeplex.com/quadtreeload

I would be interested in comments on the direction I am taking on the Quadtree DrawableGameComponent.

I have included a test program called JoshGameXNA. But, open the QuadtreeComponentLib solution and just set JoshGameXNA project as the startup project.

Excuse my C#, but I'm new to it. Any construction comments are welcome.

It's seems you may have to click on "more releases" to get to the "Special Build 0.1.1" project. Not sure why.....




Re: XNA Game Studio Express Quadtree project

Fluxtah

That is extremely cool! thanks for sharing the code, I have a book just for terrain, ROAM and quadtrees, this gives me a good example of a c# implementation.

Your C# looks ok, although it does show remnants of a c++ background.

Thanks again!

Fluxtah





Re: XNA Game Studio Express Quadtree project

Fluxtah

Thought I would add I just tried to open JoshGameXNA and first it complained that the project HeightMapProcessor could not be found, and also its missing the reference to QuadtreeComponentLib.

it might be an idea to stick all projects into one solution file, this way one solution file can be opened with the component and the example of its usage, and also maybe the heightmapprocessor to if you wish to share that :)

I can include the QuadtreeComponentLib myself however the project still wont run without a distribution of HeighmapProcessor.dll or the project itself.

oioi

Fluxtah





Re: XNA Game Studio Express Quadtree project

ClydeCoulter

You need to open the QuadtreeComponentLib Solution, _not_ the JoshGameXNA solution (I should have removed it from the zip:)

The JoshGameXNA Project in the QuadtreeComponentLib Solutioni s setup to work without the HeightmapProcessor project and contains the reference to the .dll

The HeightmapProcessor project loads a heightmap as a Model that has a ModelMesh ModelMeshParts for each sector. But I could not figure out how to use the bones to create the quadtree structure.






Re: XNA Game Studio Express Quadtree project

ClydeCoulter

My daughter said I should mention what a quadtree is for.

A quadtree is a fast way of determining visibility of, say, a terrain or landscape (other uses as well).

This quadtree project draws a terrain/landscape based on a Texture2D heightmap.






Re: XNA Game Studio Express Quadtree project

Fluxtah

Hiya,

I tried to open up that solution (QuadtreeComponentLib.sln) try to compile and its still looking for the custom content processor, what I cant understand is both the jpg files in the sample project are set to use the default content processor, so not sure why its doing this :( I am sure I will resolve it at some point but just letting you know before someone else hits this problem.

best regards

Fluxtah





Re: XNA Game Studio Express Quadtree project

Fluxtah

Oh by the way, any plans for an octree :)





Re: XNA Game Studio Express Quadtree project

Fluxtah

It seems the project JoshGameXNA.csproj is still referencing your custom importer even if this is not visible within the IDE.

In the file is this line

<XNAProjectContentPipelineAssemblies>$(ProjectDir)..\HeightmapProcessor\bin\x86\Debug\HeightmapProcessor.dll</XNAProjectContentPipelineAssemblies>

which is causing the issue.

best regards and many thanks for such a generous offering to the community!

Fluxtah





Re: XNA Game Studio Express Quadtree project

ClydeCoulter

Yes, I do plan on an Octree component in the near future. I have several things to finish up on the Quadtree first.

I will create a smaller more consice test/example program for the QuadtreeComponent tonight. (have to go to my son's Christmas program in a few).






Re: XNA Game Studio Express Quadtree project

Fluxtah

Cool, I am really suprised no one has jumped on your contribution yet! Which is ironic with all the posts about how to do a terrain system / need a terrain system, etc, I think maybe some people are not familiar with what Quadtrees offer, maybe the topic should include the word terrain in it.

regards

Fluxtah





Re: XNA Game Studio Express Quadtree project

ClydeCoulter

I agree, that's why I did this project, was for the community. I had seen all kinds of "How do I show a terrain/landscape" so I thought, I've done that many time with a quadtree, so why not make a component for others to use.

I added it to the Re:....... subject, see if it helps :)






Re: XNA Game Studio Express Quadtree project

Fluxtah

When I get round to it I really need to study the code, I am suprised at how little code it is and the rendering performance is really quick!

Fluxtah





Re: XNA Game Studio Express Quadtree project

ClydeCoulter

I have now added the ability to put static objects into the quadtree.  The test program adds 1,000 rocks into the quadtree and it renders it all really fast.

One issue I need to work out before releasing this version is:  How does one go about making the fog and lighting parameters comply with that of the terrain   I have added these 1,000 rocks and can see them, but they look "out of place" because the effect is not the same.  Should the component user have to modify all of their model effects to match   When/If they change the effect (like making the sun move) do they need to update all of their modelMesh effects

I'm kinda axious to start the octree project for Outer-Space games, but this quadtree project should help me get some issues resolved that I will need to deal with in the octree also.  Mainly, how to keep the interface clean but still provide a robust component.

 






Re: XNA Game Studio Express Quadtree project

ClydeCoulter

I have just release 0.2.4 version of the Quadtree Landscape DrawableGameComponent.

This release adds several methods and a new class.
The new Quadtree methods are for adding/removing models to/from the terrain.
The new class QuadtreeModelInfo stores information about the model in the terrain. You can also add other information for your own purposes to the QuadtreeModelInfo.

The Example game project TestQuadtree1 show adding 1,000 rocks and 100 hovering tanks to the terrain.

Give feedback on the approach (good/bad) I am taking on this project, PLEASE :)

Clyde






Re: XNA Game Studio Express Quadtree project

Fluxtah

Its looking great Clyde, I wish I could give you more feedback but I am not implementing any terrain yet, although it is something I will at some point.

Try reposting the next version as a new post with a mention of terrain in the topic then other people might get the idea!

rocks, terrain, tanks, FPS cam, what more could someone want!

Anyway thankyou its helped me a lot! :)