Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  scroller test  (Read 3503 times)
0 Members and 1 Guest are viewing this topic.
Offline zulo

Junior Member




Java games rock!


« Posted 2006-02-20 21:40:50 »

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 Smiley

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

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #1 - Posted 2006-02-20 22:27:56 »

runs smooth for me!  Smiley

Offline nva225

Junior Member





« Reply #2 - Posted 2006-02-21 04:35:41 »

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.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline zulo

Junior Member




Java games rock!


« Reply #3 - Posted 2006-02-21 10:22:38 »

ok then i can just use vsyncenable. Yes that black line is drawn there,i forgot to remove it.
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 74
Projects: 15


★★★★★


« Reply #4 - Posted 2006-02-21 14:31:34 »

runs nice and smooth here, looks promising.
Offline Malohkan

Senior Member




while (true) System.out.println("WOO!!!!");


« Reply #5 - Posted 2006-02-21 15:46:21 »

yup, definitely smooth!

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Offline jojoh

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #6 - Posted 2006-02-21 18:00:26 »

Rock solid on lap (60 Hz) winXP Java 1.5

Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #7 - Posted 2006-02-21 18:05:09 »

Smooth as well here.

Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #8 - Posted 2006-02-21 18:49:28 »

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
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 Sad

Offline zulo

Junior Member




Java games rock!


« Reply #9 - Posted 2006-02-22 16:23:30 »

oops I forgot to add the mac native  Roll Eyes

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

<resources os="Mac OS" arch="i386">
    <j2se version="1.5+"/>
    <nativelib href="lwjgl_mac.jar"/>";
 </resources>

where lwjgl_mac.jar is signed and contains liblwjgl.jnilib
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #10 - Posted 2006-02-22 20:42:02 »

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

Offline zulo

Junior Member




Java games rock!


« Reply #11 - Posted 2006-02-23 00:42:13 »

ok i changed it to:
<resources os="MacOS">
    <j2se version="1.5+"/>
    <nativelib href="lwjgl_mac.jar"/>";
 </resources>

hope it works now  Smiley
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();
  }
}
}
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #12 - Posted 2006-02-23 01:39:53 »

[...]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) ?
[...]

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.

弾幕 ☆ @mahonnaiseblog
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #13 - Posted 2006-02-23 06:22:41 »

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();
  }
}
}

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
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'");
        }
    }
}


...

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

Offline zulo

Junior Member




Java games rock!


« Reply #14 - Posted 2006-02-23 09:48:41 »

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

ok i added a space now  Smiley
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (24 views)
2014-07-24 01:59:36

Riven (23 views)
2014-07-23 21:16:32

Riven (18 views)
2014-07-23 21:07:15

Riven (21 views)
2014-07-23 20:56:16

ctomni231 (50 views)
2014-07-18 06:55:21

Zero Volt (45 views)
2014-07-17 23:47:54

danieldean (36 views)
2014-07-17 23:41:23

MustardPeter (39 views)
2014-07-16 23:30:00

Cero (54 views)
2014-07-16 00:42:17

Riven (55 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!