vineri, 19 iunie 2009

Enterprise Fun

This is a fun one, as I am a big fan of the classic series.

The geometry of the ship respects the blueprints, but I took the freedom to add my own twist to the textures, by making it cartoonish. It's the kind of ship you would want inside an arcade game, popping out of the background in an eye candy fashion.

I keep it very rough, no GLSL. The original UVW texture is baked on the AO(smart UVW)map to save space. I only used the simple default Mist Effect to get the planet depth feel.


Sky-Dome Method:

I use an extra scene with a flipped normals sphere(skymap texture) and a camera in the center.

GameLogic.camor = own.getOrientation() - for the original scene camera

own.setOrientation(GameLogic.camor) - for the background scene camera

As a result:
1. the sky is not affected by Mist.
2. no matter how far they are positioned relative to the camera, the objects will always be in front of the background.


Collision system:

The ship is set to No Collision and parented to a collision box(triangle mesh bounds).


Camera Rig and Ship Movement:

I used a mouselook script from here.
You have the possibility the look at the ship from any angle by moving the mouse. Once you left click, the ship will move in your "sight" direction. There is no need to use the keyboard, it just goes forward by using the camera's local orientation.


Camera Wall Collision Detection:

A ray is sent to the player, if it encounters a surface with the property "wall", it places the camera at the last location.


Direction, Horizon:

The ship will track to the horizon line all the time, to keep a sense of equilibrium, orientation.
Both direction and horizon are done gradually.


There are 8 small "planets".

Don't mind the average 35 FPS from the screenshots, it's on a laptop with integrated video.







I plan to add more visual diversity into the enviorment. I still need to learn texture painting with nodes( a new feature in BGE, similar to BP3d) to create seamless maps, and maybe implement a laser firing system.

2 comentarii: