slaytanist @ 12:09am: RAWR
A fair bit has changed with the ballmapper, phong is now looking a
lot prettier and I've set up a nightmap for Earth.
Also changed the pallette shading so it doesn't look so 1995 ( :( ), a problem with this though is now the moon doesn't look bumpmapped anymore! And since I liked the effect I might go and code some bumpmapping :) This will add a couple of ops to the innerloop as well as creating a smallish texture (720*360*2 bytes) and a smallish table, should this chew up bandwidth or clientside render speed we could certainly make it togglable.
Oh aye I've jacked up the envmap to utterly obese proportions, it will take a minute or two to calc (generation is still unoptimised and it's a 128meg table :O ) so go make a brew or something :D. I've set it so you can change the lot at compilation just by changing PHONGRSBITS and PHONGRTBITS to something a little lower, if you wish. The changes I've made to the phongmapper don't stop there.. you can change it back to an 8meg table and it still looks infinitely better (the way the lightangles were calced was a little fucked before and it was jerking about like an electrician with Parkinson's)
//Wondering if we could generate this envmap while the client is DLing stuff?
Source, exe and textures are in
the same place.
UPDATE: exe with 8meg table and two with 32megs for comparison in the zip too.
UPDATE: Precalc MUCH faster now; I've not even optimised it, just built sin tables.
UPDATE: Added clipping which sort of sets me up to represent this shit in real space and not just screen coords. Grr :)
Also I've had an idea for selecting planets (rather than the map painted on them) - create a list of bounding boxes sorted by distance from camera. It will then check the boxes in order and edge-detect if you're in the box (for planets a check by radius would be enough) and give a hovering planet name if you're over it, and set a global pointer to the object. When you click it it will set the planet as selected, zoom you in, let you select shit on the planet and all that good crap. What do you reckon?
Getting crap off the planet once it's selected will be another one of those spherical cord transforms I'm starting to really love.
Yes that was sarcasm.
What the fuck am I talking about we can use the mapper tables which will be better anyway cus we can brush over any, ahem discrepancies between the mapper output and what should actually be there.
Since all the distances are crazy in a spacegame I don't think we'll need a z-buffer except a sort of localised one per spaceship but if you think it would be useful it's your call. If we're even representing spaceships as models in the planetary grid (they're gonna be fucking tiny! Except for like orbital superbarges and Death Arks and whatever crazy shit we want) Maybe just a red circle for enemy units, yellow for neutral/non-combat and blue or somshit for friendly. These circles could also represent large ports and cities on the map. Whatever.
Not so worried about potential Java speed issues now; so long as we only draw the screen when we have to I'm sure we could get away with 5-10fps, less even. It's gonna be pretty static as games go, wherever we go with it really.
Mem is starting to frighten me a little :) How much can you realistically use in a browser applet?!? Of course if we don't go that way it's not an issue.
Holy fuck I'm gonna go draw some Death Arks :D