PerPixel


Since the XNA 1.0 release I have been quite busy at first trying to run stuff on my XBOX360 and then doing the jump to a fully working port of Quake (best deathmatch ever!) So after 3 week of hard part time work on this I can now see something that look not too bad =) The lightmaps still have issues but I'm quite happy of the result so far. Before starting I had a good knowledge of C# but I my C/C++ skill are still far behind but enough to understand what the Quake code was about in most case. This is my first 3d engine ever but in RL I'm an animation TD for a major game publisher, meaning that I do understand quite well what I had to do and how to do it. So far I'm having a really good time using this and I don't have much to complain about versus the real dev kit I use at work.

Complete task:
BSP Class to load the Quake bsp level. (Currently load everything there is to load and place it in structs using Quake naming for easy reference).

Quake paletted lmp textures to bitmap converter so I can load them as Texture2D.

Lightmap builder use the bsp lightdata and generate 16x16 bitmap for blending in a pixelshader. (I'll add per pixel light and stencil later but I really wanted to load the original lightmaps as a challenge).

Surface Renderer, create triangle list from the surface edges, generate uv, sort by textures

Whats next

Code review and cleanup to speed things up. I'm doing some really ugly things right now and just the lightmaps take forever to load and drop the frame rate 50% when enabled.

Player 2d navigation and BBox collision.

MDL renderer for the monster, weapons ect.

Game code, I'm not gonna use the QuakeC generated code because I pretty sure its gonna be faster to rewrite it in C# than supporting the progs.dat from Quake.

Skybox

Warping texture (water, teleport ect)

Particule system.

Still reading Here some screenshots!

http://perpixel.dyndns.org/~guillaume/


Re: Quake XNA update

manders


Looks great so far!

Is your app going to work on both Windows and the 360

Are you planning to share the source code anytime soon

-Mike





Re: Quake XNA update

Peter Lillevold

This is so cool! Sign me up for code reviews

But this raised a question in my mind; can we use .NET assemblies coded in Managed C++ with XNA (on both Windows and Xbox360) If so, perhaps you could borrow stuff from Quake II.Net. I guess its just a matter of trying.







Re: Quake XNA update

Jim Perry

On Windows it's not a problem to using assemblies. On the 360, it might be more difficult as you're restricted to the 360 version of the Compact Framework.




Re: Quake XNA update

GKi

Cool project i actually wanted to do this, but due to my lack of knowledge of C# i decided just to learn it first. Here is a few things i read about to help you out XD :

i read somewhere that 'foreach' statements take alot of frames right out of your fps because of the enumerator thing if you have any you might wanna just turn them into normal loops.

also the person who made rocket commander or somthing (for xna) said that using multithreading also greatly increased the fps

Well thats all i know, Good luck with your project






Re: Quake XNA update

Peter Lillevold

Multithreading is not a silver bullet for improved performance. It must be done right. As is with all things I guess :) Especially, look out for threads accessing the same resources. If done wrong, it will truly hurt perf.

Another thing to watch out for in .NET is boxing. This is what the CLR uses when you cast value types to objects and back into value types. Like this:

public void Boxit()
{
int x = 10;
object o = (object)x; //Boxing occurs
int y = (int)o; //Un-boxing occurs
}

Boxing effectively creates a new object to hold the value of x. Read more on the subject here. In the "old" .NET 1.0/1.1 collections this was a problem. With generics in .NET 2.0 we got rid of the problem for collections and the like. More on that here.






Re: Quake XNA update

PerPixel

I dont want to borrow anything from other project and I barely looked at the original Quake code. Quake was soo optimized for speed on software renderer and ASM that most things are just not possible to simply copy from the code so I didnt waste time trying and rewrote everything from the understanding I had of it. My 25fps average sux but i'll build from there.

Quake is also a server client engine and without nextwork in the XNA framework rightnow its a major problem for me gameplay wise. I dont feel like I should share the code now. I want to get it clean and make the complete game work by myself first. When thats done I'll definatly open the door to other people to join in and help make things better. Its not helping me is someone else right the pixel shader code for me and end up not understanding whats going on in there =)

I feel pretty happy about the BSP loader class so I'll clean that first and share it when its done probably this week.




Re: Quake XNA update

Peter Lillevold

That sounds reasonable. Share when you're ready and feel like it. Here's to getting network access in XNA!




Re: Quake XNA update

Preston Moore

That's awesome! Make sure to make your code available eventually. I'd really like to look through it.

Keep it up!





Re: Quake XNA update

Johnnylightbulb

I'd love to see the code - I've created a BSP loader for HalfLife2 maps that I'm moving over to use the Content Pipeline, it'd be really neat to package this loader in there as well, so you add content to your game, select either the 'Quake2 BSP Importer' or 'HalfLife2 BSP Importer' and the appropriate processor and have a renderable map.

The screen shots look great!