Hi Guys!
I downloaded the API and inserted the zip into the libraries.
Well, netbeans had issues finding the packages so i added each .jar separately.Well it kinda worked but, now this error happens :
CODE: SELECT ALL
run:
org.lwjgl.LWJGLException: Could not locate OpenAL library.
at org.lwjgl.openal.AL.create(AL.java:151)
at org.lwjgl.openal.AL.create(AL.java:102)
at org.lwjgl.openal.AL.create(AL.java:201)
at com.badlogic.gdx.backends.openal.OpenALAudio.<init>(OpenALAudio.java:70)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:80)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:64)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:56)
at Main.Main.main(Main.java:29)
Tyrian: Creating game
Tyrian: Resizing game to: 800 x 480
FPSLogger: fps: 61
FPSLogger: fps: 60
Tyrian: Pausing game
Tyrian: Disposing game
Java Result: -1
CONSTRUÍDO COM SUCESSO (tempo total: 2 segundos)
Im unsure on how to “install” or add this to my netbeans library, so i was wondering if anyone could give me a hand.
Ty
Ah, just to be clear, i know how to add libraries to my projects
Im following a tutorial, this is the two classes that the tutorial are using :
package Main;
/**
*
*/
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.FPSLogger;
import com.badlogic.gdx.graphics.GL20;
/**
* The game's main class, called as application events are fired.
*/
public class Tyrian
implements
ApplicationListener
{
// constant useful for logging
public static final String LOG = Tyrian.class.getSimpleName();
// a libgdx helper class that logs the current FPS each second
private FPSLogger fpsLogger;
@Override
public void create()
{
Gdx.app.log( Tyrian.LOG, "Creating game" );
fpsLogger = new FPSLogger();
}
@Override
public void resize(
int width,
int height )
{
Gdx.app.log( Tyrian.LOG, "Resizing game to: " + width + " x " + height );
}
@Override
public void render()
{
// the following code clears the screen with the given RGB color (green)
Gdx.gl.glClearColor( 0f, 1f, 0f, 1f );
Gdx.gl.glClear( GL20.GL_COLOR_BUFFER_BIT );
// output the current FPS
fpsLogger.log();
}
@Override
public void pause()
{
Gdx.app.log( Tyrian.LOG, "Pausing game" );
}
@Override
public void resume()
{
Gdx.app.log( Tyrian.LOG, "Resuming game" );
}
@Override
public void dispose()
{
Gdx.app.log( Tyrian.LOG, "Disposing game" );
}
}
package Main;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.Audio;
/**
*
*/
public class Main
{
public static void main(String args[])
{
// create the listener that will receive the application events
ApplicationListener listener = new Tyrian();
// define the window's title
String title = "Tyrian";
// define the window's size
int width = 800, height = 480;
// whether to use OpenGL ES 2.0
boolean useOpenGLES2 = false;
// create the game
LwjglApplication lwjglApplication = new LwjglApplication( listener, title, width, height, useOpenGLES2 );
}
}