Friday, August 29, 2008

Distance

I've fixed the oustide camera, now i'ts a little up so you can see your starship well.
There was a bug with the up vector (the vector that tells where's the "up" direction), and the rotation around the ship was very odd, but now it works well.
Ok, the camera is near finished (i hope), now is the time to upgrade a little the HUD.
Until today HUD shows the position and the name of every object on the sector, with an hexagon if the object is inside the view area, or with some arrows if it's outside.
Now the HUD display also the distance, and use a confortable measure unit.
If you're near to an object, VERY near, the distance is displayed in meters.
Until 1.000.000 km it's displayed in kilometers.
Otherwise, the AU is adopted (1 AU, aka Astronomic Unit is the distance between the sun and earth).
Down you can see two screenshot that displays objects near and far.
I hope you like it.

----

Allora, ho finito di lavorare alla telecamera, spero quasi definitivamente.. ho sistemato la visuale esterna aggiustando l'altezza, in modo che ora sia possibile vedere la propria astronave da un piano un po' piu' in alto. Inoltre ho risolto un baco che mi sballava il vettore "UP", ovvero quello che, dato un sistema di riferimento, indica dove si trova il "sopra".
Fatto questo ho deciso di trascorrere il poco tempo rimasto prima del week end per aggiornare ulteriormente l'HUD. Da oggi infatti questi visualizza anche la distanza dell'oggetto da noi. E lo fa utilizzando un'unita' di misura conveniente. Per oggetti molto vicini la distanza viene espressa in metri. Per oggetti fino a 1 milione di km, la distanza viene ovviamente espressa in kilometri. Per oggetti ancora piu' lontani infine vengono usate le unita' astronomiche (AU). Ricordo che 1AU corrisponde alla distanza che c'e' tra la terra ed il sole.
Vi lascio con due screenshot che vi mostrano come funziona il tutto.

Buon week end.


4 comments:

Anonymous said...

when will you go online?

PdG said...

you mean the game?
It's a wonderful question :)

Really: i've no idea, (un)fortunatelly i've a work, so i've very little time to invest into this game. Now i've some idle time so i can do a lot of coding and modeling. But i don't know for the future.

Now is too early to put a demo. There's only prototypes of graphics, engine.. there's no enemy, no trade, there's not the game.

But i hope to end it

Anonymous said...

Keep at it!

This will be great once its released

PdG said...

thank you.
I hope to finish it.. one day :)