| Subcribe via RSS

Gonp Saga: The Final Chapter

July 19th, 2010 | No Comments | Posted in Gonp Saga

After a couple more coding sessions, we decided to stop the project’s development for the time being.

To promote an open collaboration I just moved the repository to GitHub for easy forking.

The code got all the foundations to start developing a real game, so if you are just starting Android Development, I recommend you go and take a look at http://github.com/pirelenito/gonp.

Tags: , ,

Gonp, An Android Saga: Part I

April 14th, 2010 | 3 Comments | Posted in Gonp Saga

Today myself and a couple of friends (Renato Besen and Vitor Pelizza) started on a saga to develop a game on Android, there is not much to see or do after our approximately three hours of work but of what is on the screenshot bellow:

A green square, composed of 2 triangles and 4 points. Which might not seem much at a first glance, but there was a lot of learning in the process.

Through the development we followed loosely this tutorial series, but as good questioners as we are, we quickly started to put some query upon some of the tutorial’s solutions. For instance, why does the buffer creation needs all this code:

ByteBuffer ibb = ByteBuffer.allocateDirect(_nrOfVertices * 2);
ibb.order(ByteOrder.nativeOrder());
_indexBuffer = ibb.asShortBuffer();
_indexBuffer.put(_indicesArray);

When we thought it could be done with something like this:

ShortBuffer _indexBuffer = ShortBuffer.wrap(_indicesArray);

After seeing the app crash on start we understood that all buffers used by OpenGL ES need to be of the device’s native byte order, which is not the default order when creating a Buffer through the wrap method. To solve this more elegantly we created a factory for native byte order buffers.

Next up was drawing our Player(the square), but since OpenGL ES does not support QUADs, it would need to be composed of two triangles. After figuring out how the glVertexPointer and glDrawElements methods work, we finally made our Player class render on the screen:

gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexes);
gl.glDrawElements(GL10.GL_TRIANGLES, indexes.capacity() …

On the first line we tell OpenGL wich are the points that it needs to render, next we pass an array containing the order that they need to be drawn.

That is it for now, but you can follow our progress through the project’s Redmine or by checking out the code at the git repository.

Update: Moved the repository to github.

Tags: , , , , , ,

Java movie playback: JOGL + Fobs4JMF

August 20th, 2008 | 30 Comments | Posted in Java

Recently I had to integrate video playback on my job’s Java OpenGL engine, which uses JOGL.

Java has a support to media playback through it’s Java Media Framework, which unfortunately, on it’s current version (2.1.1e) does not support many formats for video playback.

So I quickly looked for alternatives, including IBM Toolkit for mpeg4, that hadn’t a sufficient production performance I was looking for, and didn’t offer an easy option for frame grabbing or plugin extensions as JMF does.

Next was Fobs4JMF, which is JMF + ffmpeg. This solution was much more interesting, since it offers a wide variety of codecs (ogg, mp3, m4a, divx, xvid, h264, mov, etc) and is based on the solid ffmpeg solution to decode audio and video.

My implementation, uses the plug-in capabilities of JMF to extend a custom renderer that does a pixel type conversion and rendering to a texture:

More »

Tags: , , , , , , , , , , ,
  • about me

    I'm Paulo Ragonha, a brazilian hobbyist game developer, who enjoys playing with technology on my free time, my (current) main language is Java so you will probably see a lot of stuff about it in here, I also occasionally talk abut random stuff... and will probably post a "game" every once in a while.
    Thanks for passing by!


  • twitter