Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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  
  is okay dev path: first write -desktop with lwjgl, then convert to android?  (Read 2549 times)
0 Members and 1 Guest are viewing this topic.
Offline philfrei
« Posted 2013-08-07 06:19:14 »

Converting my game to Libgdx is clearly a big task, and I'm disappointed that my custom-generated sounds would have to go through an audio device that only plays mono and has a large latency (via "AudioDevice" -- Playing PCM Audio

Am I misreading this, or does and suffer from the same latency issues cited above? I'm pretty sure at least with and one has control of volume and panning settings, so stereo must be possible, unlike with AudioDevice.

The coding of AudioDevice and and all seem to rely directly on LWJGL implementation of OpenAL. I'm downloading source now to poke around and see if I can't rig up a way to play audio from the functional equivalent of a TargetDataLine and get stereo and decent latencies.


The main question is this: is it reasonable to go about rewriting my game's graphics via LWJGL's implementation of OpenGL, and include whatever I can conjure up to my satisfaction for the audio, as a first step, and then, once that is working, go about doing whatever is needed to make an Android-playable version of the game?

I can see that if Libgdx becomes necessary at the second stage, will I at least be able to keep any working LWJGL/OpenGL graphics already coded, and mostly only have to deal with the headache of rewriting the input interface and dealing with screens? Will there be other paths to recoding my MouseMotionListeners and etc without using Libgdx? How much pain are we looking at?

music and music apps:
Offline badlogicgames

« JGO Bitwise Duke »

Medals: 82
Projects: 2

« Reply #1 - Posted 2013-08-07 08:00:46 »

AudioDevice allows stereo playback. The latency is as good as it gets on Android (read horrible). The only other API on Android you can use is OpenSL, which has the exact same latency as AudioDevice.

Regarding GL: if you stick to OpenGL ES functionality on the desktop you'll be fine. But it's extremely easy to mes up.

There's a reason why gdx exists Smiley - musings on Android and Java game development
Offline philfrei
« Reply #2 - Posted 2013-08-07 21:26:23 »

Thanks for clarifying about the latencies.

Is the latency equally bad for effects playback? Bullets/explosions/utility clicks lag over a 1/10th of a second, routinely?

Or does this just apply to generated PCM data playback?

Do we get better latencies with pads as opposed to phones? Do you know generally how much better?

music and music apps:
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline davedes
« Reply #3 - Posted 2013-08-08 03:02:02 »

Android audio support has always been pretty awful. Sad

As to LWJGL vs LibGDX... I don't see much of a point in using LWJGL unless you just want to feel like a rebel. LibGDX exposes GL ES, so you can call glXXX functions directly. More likely, though, you will want to use LibGDX's utilities to increase your productivity and make your time as a developer less painful. Further; if you ever plan to support more than desktop, then LWJGL isn't really a great option.

That pretty much sums up my stance every time this subject comes up. Wink

Offline philfrei
« Reply #4 - Posted 2013-08-08 06:45:37 »

Thanks Davedes, I have a lot of respect for your opinion. (As well as many others here!)

Am feeling stymied though. As far as personal satisfaction, a big part is sound design and composing, or else I start asking myself wtf am I doing here when I could be investing more time just writing music and selling that.

OK, get a grip...

music and music apps:
Offline philfrei
« Reply #5 - Posted 2013-08-09 19:07:55 »

So far, I am really pleased with LWJGL. It is a thing of beauty, an implementation that fully expresses what I love about Java and rekindled my passion for programming a couple years ago.

Two weeks ago I passed a kidney stone. I know, TMI. But the relief I experienced then doesn't match the relief I am feeling now, letting go of GWT/Android plugins, Libgdx, et al., and discovering that LWJGL is so well written.

On to learning OpenGL!

music and music apps:
Pages: [1]
  ignore  |  Print  

EgonOlsen (61 views)
2018-06-10 19:43:48

EgonOlsen (42 views)
2018-06-10 19:43:44

EgonOlsen (61 views)
2018-06-10 19:43:20

DesertCoockie (241 views)
2018-05-13 18:23:11

nelsongames (142 views)
2018-04-24 18:15:36

nelsongames (141 views)
2018-04-24 18:14:32

ivj94 (883 views)
2018-03-24 14:47:39

ivj94 (144 views)
2018-03-24 14:46:31

ivj94 (795 views)
2018-03-24 14:43:53

Solater (159 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!