Graphical Improvements

Anything about development not directly related to libgdx, e.g. OpenGL, Android APIs etc.

Graphical Improvements

Postby enkoder » Sat Jun 16, 2012 7:41 pm

I wrote a wave based psuedo-2D shooter with an RPG upgrade aspect to it. I said "psuedo" because I use a Perspective Camera to bring in enemies and use it for screen transitions. The project/paper part is done, but now I want to get it ready for the Marketplace. Currently the graphics are rendered using the OpenGL primitive GL_LINES and setting vertices and indices to a Mesh. This works pretty well with the type of the game, but I feel the way I render the UI and gameplay needs to be revamped. I am using OpenGL 1.0 and should be stated that this is my first introduction into OpenGL and game development.


The images below show an example of the graphical style for gameplay and menu.
Image
Image

Here is what I have been looking into to improve my game:

- Scene2D for improved UI capabilities. (Definitely going to do this one)
- Use OpenGL 2.0 and shaders to produce a blur or glowing effect
- Use Blender or my brain to improve the UI and dynamic objects in the game.
ie. Octagon enemies could be cool looking 3D shapes
- Ditch the style completely and use textures.

I am looking for some recommendations to improve the graphics of the game. Any help you guys could give would be greatly appreciated.
enkoder
 
Posts: 22
Joined: Tue Feb 07, 2012 7:09 am

Re: Graphical Improvements

Postby sforzando » Sat Jun 16, 2012 10:51 pm

Are you looking to have 3D models with animations or just static models like in Droid Invaders? For models with animations you need to download the libgdx source code by typing the following into command prompt (on windows):
Code: Select all
svn checkout http://libgdx.googlecode.com/svn/trunk/ libgdx-read-only
You need to have a program such as Subversion to do that though I believe. This should download a folder called libgdx-read-only in your user directory. Open up eclipse and set your workspace as this folder. You then need to import all the projects from this folder. Find a project named, model-loaders, then right click and export > java > jar file. This should create a model-loaders.jar file in your user directory which you then need to add to the libs folder of your gdx project. Make sure to edit your project's properties to include model-loaders.jar in the build path as well. Your project can now use the model-loaders extension.

If you built your app following the model, view, controller pattern then it will be easier to add 3D to your game. Go back to the model-loaders project in the libgdx source and a have a look at package com.badlogic.gdx.graphics.g3d.experimental.HybridLightTest.java. You should be able to compile and run it as a java application. You'll see a lot of knights moving around in place. If you click, you'll change their animation. You can drag the camera around by clicking and dragging. After messing around with some things in this file I was able to learn how to use the 3d part of libgdx. Make sure to check the include normals box when exporting .obj files from Blender or else your models won't be textured.

Let me know if you need help.

Edit: Also include the model-loaders.jar in your android project as well or else when you test your app on a device it will stop with a missing class error.
Another important edit: Copy the assets/data/shaders/ from the model-loaders-android project to your android project's asset folder or else you will get a missing shader error.
And another: Also make sure useGL20 is set equal to true in your application configuration. If you want to use shaders in your app.
sforzando
 
Posts: 59
Joined: Sun May 13, 2012 1:31 pm


Return to General Development

Who is online

Users browsing this forum: wolfgangpue and 3 guests