How The Game Is Played

http://blogs.sun.com/gameguy/date/20050719 Tuesday July 19, 2005

JNWN Update

Well, guys.

Its been awhile so I thought I might update you on the latest on my pet project JNWN.

JWNW, for those of you not following it, is Java3D based Open Source OLRPG client that reads and uses data from NWN and the fantastic NWN Aurora Toolset.

I love the Aurora Tools, even though they are Windows specific. What I dont love is their sever. The server is very limited and chokes on more then about 12 players in world. It also runs scripts written in their god-awful subset of C they call NWN C. NWN C is slow, nasty and the APIs are horribly incomplete. I'd much rather write code in Java.

So I decided that I wanted to re-write the server as a Sun Game Server project But to do that I needed to be able to talk to the client. As their client protocol was closed and encrypted, this meant writing a new client. The good news is that this effort is opening up the client to all kinds of extensions that wouldn't have been possible had I used theirs.

But enough of the background, the status report.

I just got paletted textures working and put back in the resource manager code base. This is how NWN does colorable obejcts such as characters, armor and clothing. I'm now working on integrating this into my game engine so that 3D objects' colors can be changed on the fly.

Speaking of the engine itself, Ive taken a first past at integrating some collision code and simple physics from Shawn Kendall. I'm having some trouble with it but hes nicely offerred to look at my bugs for me and help me figure them out.

I started looking at shadows but Im delaying a decision there. The ways I'd really like to try to do shadows, which are GPU tricks and use very little processor, aren't possible on Java3D today because they require multi-pass rendering. Thats something that the Java3D group have on their list to start working on soon but it may be awhile til I have even a Sun internal Java3D version I can play with that will do that.

They did add limited stencil buffer support for 1.5 and I took a long look at doing stencil shadows (also called "shadow volumes"). My biggest issue here is that I'm nervous about the CPU hit. Its not bad for fixed light sources and fixed objets, but every time an object moves or changes its shape you need to recalculate the shadow volumes for it. Worse, every time a light moves you need to recalculate ALL the shadow volumes for that light.

I want to do a lot of physics stuff the original NWN didnt do, so I'm trying to do as little rendering on the CPU as possible. As such I'd really rather not go the Shadow Volume route long term and its a pretty fair chunk of code to write just to experiment with. All in all it seemed prudent to put shadows on hold for the moment and work on other things.

Thats about all the news to date. I'm using the CVS as a check-point area as well as a release system so if you download, read the notes carefully as the most current version at any time may not be fully functional.

Comments:

Post a Comment:
Comments are closed for this entry.