Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (120)
games submitted by our members
Games in WIP (577)
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  
  Another n00b inquiring about libraries  (Read 1340 times)
0 Members and 1 Guest are viewing this topic.
Offline Malohkan

Senior Duke




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


« Posted 2004-07-19 23:26:15 »

I'm coming to the end of the development of my game, and I'm wanting to push up the performance.  I made it for a mobile phone, then decided I could keep the concept the same and improve the graphics and it'd make a pretty good pc game.  So I made it work great as an Applet, but when I want to go high-res and full screen, it doesn't quite cut it.

Almost the only time I ever do anything with Graphics2D in real time is drawImage(Image image, int x, int y, ImageObserver io); and drawImage(Image image, AffineTransform trans, ImageObserver io);

I'm thinking if I use something like LWJGL or JOGL or something I could improve on my draw speeds and keep my frame rate high and constant, but I really don't know what I should do.  I'd like to make it pluggable... so I could say... create my own class that determines where drawImage gets redirected to, or something like that.  The point being I could switch between software or hardware rendering modes easily.

The game is practically done, I don't need any real logic support from a library.  I just want it to manipulate images fast.  Oh, and something with good audio support would be nice.  I'd love to have a background track along with a heck of a lot of sounds playing at once.  Like I'd really be pushing the limit of the number of sounds that could play at one time.

So what library would I need and what resources do I need to look up to learn how to use it?  Also, how fast could I implement the graphics portion?  The audio portion I'd be putting in from scratch as it doesn't exist in my game yet, but I do have the sounds I want to use (is there a particular audio file format that would be best?).  I'd like to think that within a week of daily hard work I could be able to switch between software and hardware rendering modes at the touch of a button and all be well.  Is that realistic?

Thanks for any answers Smiley  Oh, and to see the current stage of the game, go here (800x600 Applet):
http://www.gamelizard.com/test/rimscape.html

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

Junior Duke




Nothing unreal exists


« Reply #1 - Posted 2004-07-27 06:10:02 »

did you try the game using java 5.0's opengl pipeline?

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline Malohkan

Senior Duke




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


« Reply #2 - Posted 2004-07-28 02:25:46 »

no, I've never heard of that before... and a google search didn't help.  Can you explain a bit more what that is?

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline pepe

Junior Duke




Nothing unreal exists


« Reply #3 - Posted 2004-07-28 03:27:00 »

Quote
no, I've never heard of that before...

Shocked hem.. broum... well. you should pass time in the java2D forum, instead..
well. coming version of sun's jvm had an opengl implementation of java2D.   by using a flag on windows, you can switch from the normal rendering engine to an opengl one. On linux, there is also a gl pipeline.
my own tests show a huge speed increase.
I suggest you download latest beta jre and test it.
the flag is sun.java2d.opengl = True
(note the 'T'. it says to report if the gl pipeline is used or not in standard output (console))

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline Malohkan

Senior Duke




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


« Reply #4 - Posted 2004-07-28 19:06:03 »

hmmm I'm running:
System.setProperty("sun.java2d.opengl", "True");
under JRE 1.5.0 and nothing gets printed out.  What does that mean?

EDIT:  OK I placed it earlier and got: Could not enable OpenGL pipeline for default config on screen 0

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

Junior Duke




Nothing unreal exists


« Reply #5 - Posted 2004-07-29 03:08:59 »

argh.
too bad it does not say a bit more explicitly why it was not enabled.
maybe Hercules should move that thread to java2D, so the guys from the java2D team can get an eye on it.

what are you graphics adapter and os? do you have latest drivers?

maybe GL acceleration does not work in applets due to security exceptions.. who knows.

[edit] by the way, your applet works at 60 fps on my machine. why trying to make it faster? is it that slow on yours?

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline Malohkan

Senior Duke




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


« Reply #6 - Posted 2004-07-29 12:05:31 »

It runs at 60fps on mine (but 50 using 1.5, go figure.  GAGE Timer weirdness I guess.  jbanes said that setting it at 50 would work even with the poor Windows system timer, but it seems to always be at 60 now), however many other computers I've tested it on go slower.  Mac's can only pull off like 30fps.

I'm planning on selling the game with a version I have drawing the game on a Canvas using BufferStrategy.  Using that I can't get 60fps running fullscreen at 1024x768.  I'd like the game to be able to go higher without worrying bout dropping frame rate.

I'm on Win XP Pro on a 2ghz Toshiba laptop, 512mb ram, using the latest Intel(R) Extreme Graphics2 for Mobile drivers for my Intel(R) 82852/82855 GM/GME Graphics Controller.  64mb of video memory, and full OpenGL support.  When I run that System property before changing screen resolution I get the output I described.  When I set it after, I get no output.

BTW what post are you referring to?  I search all the forums and never find anyone else referring to using this setting

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

Junior Duke




Nothing unreal exists


« Reply #7 - Posted 2004-07-29 14:22:23 »

There are many pages reffering to that flag in the j2D forum, maybe you searched in a too little time frame. (i found 11 results)
Anyway, i'm mainly reffering to that page, which has been advertised here and there:
http://java.sun.com/j2se/1.5.0/docs/guide/2d/new_features.html

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline Malohkan

Senior Duke




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


« Reply #8 - Posted 2004-07-29 15:45:38 »

reading that has shown that Java will be very picky about what it needs to enable OpenGL support, so I don't think this will be a good enough option for my game.

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
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.

Longarmx (52 views)
2014-10-17 03:59:02

Norakomi (43 views)
2014-10-16 15:22:06

Norakomi (33 views)
2014-10-16 15:20:20

lcass (38 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (68 views)
2014-10-14 00:35:47

TehJavaDev (60 views)
2014-10-14 00:32:37

BurntPizza (73 views)
2014-10-11 23:24:42

BurntPizza (45 views)
2014-10-11 23:10:45

BurntPizza (86 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!