Ultra GL - The open source Wipeout clone!

Ultra GL is going to be a fast, cross platform Wipeout clone that focuses on the arcade feel, and tight controls that make Wipeout so great!

I’ve already managed to get a basic engine going, with lighting, sounds, music, input, textures, and collision detection.

I’m looking for a few good men to help out with this project. It’ll be completely open sourced from start to finish.

Wanna know more about what I’m talking about?

Here’s a video of it so far.

And here’s a tech demo:
http://prime.programming-designs.com/java/ultragl.jnlp

Here is the source code: http://prime.programming-designs.com/java/ultra_gl/ultra_gl_dec_28_09.zip

Become a part of Ultra GL today, and secure your part in indie gaming history!

I managed to fix the error where if you have a road with -depth the car wouldn’t go down by changing the code in void coltest(Ship a) to:


if(groundTest[i].depth > 0.0f)
                    a.rotx = (float) (Math.atan(groundTest[i].y/groundTest[i].height) * ((360/2)/3.14159265));
                
                else if(groundTest[i].depth < 0.0f)
                    a.rotx = (float) -(Math.atan(groundTest[i].y/groundTest[i].height) * ((360/2)/3.14159265));

                
                else
                    a.rotx = 0;

Now I just need to fix the collision to not stop making the car go up/down once the car’s maxz goes off the road onto another.


if(a.minx < (groundTest[i].x + groundTest[i].width) &&
            a.maxx > groundTest[i].x && a.minz < groundTest[i].z &&
            a.maxz > (groundTest[i].z - groundTest[i].height)) // end of error
            {

Since I’ve been asked to I’ll post the whole method’s code with comments


 void coltest(Ship a)
    {
        boolean b = false;
        
        //loop * number of roads
        for(int i = 0; i < maxGround; i++)
        {
            //if you're inside the current road
        	//here is the slowly get pulled under the track error...
            if(a.minx < (groundTest[i].x + groundTest[i].width) &&
            a.maxx > groundTest[i].x && a.minz < groundTest[i].z &&
            a.maxz > (groundTest[i].z - groundTest[i].height)) // end of error
            {
                //set current road to i
                a.cur_col_face = i;

                 //if road depth > 0 make the car rotate up
                if(groundTest[i].depth > 0.0f)
                    a.rotx = (float) (Math.atan(groundTest[i].y/groundTest[i].height) * ((360/2)/3.14159265));
                
                //if road depth < 0 make the car rotate down
                else if(groundTest[i].depth < 0.0f)
                    a.rotx = (float) -(Math.atan(groundTest[i].y/groundTest[i].height) * ((360/2)/3.14159265));

                
                else
                    a.rotx = 0;



                b = true;
            }
        }

        if(!b) // if outside of road reset car position.
        {
            a.x = -5;
			a.z = 10;
			a.y = 2;
        }
    }

Lighting


private float lightAmbient[] = { 0.0f, 0.0f, 0.0f, 1.0f };  // Ambient Light Values ( NEW )
    private float lightDiffuse[] = { 1.0f, 1.0f, 1.0f, 1.0f };      // Diffuse Light Values ( NEW )
    private float lightPosition[] = { 0.0f, 0.0f, -5.0f, 1.0f }; // Light Position ( NEW )
    private float lightSpecular[] = { 1.0f, 1.0f, 1.0f, 1.0f };


ByteBuffer temp = ByteBuffer.allocateDirect(16);
        temp.order(ByteOrder.nativeOrder());
        GL11.glLight(GL11.GL_LIGHT1, GL11.GL_AMBIENT, (FloatBuffer)temp.asFloatBuffer().put(lightAmbient).flip());              // Setup The Ambient Light
        GL11.glLight(GL11.GL_LIGHT1, GL11.GL_DIFFUSE, (FloatBuffer)temp.asFloatBuffer().put(lightDiffuse).flip());              // Setup The Diffuse Light
        GL11.glLight(GL11.GL_LIGHT1, GL11.GL_POSITION,(FloatBuffer)temp.asFloatBuffer().put(lightPosition).flip());         // Position The Light  
        GL11.glLight(GL11.GL_LIGHT1, GL11.GL_SPECULAR,(FloatBuffer)temp.asFloatBuffer().put(lightSpecular).flip());         // Position The Light  
        
        GL11.glEnable(GL11.GL_LIGHTING);
        GL11.glEnable(GL11.GL_LIGHT1);
        
        //GL11.glEnable(GL11.GL_COLOR_MATERIAL);
        GL11.glShadeModel(GL11.GL_SMOOTH);

        //float global_ambient[] = { 0.5f, 0.5f, 0.5f, 1.0f };
        //GL11.glLightModeli(GL11.GL_LIGHT_MODEL_AMBIENT, 0xff0000ff);

        
        GL11.glMateriali(GL11.GL_FRONT_AND_BACK, GL11.GL_SPECULAR, 0xffffffff);

Sorry I get this:

[quote]JNLP JREDesc in Component ignored: http://lwjgl.org/jnlp/extension.php
JNLP JREDesc in Component ignored: http://lwjgl.org/jnlp/extension.php
Wed Dec 30 16:07:48 CET 2009 INFO:Initialising sounds…
Wed Dec 30 16:07:48 CET 2009 INFO:- Sound works
Wed Dec 30 16:07:48 CET 2009 INFO:- 64 OpenAL source available
Wed Dec 30 16:07:48 CET 2009 INFO:- Sounds source generated
java.lang.NullPointerException: mode must be non-null
at org.lwjgl.opengl.Display.setDisplayMode(Display.java:240)
at Game2.createWindow(Game2.java:501)
at Game2.init(Game2.java:522)
at Game2.run(Game2.java:81)
at Game2.main(Game2.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.javaws.Launcher.executeApplication(Launcher.java:1188)
at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1134)
at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:983)
at com.sun.javaws.Launcher.run(Launcher.java:121)
at java.lang.Thread.run(Thread.java:619)
[/quote]

I got an error, something about a memory error.

EDIT: it worked fine though, this error was on close.

Hmmm… no luck for me too ;D

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.sun.javaws.Launcher.executeApplication(Unknown Source)
	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
	at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
	at com.sun.javaws.Launcher.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: org/lwjgl/openal/OpenALException
	at org.newdawn.slick.openal.AudioLoader.init(AudioLoader.java:33)
	at org.newdawn.slick.openal.AudioLoader.getAudio(AudioLoader.java:48)
	at Game2.init(Game2.java:512)
	at Game2.run(Game2.java:81)
	at Game2.main(Game2.java:69)
	... 9 more
Caused by: java.lang.ClassNotFoundException: org.lwjgl.openal.OpenALException
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	... 14 more

Works for me,… but it’s very far from a wipeout clone.

I used to love Wipeout 2097.

what are you planning to do for collisions? and map creation? (I mean in the long run)

I actually wouldnt mind helping with this project as so far its LWJGL.

check out this link:
http://www.psionic3d.co.uk/?page_id=25
it has a free wipeout like ship model, that would work great as a placeholder. The “fighter.zip” model.