Monthly Archives: June 2011

Camera work

I switched gears a bit and worked on the camera system, I unified the code for the camera in tactical and ship modes, the code was nearly identical, but was in two seperate locations, bad programming. Then I changed the camera behavior to be more smooth, basically by giving the camera rotations/movements a velocity and then slowing this velocity to 0 over a short period of time when the player isn’t commanding the camera to move. So when the player rotates around the ship there is a bit of a decelleration instead of the hard stop when the player stops the mouse movement. Much more pleasing. Next up is adding a few more neat camera touches. Maybe I’ll even include camera shake when there’s an explosion nearby or some other polishes.

Before this I worked on the hook/harpoon ability of the command ship, I have the physics side mostly figured out (this took a lot out of me, physics is an area that is very foreign to me), but the visual side made me a bit frustrated (looked like crap, and not a good prognosis for it looking cool) so decided to work on something that I can see the effects right away. Good way to combat burnout.

Iter 7 is scheduled for next weekend (4th of July weekend).

Transport Ships – work in progress

Here is a fairly low tech vid of the new trading ship changes:



Basically the trading ship launches cargo pods at the trading station, which in turn launches cargo pods into space which the trading ship will capture for transfer to other stations or the command ship. In the near future the trading station will also receive a cargo hook turret if the cargo pods miss their mark, the pods aren’t self guided, instead the transport ship attempts to hit the station with them.

Placeholder art :( Hopefuly sooner than later ;) the transport ship and the trading station will receive textured models.

Iter 6.1

Decided to release iter 6.1 since I love the new shading system so much and because I wanted the artists hard work to be highlighted. Still in its infancy, it is already adding a lot to the game, I’m very excited about the visual future of this project. The game is in another state of flux, the new models have pretty high resolution textures, eventually I will probably scale these down on some ships, and have different texture levels as options for players. I also plan on a “notebook mode” which will make the ships back to the solid colored low res textures, but should give decent performance on even laptops with those standard intel graphics chips.

Here’s a screen shot of another shader in progress, this time it is a diffuse, specular and emissive (the glow) shader. The below screen shots demonstrate the desired effect. Basically some portions of the ship will “glow.” Behind the scenes the emissive texture tells the graphics card to ignore the light in the scene and thus make these elements appear fully colored no matter what light levels/angles/etc exist.

On the left is the diffuse and specular shader, on the right is the diffuse, specular and emissive shader:



Click For Full Size

Here for comparison you see what happens when the lights are turned off, the emissive portions appear to glow:



Click For Full Size

What’s really great about the emissive shader is that it allows for a neat visual when the ships otherwise wouldn’t be lit up if they have their backs to the sun.

In more gameplay related news: I’ve started working on the “Hook” ability for the command ship, initially I wanted this to only work on cargo pods, to draw them near the command ship instead of forcing the player to have to make contact with the pods, this hook was intended to pull the pod to the command ship. But hey why stop there? Why not have this hook work on friendly/enemy ships as well? Drag them, anchor yourself on them, whatever, what’s neat is that it allows for combinations of abilities. Hook onto an enemy ship, then engage the “Charge” ability to drag the ship away, then blast it with offensive weapons away from the main conflict.

Also I’m re-doing the Trading ship gui, this will be the first step in expanding the game play to include conquering the neighborhood (then creating an economic base for futher actions) instead of just defending yourself from onslaught.

Iter 6 and current work.

Iter 6 has been released last week. I feel a lot better now that command ship upgrades take resources. Also that the resource transfer between trading station and command ship actually takes place via a “physical” cargo pod. The trading station launches it and the command ship “picks it up” (aka smashes into it). Since this is fairly annoying (having a slow and slow turning ship to collide with a pod) I’ll have to code a command ship upgrade of a “cargo hook” a turret that shoots some sort of a line or maybe a “beam” (aka tractor beam) that will pull the cargo pod closer eventually transfering the cargo to the ship when the contact occurs. This could dual purpouse as a way to either tow or disrupt smaller ships. Would be pretty cool to shoot this “cargo hook” at a fighter and have it lose its maneuvering advantage over the command ship.

I haven’t been coding the game much this week instead I focused on learning shaders. Since the artists have provided me with specular and ambient textures my goal was to utilize these as to make the finished models the best that they could be. I’m happy to say that even though I struggled greatly getting into the shader portion of graphics programming I have some results, a very basic ambient, diffuse and specular shader (for those not familiar with these terms refer to light: ambient means light that is always present, diffuse means light that bounces off a surface equally, and specular refers to light that bounces off more so off of shiny surfaces). Bottom line they make things look cool. Here’s a screen shot of the shader I pieced together from multiple sources and added a bit of my own touches, it shows the difference between just diffuse and specular and diffuse shaders.



Click For Full Size