2D game using tonegodGUI (OSRViewPort + HoverTank + camera rotation = sweetness)

Just wanted to see how this would work out using this SpriteElement class. Not really anything to this… just basic movement using a controller…

setCurrentFrame to update the ship banking.
Two nest SpriteElements for the thrusters (because I was lazy and didn’t want to make a million frames for the ship
The player ship is nested in a panel and setLockToParentBounds confines it to that area.

Anyways… here was the results. It was very easy to throw together this way.



Ya know… alternately, you could have the jotstick rotate a 3D model using the OSRViewPort to render the ship… and combine that with Sprites to add effects.

I think I am going to give that a shot next.

If it continues to work out well, I’ll definately port the ParticleEmitter over to a 2D control that can be used with your UI. This is quite fun this way.

Seeeew… tried out the OSRViewPort using the HoverTank Model from the JME test assets. I rotate the camera slightly depending on how fast the player banks. It ended up looking fairly cool.



oh kewl!!

@nehon said: oh kewl!!

I sync’d the rotation to the tank node instead of the camera so the lighting updates, added interpolation based on jostick value and also added a particle emitter for the thruster. They are subtle differences, but it is really starting to look nice.

Today I’m going to work on translating the emitter to 2D so there is a version that works in the HUD without having to render it offscreen and translate location for 3d to 2d. This will also fix the transparency issue when rendering particles this way.

All in all this is turning out to be a fun project.