Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (476)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (532)
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  
  Couple of Optimal Questions  (Read 2454 times)
0 Members and 1 Guest are viewing this topic.
Offline DarkMortar

Junior Member




Java Padawan


« Posted 2006-08-01 20:26:31 »

Ok, which renderer is the BEST and fastest for rendering a 2d game in an 800*600 Canvas app window. Is it the openGL one, yet there are two version i hear of a JOGL or soemthing and a LWJGL something like that. Well what is the best to learn. CokeandCode goes over both, but I dont know which one is better.

ALSO, sound. Lets say I want to play .mp3 files in java, and not wave in a game, because .wav is too large for music files. Do I use something called openAL, is this the best? Any tutorials on openAL? I just want to use the right stuff to start off.

ty for help.

Offline kevglass

JGO Kernel


Medals: 120
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1 - Posted 2006-08-01 20:33:11 »

Best is really subjective. OpenGL means you'll get better performance on most games playing systems - but it means you'll get the tricky-ness of making sure your end users have appropriate drivers. If you use pure Java2D it's likely to be slower than your bespoke implementation but it's easier to grasp and more likely to be compatible *everywhere*.

If you do choose OpenGL then the choice between JOGL and LWJGL is more about API style and support requirements. LWJGL uses a very static oriented API (mapping to that of OpenGL). JOGL uses a more object based API (mapping to that of Java). Which is better is really just a matter of what fits for you. Support-wise the forums here for JOGL are pretty active -but LWJGL has a more game oriented user base - so again,  it's a matter of taste.

Finally, I'd advise using OGG over MP3 - mostly because of the odd licensing around MP3 but more because there are plenty of sources of OGG decoding playing code for Java. If you were to choose LWJGL (OpenGL/OpenAL) and want to decode oggs you could use another of the coke and code tutorials on playing sounds  - sorry blatant plug. Though it might make more sense if you start at the beginning.

Kev

Offline DarkMortar

Junior Member




Java Padawan


« Reply #2 - Posted 2006-08-01 20:53:52 »

is it possible to make your game support BOTH java2d and LWJGL and let them choose? i think the space invaders tut # 3 lets you choose both, but its longer.

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

JGO Kernel


Medals: 120
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #3 - Posted 2006-08-01 21:05:08 »

Yeah, it's definitely possible. You write an abstraction layer across the top. However, here's one firm piece of advice (unusual for me). Pick your renderer and stick with it - good looking games are targetting to their audience's platform. You could spend alot of time of time making the rendering work in both system only to find you've got the lowest common capabilities between them.

If your requirements are:

* Render a 2D games - sprite based
* At 800x600

Then either works for you. Work out a few more requirements like:

* Want some special effects
* Must work everywhere
* Must have a small download
* Its my first real game, I want someone to ask questions to
* I want to render thousands of sprites per frame
* I've never developed with OpenGL and I need to have this finished next week (short timescale requirement Smiley)

You could determine what was right for you.

Kev

Offline DarkMortar

Junior Member




Java Padawan


« Reply #4 - Posted 2006-08-01 23:26:40 »

My game will have a lot of animation on its tiles, and the units will have movement animations, shooting,idle, ect.. which can osmetimes lead to about or more than a 1000 sprite animations on screen. Time is not an issue. And i plan to use transparency a lot.

Offline kevglass

JGO Kernel


Medals: 120
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #5 - Posted 2006-08-01 23:49:50 »

Then I'd suggest OpenGL in your case. Now you have to choose LWJGL or JOGL. I personalyl use LWJGL as my port of call. JOGL (or rather the JSR) will eventually become a part of the JRE (should be noted that this is still very *eventually*).

I use LWJGL mostly because I find the support to be outstanding - but secondly becomes I've seen commercial games written using it. I also prefer to be working outside of the shadow of the Sun. The benefit of having input/graphics/sound all packed into one consistant API also makes it very appealing.

Taking JOGL/JOAL/JInput as a comparison still seems to have it's issues (reading around the forums you'll see them). That's not to say it wouldn't work for you - I'd say LWJGL is less of a risk.

At the end the day the decision isn't terribly important, it's pretty easy to move back and forward. The import bit is to get on with the game Smiley

Kev

Offline DarkMortar

Junior Member




Java Padawan


« Reply #6 - Posted 2006-08-02 01:30:06 »

Ok ty for help, I will utilize LWJGL and OpenAL components.

Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #7 - Posted 2006-08-02 02:02:54 »

I use LWJGL mostly because I find the support to be outstanding - but secondly becomes I've seen commercial games written using it.

Seconded. The lwjgl forum also tends to be faster than the one here (although they're both pretty active).

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

Junior Member




Java games rock!


« Reply #8 - Posted 2006-08-02 13:22:39 »

Are you sure these questions are really optimal?  (sorry)
Offline DarkMortar

Junior Member




Java Padawan


« Reply #9 - Posted 2006-08-03 10:17:36 »

Ok, I actually am deciding to do accelerated Java2D instead, as most of my books cover it, and I am noob.

But as far as the sound handeler? I should still use OpenAL right, or something else? Also .ogg, does openAL allow me to modify all sounds it plays, so like I could have my game have a "sound enhancer" checkbox for people who want to utilized my coded sound enhancer?

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

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #10 - Posted 2006-08-03 14:41:12 »

As for sound, another option would be the standard JavaSound API. I personally prefer the JavaSound API over OpenAL as the former seems to be cleaner and easier to understand and learn. If you want to enhance sound on the fly, you will have to do streaming. Trivial in JavaSound, a bit more difficult and fiddly in OpenAL.
OTOH, OpenAL seems to be faster and has far less latency (at least on my machine).

So if you are a noob, I suggest to start with JavaSound. If you are a bit further in your learning process and you encounter problems with JavaSound that could be solved by OpenAL, you can always consider switching APIs later.
If you suspect you might be switching APIs at a later stage, create abstract interfaces for your sound system so you can simply reimplement them later using another API.

Offline DarkMortar

Junior Member




Java Padawan


« Reply #11 - Posted 2006-08-03 23:44:34 »

Yes, I am a noob.  Grin

I will utilize the JavaSound components  Grin

EDIT: But i thought JavaSound cant play .ogg or .mp3?

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #12 - Posted 2006-08-04 10:04:00 »

Quote
EDIT: But i thought JavaSound cant play .ogg or .mp3?

Sure it can. Look here: http://www.jcraft.com/jorbis/

Offline Death33284

Junior Member





« Reply #13 - Posted 2006-08-08 06:20:36 »

If you need to convert your files to .ogg I found that oggdrop is pretty nice with its drag-and-drop interface:

Oggdrop
Offline DarkMortar

Junior Member




Java Padawan


« Reply #14 - Posted 2006-08-11 04:21:09 »

But I also want a file format that isnt so "lossy" I know mp3 is pretty crap as far as lossy, hmm I dunno.

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #15 - Posted 2006-08-11 11:42:00 »

It all depends a bit on with what quality settings you encode your mp3 or ogg. If you encode with 256Kbps or more, the quality is pretty good. Maybe ogg sounds slightly better than mp3 with the same bitrate settings but the difference is pretty small with 256Kpbs and up. With such high bitrates, most people won't be able to tell the difference between mp3 and CD sound.

If you want lossless compression you have flac, but that leaves you with only 1/2 compression ratio and I don't know if there's a java lib for that.

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 (15 views)
2014-07-24 01:59:36

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

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

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

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

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

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

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

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

Riven (50 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!