Wednesday, November 12, 2008

Insurmountable bugs

Creating these chat bubbles has made it clear that my 3D rendering engine is imperfect: there are occasional pixel allignment issues that cause single horizontal lines of pixels to disappear. I am sure that this is an issue caused by my projection and identity matrixes, which I created by trial and error. Fixing these issues will require the work of someone who actually understands 3D projections. Since I'm the only person working on the engine at present... this is really frustrating. 

Another issue that has cropped up is the issue of overdraw: currently, the engine renders about 3-4x more geometry than is visible. Solving this problem will require an understanding of 3D rendering and fustrum culling, which are, again, skills that I don't have.

I need to consider my options: do I want to continue working on the engine in my own haphazard way, or do I want to spend a week or more cleaning up and commenting all the code so that I can share the code with other developers.

Send me an e-mail if you understand 3D rendering, and would like to help.

Tuesday, November 11, 2008

The first NPC in the game...

... is an unfriendly skeleton.

Sunday, November 9, 2008

A week later...

I've made a lot of changes in the past week, but at the same time, I'm struggling to find time to work on this engine.
Everything in the game at this point is hueable. Skin, hair (players have hair - how cool is that?), every weapon or object.
Preliminary NPC code is complete. The next big step is to start scripting them to respond to player input.
But - bad news - I've started working on my Thesis, and I'm taking over as station manager of the campus radio station. So, as I wrote above, it's getting harder and harder to find time to work on a project that might end up just a waste of time.
I'd really like to open source this engine. Clean it up, give it to someone, watch it grow, watch it thrive.
But I'd have to clean it up first. Right now, the engine is something like the crawlspace under an old house: everything is dusty and musty and pipes lead every which way and some are empty and have been for months and others are only temporary but God help you if you try to remove them without fixing the jury-rigged solution that is in place in the wiring four feet in the other direction.

Sunday, November 2, 2008

Progress report: 11/02

I'm now able to color objects in the world. Here's an example of a Player in colorful gear (the player himself is still albino, but that should be fixable).

I spent a good deal of time trying to fix overdraw today, but to no avail. I really do not have a good grasp on 3D concepts, which means that when I try to implement marginally complex concepts such as frustum culling, all I end up doing is wasting my time. I think I'm going to stick to working on the basic engine from here on out.

This overdraw problem needs to be addressed in the future. Just not by me. I pulled back the camera just to see how much is being overdrawn. This is the result:

Saturday, November 1, 2008

Progress report: 11/1

I've been working harder on updating the game than updating this blog. I've made a lot of changes and additions.
  • When a player walks inside a building, the roof disappears.
  • Units other than Players now exist in the world.
  • When you mouse over an item, or a NPC, or anything else, the mouse cursor changes to reflect a default interaction with that object.
  • Units (a class of objects that includes Players) now draw shadows beneath them, so it's obvious that they are standing on the ground.
  • When you are preparing to drop an item on the ground, an item 'shadow' appears in the world where the item will be dropped.
I also have done a ton of back-end programming, setting up flags for NPCs and mobiles, etc. I also nailed down mouse interaction so that it's absolutely perfect. Unfortunately, this has cost me a good deal of fps (I'm down to about 70% of what I reported earlier). My goal with this engine is to make it run at good speed on just about any computer out there, so this is a little disheartening.

I have a cell-bio test coming up on Monday, so I need to study for that. Today, I'm only going to work on one thing: implementing a visibility culling test so I can reduce the number of objects I'm drawing per frame. I anticipate that this will net me a 1.5x speedup, or possibly more.

Tuesday, October 28, 2008

Progress report: 10/28

Player can now drop objects to the ground, and pick them up as well. Initially there were a few problems with updating the inventory GUI when items were picked up, and an occasional issue where a player would go to pick up one item but end up with something else altogether in their inventory, but I think I've fixed those bugs.

I would like to be able to highlight objects that the mouse cursor is over. I'm not sure how I'll do that - whether it be by rendering that object brighter or darker when the mouse cursor is over it, or with an outline. Perhaps I'll boot up UO or D2 and see how they did it.

I've also implemented a context-sensitive menu for the GUI. The menu doesn't have a real purpose yet, but I'll probably find a use for it in the future.

My next milestone is to have NPCs in the world, be able to interact with them (as quest givers, merchants, or gossipers, for example), and then I'll be working on chatting in game.

A few statistics for the project:
Lines of code (client only): 9,225
Size of the client: 496kb
Disk space taken up by resources (textures, maps, databases): 113mb
FPS*: 350

* The client currently runs at 640x480. This benchmark is done in an area of moderate detail, with a few hundred objects on screen. My development machine is a 2ghz P4m, ATI mobility Radeon X300.

Monday, October 27, 2008

Progress report: 10/27

Yesterday, I fixed the offset values for equipment graphics. Player equipment now displays almost perfectly while moving. It's not absolutely, 100% perfect, but I think that the graphic artifacts that remain are the problem of Ultima Online's art. The only way to fix this problem will be to implement an original art set... but this isn't feasible at the moment.

Today, I made it possible to have items display when dropped on the ground. Next, I'll work on picking up and dropping items.

My next major milestone will be NPC interaction and chatting. Although there will be merchants, skill trainers, and innkeepers (among others), not all NPCs will have something important to do. Those that do not will either say a canned response (possibly with a variety of canned responses based on the player's deeds and appearance), or have a simple dialogue tree.

I am excited about the personalized storytelling the supposedly will be a focus of Bioware's newly announced Star Wars MMORPG. Here's a quote from the IGN article about the same:

The problem with most MMOs, even those that have large story arcs for their characters, is that they try to apply a single story to a wide range of classes and attitudes. In designing content that works equally well for both saints and scoundrels, many MMOs are left with rather generic stories where the only real roleplaying is whatever the player projects onto the action.

The solution is to give each class its own story arc. So your class story will start right away with you being introduced to your class, not based solely on the mechanics of gameplay, but in terms of what motivates your particular class and how you should start thinking about your opportunities.

This is really intriguing - I absolutely believe that the future of MMO's will be hinged on this personalized storyline business. Writers, after all, are cheap.