Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (579)
games submitted by our members
Games in WIP (500)
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  
  Doublebuffering  (Read 1670 times)
0 Members and 1 Guest are viewing this topic.
Offline elias4444

Junior Member





« Posted 2004-01-15 15:44:10 »

Hi everyone! First off, I'm completely new here, so please be kind.  Wink

I've recently moved to Java for my hobbyist game coding, but I'm apparently learning rather slowly. My first big question is about activating a double-buffer in my app. I'm using swing with JFrame and JPanel, and Java2D to extend JPanel with Gaphics2D objects. (I've actually succeeded already in antialiasing everything!) I've heard rumor that swing automatically implements double-buffering...is this true? I definitely don't notice as much flickering in a JPanel, but it does seem to happen once in a while. Is there something special I still have to do to activate it?

Any other "newbie" advice for game programmers would be welcome as well. Thanks!  Grin

Offline Orangy Tang

JGO Kernel


Medals: 51
Projects: 11


Monkey for a head


« Reply #1 - Posted 2004-01-15 15:53:20 »

Swing does double buffering automajically, but its not very handy for games. You'll want to use BufferStratergy instead to get a double/triple buffer that you can control yourself. Should be plenty of examples of people using it in the forum..

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline elias4444

Junior Member





« Reply #2 - Posted 2004-01-15 23:25:46 »

I don't mean to sound ungrateful or anything, but I just spent the last couple of hours scouring this board in search of double-buffering info...my head is swimming now.  Huh

There seems to be so much info out there, and everyone seems to have a different way of doing it. So here's just a few more questions:

1) What's better for making games? Jpanel? Panel? Canvas? Something else?

2) What's the best way to implement buffering in that method? BufferStrategy? Is there a good tutorial on this somewhere?

3) I seem to keep running into old information pertaining to older releases of Java. Is there a good place to get recent recommendations on game coding in Java?

and lastly:
4) I'm REALLY confused on the 3D front...Sun seems to be coding apps in 3D (like their new 3D desktop they recently showed off), but I've heard they dropped Java3D. So what are they officially using? Is something going to be built into Java 1.5?

I'm really sorry for the newbie issues here. I'm incredibly interested in the cross-platform capabilities of Java, and so I'm trying to learn it...there's just so many API's and methods to learn that I'm starting to fall apart at the cerebral cortex.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline NexusOne

Junior Member




Java games rock!


« Reply #3 - Posted 2004-01-16 02:49:04 »

I just use awt, though many people wouldn't suggest it. AWT seems very intuitive to me, you might want to try it.
Offline Jeff

JGO Coder




Got any cats?


« Reply #4 - Posted 2004-01-16 03:58:18 »

Okay, lost of questions...

IF you are in a Java2 envrionment I would strongly suggest either the FullScreen/BufferStrategy API (which doesnt have to be full screen despite the name) OR using an OGL binding and doing "2D with 3D" like Cas did for AlienFlux.

OTOH if you are coding Applets for deployment today then you may need to deal with MSFTS shitty MSVM in which case you are  in an AWT world.  It can still be done, some of my earliest Java stuff was done that way and I got okay results.  Its just more painful.  The guys here who do it regularly can help you there.

On the 3D front let me clear up what I can:

(1) Java3D is not abandoned.  It is however in "stasis" with no new development being done right now.  I don't have more I can say about that right now, when it stops living the life of Schroedinger's Cat I'll let you guys know the outcome.  There ARE a great many Universities and the like still doing work in it so it would be pretty hard to just kill outright. (In fact the mars rover browser you can download from NASA is a Java3D app and they are using a version of the same App inside NASA for real mission work.)

(2) We in the GTG felt it was important to cover the basics that hadn't been covered til now. Ergo we focused on an OGL binding.
We (the Sun Game Technology Group) are supporting JOGL.  Another alternative is Cas's LWGL.  Either have their strong points.

(3) There are 2 alternate open source scene-graph projects in the works that play ina similar space as Java3D but are being developed with a bit more of a game-focus.  Those are Xith and a currently unnamed project of Shawn Kendall

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline elias4444

Junior Member





« Reply #5 - Posted 2004-01-19 22:06:20 »

Are any of these 3D APIs going to be officially supported in the next release of Java? I'm really concerned about keeping with the "Sun standard" (if there is such a thing).  I also like making sure that people who use my programs have minimal effort in installing them. If I use JOGL for instance, will anyone running my app have to go out, find the JOGL binaries and install them?

Offline Orangy Tang

JGO Kernel


Medals: 51
Projects: 11


Monkey for a head


« Reply #6 - Posted 2004-01-19 22:38:13 »

Quote
Are any of these 3D APIs going to be officially supported in the next release of Java? I'm really concerned about keeping with the "Sun standard" (if there is such a thing).

Current guesstimates are no, but then again thats not really too relevant. Any kind of mythical "Sun standard" is also pretty irrelevant. Java3D doesn't work on Mac, Jogl is still less reliable than LWJGL - in short being "official" doesn't guantee you it actually being the right thing to use.

Quote
I also like making sure that people who use my programs have minimal effort in installing them. If I use JOGL for instance, will anyone running my app have to go out, find the JOGL binaries and install them?

S-Type (see sig) uses Jogl, yet by using webstart the user doesn't have to lift a finger - platform dependant files get sucked down automajically. And theres no reason why you can't use webstart and LWJGL to do the same (although i think Java3D + webstart requires all sorts of weird voodoo).

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #7 - Posted 2004-01-20 01:47:01 »

Quote
Java3D doesn't work on Mac,


Um, it sure does.
Java3D and Java Advanced Imaging were released for Mac OS 10.3 several weeks ago.

Offline Jaeden

Senior Newbie




There is no knowledge that is not power.


« Reply #8 - Posted 2005-08-17 06:02:53 »

(3) There are 2 alternate open source scene-graph projects in the works that play ina similar space as Java3D but are being developed with a bit more of a game-focus.  Those are Xith and a currently unnamed project of Shawn Kendall

OMG Shawn Kendall.. Had him as a teacher once. Used to rag on him about Java; now I'm doing it too. LOL.
Offline Jeff

JGO Coder




Got any cats?


« Reply #9 - Posted 2005-08-17 07:05:28 »

(3) There are 2 alternate open source scene-graph projects in the works that play ina similar space as Java3D but are being developed with a bit more of a game-focus.  Those are Xith and a currently unnamed project of Shawn Kendall

OMG Shawn Kendall.. Had him as a teacher once. Used to rag on him about Java; now I'm doing it too. LOL.

Actually, Shawn abandoned his scene graph and has gone back to J3D now that its outy of stasis again Smiley

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
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.

xsi3rr4x (31 views)
2014-04-15 18:08:23

BurntPizza (28 views)
2014-04-15 03:46:01

UprightPath (43 views)
2014-04-14 17:39:50

UprightPath (26 views)
2014-04-14 17:35:47

Porlus (42 views)
2014-04-14 15:48:38

tom_mai78101 (64 views)
2014-04-10 04:04:31

BurntPizza (124 views)
2014-04-08 23:06:04

tom_mai78101 (224 views)
2014-04-05 13:34:39

trollwarrior1 (190 views)
2014-04-04 12:06:45

CJLetsGame (198 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!