After spending an uncountable amount of hours, cola, cookies and curses (especially curses) I think it’s time to announce my first project:
ShipsWithCannons (or: you shouldn’t argue with a 12-pounder)
It’s the age of discovery. Mighty nations are fighting for dominance. So it’s your turn to take command of a powerfull fleet and fight your way to success, money and women.
features:
turn-based strategy at the high sea
3d-enviroment
hexfield system
customizable profiles, configurable fleets
alternative moving system. Ships can’t turn without spending move points. So a ship which has to turn by 180° can’t move a great distance.
the ships can’t fire in any direction and they will be vulnerable at front and rear side. So it will be important to find and hold a good formation.
the game is currently an alpha.
Next goals for reaching 0.1 beta:
finishing the rule-system
implementation of a nifty cannon fire effect
implementation of sound
finishing the gui
balancing and bugfixing
creating ship textures
I’ve added some ingame-scenes that demonstrates the current game state.
I’ll try my best to make progress in development. The next things will be textures and graphics. Currently I can’t see codelines any more.
Some additional information:
I’m using terragen 1 and CubeMapGen (from Radeon-Labs) for the sky. The gui is build on niftyGui 1.3. For the codelines I’m using eclipse and for the fonts the Bitmap font generator (from anglecode).
the rate of cursing around is going down (which means that I’m starting to understand the engine ^^°). Today I want to show you the results of the last week. It was a strange odyssey between graphic-creation, re-mapping of the ship-models, swimming around in an ocean of code and going down to the ground of openGL.
"But that's just some color changing! What took you so long?"
Well there's a little bit of openGL-magic behind the scene. I've thought about options to combine the symbols, the color and the ship-texture dynamically without having an huge bunch of textures. I didn't found a solution for this problem (if I have overseen it please tell me) so I decided to write a shader, which can merge all these textures together (I nether thought of doing that...).
`pre type="cpp"` void main(){
vec4 color = vec4(1.0);
vec4 color2 = vec4(1.0);
vec4 blendC = vec4(1.0);
#ifdef HAS_COLORMAP
color *= texture2D(m_ColorMap, texCoord1);
#endif
#ifdef HAS_ADDITIONALMAP
color2 *= texture2D(m_AdditionalMap, texCoord1);
#endif
#ifdef HAS_ADDITIONALCOLOR
color2 *= m_AdditionalColor;
#endif
#ifdef HAS_BLENDMAP
blendC *= texture2D(m_BlendMap, texCoord1);
color = mix(color, color2, blendC.r);
#endif
gl_FragColor = color;
} `/pre`
This one is inspired by the lighting-Material from jme3 alpha 4.
After that I had to render the result into an other texture which is now the result on the ship. The advantage is that while playing the game the engine has only to render the result-texture and not every layer in every frame.
nothing really new in this week. I’ve cleaned up a bunch of mess from my code and organized a lot of assets like fonts, buttons and so on. So there’s not that much to show you.
I’ve hitted a problem with niftyGui. Is it possible to set up several screens in different xml-files? My menu has seven screens and I don’t want to create all of them in the same file.
I have not found a way but I’m also curious. I’ve organized my screens into different groupings and put those in separate XML that I just load when I need them. I have different screen controllers I pass in for those cases, anyway… so it actually works out better for me in my case.