Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Spoon Thumb

Member Since 23 May 2010
Offline Last Active Feb 18 2013 11:59 AM
-----

Topics I've Started

OUYA Devkit Giveaway Competition

05 February 2013 - 04:48 AM

We're running a competition to give away an OUYA Devkit over at ouyaforum.com

The idea is to come up with a design for a game you or your team would like to make for the OUYA, and present that idea on the forums.

The closing date for entries is Feb 14th, with a poll running on the forums until the 16th to decide the winner!

There have been a number of entries so far, but still plenty of opportunity for someone with a really great design to enter and win!

The rules etc are all up on the forums, or you can ask questions here if you want. Also note that it's limited just to individuals or teams based in Europe (hence the Euro part)

 


Lighting and glMultMatrixf problem

22 July 2012 - 05:25 AM

I've written a basic graphics engine for OpenGL-ES 1.1 in Java for Android. I use the following code to orientate the spaceships in my game to point in the direction of travel:
[source lang="java"]gl.glPushMatrix();transforms[i].transform(gl);gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_POSITION, light0Position); model.drawVertexBufferObjects((GL11) gl);gl.glPopMatrix();[/source]

[source lang="java"]public void transform(GL10 gl) { gl.glTranslatef(xyz[0], xyz[1], xyz[2]); // where xyz holds the coordinates of the spaceship gl.glScalef(scale,scale,scale); Orientate(gl); }[/source]
[source lang="java"]private FloatBuffer startMatrixFB;protected void Orientate(GL10 gl){ if(startMatrixFB==null){ ByteBuffer byteBuffer = ByteBuffer.allocateDirect(16 * 4); byteBuffer.order(ByteOrder.nativeOrder()); startMatrixFB = byteBuffer.asFloatBuffer(); } startMatrixFB.position(0); startMatrixFB.put((float) -rightOrientationVector.mX); startMatrixFB.put((float) -rightOrientationVector.mY); startMatrixFB.put((float) -rightOrientationVector.mZ); startMatrixFB.put(0); startMatrixFB.put((float) upOrientationVector.mX); startMatrixFB.put((float) upOrientationVector.mY); startMatrixFB.put((float) upOrientationVector.mZ); startMatrixFB.put(0); startMatrixFB.put((float) directionVector.mX); startMatrixFB.put((float) directionVector.mY); startMatrixFB.put((float) directionVector.mZ); startMatrixFB.put(0); startMatrixFB.put(0); startMatrixFB.put(0); startMatrixFB.put(0); startMatrixFB.put(1); startMatrixFB.position(0); gl.glMultMatrixf(startMatrixFB);}[/source]
The problem is that this doesn't affect the diffuse lighting. The lighting on the ship appears without taking into account the changes made by the Orientate() method. I.e. the light is always in the same place relative to the model:

Attached File  lighting_problem_iridian.png   455.45K   20 downloads

If anyone can help me solve this, I'd be most appreciative

Thanks
James

Localisation ballpark cost?

16 March 2012 - 11:13 AM

I really like the idea of localising my android game. It has no audio or video but does have a lot of words (say 5000). However, I have no experience of doing any localisation before.

I want to get it done professionally and I also want to get local business partners involved to promote the game in various regions rather than just translate it, throw it out there and hope.

However, before I start getting too excited, I'd be interested if anyone has some ballpark figures for the cost of the whole process?

PARTNERS