scroller test

Hey

I would be glad if someone could test my scroller-test to see if it runs and if its as smooth as on my computer.

Using LWJGL to render 2d sprites and bitmaps, this test has a 10*40 sized tilemap and theres around 100 tiles(not much i guess?) on the screen at any moment.

I also have a question: First I tried to use Display.sync(60), but i noticed a little lag in the scrolling of the map.
Now I have changed it and removed Display.sync(60) to use only Display.setVSyncEnabled(true);

When I use Display.setVSyncEnabled(true); it still is vsynced and incredibly smooth and thats why i wonder why use Display.sync(60) when you can get
vsync,and isnt the result of vsync the same as Display.sync(60) ?

Java Webstart http://www.vestheimonline.com/games/jnlp/vestheimgames-test1.jnlp for your pleasure :slight_smile:

Controls: ESC to exit, arrows up and down to scroll.

runs smooth for me! :slight_smile:

Just fine, assuming of course there’s supposed to be a verticle black line about 2/3rds the way to the right. Wouldn’t expect that to lag the system though. You should try going for a large number of tiles, at least a few thousand, and make it noticeable where the tiles are divided for testing purposes. Gl with whatever you’re doing though.

And wouldn’t sync(60) only work if your monitor refreshed at 60 fps? While some do, most refresh at 72/75 (forget which, too lazy to look it up) or something higher. VSync should just make sure you have the right sync so that you don’t have to figure it out.

ok then i can just use vsyncenable. Yes that black line is drawn there,i forgot to remove it.

runs nice and smooth here, looks promising.

yup, definitely smooth!

Rock solid on lap (60 Hz) winXP Java 1.5

Smooth as well here.

java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
	at java.lang.Runtime.loadLibrary0(Runtime.java:822)
	at java.lang.System.loadLibrary(System.java:992)
	at org.lwjgl.Sys$1.run(Sys.java:67)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.lwjgl.Sys.<clinit>(Sys.java:65)
	at org.lwjgl.opengl.Display.<clinit>(Display.java:104)
	at vestheimgames.spillmotor.lwjgltest.Test.<init>(Test.java:102)
	at vestheimgames.spillmotor.lwjgltest.Test.main(Test.java:343)
	... 11 more

The JNLP does not appear to be Mac-friendly :frowning:

oops I forgot to add the mac native ::slight_smile:

but it should work now, I dont have mac so i cant test it, if this section is correct then it should work

";

where lwjgl_mac.jar is signed and contains liblwjgl.jnilib

That section is only correct if I had one of the new i386 based Macs, I don’t.

ok i changed it to:


";

hope it works now :slight_smile:
class Me implements Believer {

Universe.GOD.addBeliever(this);
Universe.GOD.getAvailableChannel().sendWish(new Wish(“correct mac resource specified in jnlp”,true));

wishProcessed(BelieverEvent w){
if(w.getStatus() == BelieveEvent.WISH_GRANTED){
this.beHappy();
}
}
}

setVSyncEnabled(true) will only gently ask for vsync. Its up to the driver to enable it. On the driver side you can set vsync to: always on, on by default, off by default and always off. Only if its #2 or #3 you can en/disable it with an api call.

The best thing you can do is trying to enable vsync and using sync (or sync2/3) as backup.

Say you want 60fps, then you have 16.666666 msec per frame. The used timer has msec precision therefore you should try the next rounded down value, which is 16. 16msec per frame means 62.5 fps, which is just fine. Its only a fart faster and there is enough room for timing differences (pc<->display)… so it shouldnt drop a frame if vsnyc is enabled.


class Me implements Skeptic
{
    static void main(String [] args)
    {
        if (Universe.contains(GOD))
        {
            System.out.println("It worked");
        }
        else
        {
            System.out.println("You need a space. e.g.'Mac OS'");
        }
    }
}


> java Me
You need a space. e.g.'Mac OS'
>

ok i added a space now :slight_smile: