I am having a problem with certain orientations drawing further location blocks on top of nearer blocks. Does anyone have any suggestions as to how to fix that?
I had a quick look through the rendering code and you are using SpriteBatch and it looks like you are not setting any GraphicsDevice stuff back when you are done. SpriteBatch changes some rendering options (such as setting disabling DepthStencilState) when you call Begin()
This might be useful: http://gamedev.stackexchange.com/questions/31616/spritebatch-begin-making-my-model-not-render-correctly
Yes! That fixed the ZOrder problem. Thank you!
@JamesPlotts: If you have constantly sized groups of blocks (chunks) that are some exponential value of 2 in size then you can use: (world locationxyz) and use a shift "<<"/">>" operator (cant remember which at the moment. Medicine suuuucks!) to get the world chunk locationxyz. From there you can get the position within the chunk via the & operator. Using bit-shifting operators is a small optimization over using division and modulus operators but can shave a lot of time from your mesh generation since the lookups get used upwards of millions of times over the course of runtime.
My objects are sized at 300x300x300 in world space. But it is now running quite fast. At present I am drawing only explored and visible (topmost layer) objects. Your implementation is intriguing and I will remember it for if things start bogging down.
Also, I haven't used XNA but if you have questions about C# and specifically implementing things into your voxely world then hit me up If I don't know the answer I to a question I can probably logic it out. Good luck with this
I appreciate this.
I have split my project up into two portions like I said. I have done this for several reasons.
The first part is the core game Engine, which will contain all the 8th Dwarf game logic, to include loading and saving. It is written in a VB.NET Library DLL. I have done this as I wish to retain control over its implementation.
The second is the 3D interface wrapper application in C#. I have put this out in the opensource arena in the hopes of finding someone willing to help in this area, and to show game developers how to interface with my DLL. I figure this way, anyone could write their own game interface without duplicating the engine work.
I also put the 3D stuff over in C# as the XNA support for 3D objects is much better in Visual C# than Visual Basic.
Theoretically, a particularly brilliant individual/group could write a multiplayer game on top of the DLL.
XNA lets me import FBX objects to use in 3D. Right now I am scrounging for 3D objects as I am pretty much using free software to write the game. I am using the Express editions of Visual Basic/C#, and Google Sketchup for my 3D objects. I almost secured a full MSDN site license but that looks like a no-go now. Do you have any suggestions for some decent 3D models/software on the free side? Until I get some donations, that's what I have to work with.