Pages

Saturday, November 11, 2017

Butterfly



Butterfly - my new 3D cross-platform demo game for desktop and Android devices created in Java programming language using Eclipse IDE. Game controls are W/A/S/D keys for movement, K key for shooting, J key for picking up lightweight items and Shift key for flying straight. The butterfly can fly forward and backward. The first mission is to fly through all checkpoints and to find the lost key in the flowers before time runs out. Collision detection is created with lots of bounding boxes that are cached for a lot better game performance. Movement is done using basic trigonometry functions such as sine and cosine. The camera follows player location and rotation. The map is surrounded with bricks because I don't want the butterfly to fly away. 3D game objects are created in Blender and saved to FBX format which must be converted to G3DB format using special tool. G3DB format supports animations and that is the new thing I learned to make recently. Bricks and grasses are made using single 3D plane object with texture that repeats on x and y axis for better game performance. Flowers are made using 2 separated meshes: stem and flower. The game has "addFlower" function that adds flower game objects to the map with specified x, y and z coordinates, flower color and number of stems. This game is maybe only a small test and I will make it a little better if I decide to keep working on this project.

No comments:

Post a Comment