|
-
Senior Member
Some updates today:
Support for skyboxes. They are the same data structure as regular maps, but are made of just a single cube. They are textured into the monster layer as a first rendering pass, while the monster zbuffer is filled with z_infinity-1. As the regular map is rendered, any polygon tagged as skybox will draw no texture and write a polygon into the map zbuffer with z_infinity. When the two layers (map & monster) are z-composited, the skybox pixels will be exposed just like regular monster pixels. I can't take credit for the nice skybox texture, it is a "lunar landscape" by Hazel Whorley. He's got a pretty cool site, http://www.hazelwhorley.com/skyboxtex2.html, with lots of FPS game assets available under creative commons. Here's a screenie:

Support for laser beams - hitscan weapons that leave a tracer line when they are fired (like doom-a-like). These have their own sorting issues. They are cast across cells, splitting across every portal until they hit something solid. Inside each cell, the beam is sorted against the brushes/pillars by splitting into fragments using the local bsp. Beams are drawn into the map layer, so they zort against monsters (and the skybox) by z-composition. Another screenie, showing all this sorting. (The beam is occluded correctly by the pillar using the bsp, and the monster leg by a z-test, just testing different code paths).

Right now the beams persist forever, so you can fire one and then view it from other angles to test out the sorting. If you look close, they're actually texture mapped across their cross section I flat shaded them at first but they looked too harsh when they were up close. The beams do not z-sort against each other. I will _not_ be fixing this, it's not worth the effort and won't be noticeable when beams are only 1 frame in duration)
More odds & ends:
Surfaces are shadowed lazily / on-demand, and released using bitmapData.dispose() if you don't look at them for a while. I hope this will curb memory usage somewhat as maps start to get larger in size. There is now a noticeable frame rate hit when you spin up a room and all the surfaces are filled at once. I might try to spread that out across frames but probably just leave it as is. You can test this feature, if you walk right up to a single wall and just stare at it, memory usage should drop sharply after about 15 seconds as all the other walls are purged due to inactivity.
Bulletholes are placed on surfaces when you shoot them with lasers. Currently, you'll also mark up the skybox when you shoot (whoops!). This will be fixed later when the player's avatar is eventually refactored into a distinct class from the camera. Hit CTRL to shoot.
Z-Buffer depth was increased to 768 colors instead of 256. Still not happy with the z-buffer implementation. GradientFill still sucks.
Here's a playable demo. It's 2.1 MB now because of the skybox textures.
http://esl.eng.ohio-state.edu/~rac/quake/skyboxdemo.zip
 Originally Posted by samvillian
Really a great inspiration.So you're a doctor now? What kind?
Thank you for the positive feedback. Yep! Not really a "turn your head and cough" doc, but a Ph.D. in electrical engineering. No more school Bout damn time.
EDIT: Fixed broken link to demo.
Last edited by rachil0; 08-13-2008 at 01:55 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|