Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (701)
Games in Android Showcase (203)
games submitted by our members
Games in WIP (774)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 40
1  Games Center / WIP games, tools & toy projects / Re: Praxis LIVE v3 - hybrid visual IDE for creative coding on: 2016-11-15 19:15:53
So, Praxis LIVE v3.0.0 is available - well, actually has been available for a few weeks now but I forgot to update this ...  persecutioncomplex



Downloads from www.praxislive.org, source code on GitHub.

Lots of changes have been made under the hood, including updating the embedded compiler to Java 8 with some new lambda goodness in the API, performance improvements in the OpenGL pipeline, updating GStreamer video support to 1.x, and revising all the audio components to be stereo and live-codeable.  Distributed hubs support has been improved with the ability to run the compiler on another process / machine, and a lightweight HTTP file server added for asset sharing.  And a new internal type for binary data (needed for bytecode) makes it easier to pass complex data around (eg. FFT data - see video).

See the full list of changes at http://praxis-live.readthedocs.io/en/latest/releases/

Since the release I wrote a blog post about Cyberphysical coding on the JVM, which also talks about some more general uses of live real-time coding and links to my ICLC paper mentioned above.  If this interests you too, say hi!  Smiley

I'll finish with some Funky Origami - here's a video rendering of one pass through one of the new examples using some of those new features, demonstrating generative audio and controlling a simple 3D shape with FFT data.

<a href="http://www.youtube.com/v/VBaY2_XXlaI?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/VBaY2_XXlaI?version=3&amp;hl=en_US&amp;start=</a>
2  Java Game APIs & Engines / Java Sound & OpenAL / Re: Should sound be on its own thread? on: 2016-10-31 11:58:46
@nsigma: If it is not too much trouble, could you demonstrate an example of the code in TinySound that tests if a sound or music cue has finished? I didn't know this could be done.

This week ... unlikely ... sorry  persecutioncomplex However, the TinySound Music interface has a done() method. I'm assuming that works right!  Grin

In my audio library, the equivalent Listener is frame-accurate. There is also a frame accurate event-scheduler.

The listener is good as a low-level mechanism, but as a library API it's somewhat problematic.  To work it requires that the listener is called in the audio thread, is lock-free, and perhaps forces certain state not to be messed with.  It's not ideal for the end user.  OTOH, a rich event scheduling API where the library user can pass in commands via a lock-free queue is generally a better approach for those unlike us who don't want to get deep into the nitty gritty.
3  Java Game APIs & Engines / Java Sound & OpenAL / Re: Should sound be on its own thread? on: 2016-10-30 23:11:59
This isn't about abandoning Java's audio - the library examples I gave are all deliberately things that build on JavaSound and do this properly.  I don't see a problem with handling your scenario in any of them - it's a pretty basic ask.  They're also going to do it with much better accuracy and performance.  Seriously, this is not a reason to use Clip.

With TinySound, you could also just check in your game loop whether the sound (actually Music!) has finished and retrigger it if required (eg. count greater than 0).  This won't offer sample accuracy - given that line listeners on a Clip aren't either and bring in a massive amount of overhead, it's still going to work a lot better! (EDIT - you realise that for each line listener call the output to the soundcard has been stopped and needs restarting? That's not cheap!)

I also think that OpenAL supports queuing of sounds in this way.  Never used it though, so I'm not the right person to answer.
4  Java Game APIs & Engines / Java Sound & OpenAL / Re: Should sound be on its own thread? on: 2016-10-30 12:08:06
No need to apologize @philfrei - just amused by the contradiction in your post, which does highlight quite a few ways that Clip is not the answer to this problem - is not designed for this.

We simply should not be advising people to use Clip in this case, or trying to suggest complicated workarounds that could easily break on another system.  There's no fundamental issue with JavaSound, but ill-advised usage like this just leads to a world of pain.

If the OP wishes to stick with a pure-Java solution then they need to look at one of the libraries designed for this (or write their own).  TinySound is one option, but there are others.  Minim is probably worth a look (which was written for Processing but will work outside it), or Beads, or JASS, or JSyn, or ...

... one day I may actually get around to making a single library out of the audio code in Praxis LIVE  persecutioncomplex
5  Java Game APIs & Engines / Java Sound & OpenAL / Re: Should sound be on its own thread? on: 2016-10-29 18:47:27
So, Phil, one line to disagree with something I didn't quite say, followed by four paragraphs that pretty much agree with what I said!  Tongue

I didn't say that Clip is not designed to be played more than once, but that they're badly specified for rapid, overlapping or synchronized sounds.  This is because the API is specified as extending DataLine rather than something that writes to a DataLine.  Since the (positive) move to direct audio devices, this means that it punts responsibility to the OS for mixing on AFAIK all implementations, rather than doing it internally.  Also, from OpenJDK source code it looks like each Clip uses a separate underlying Thread.  All this makes sense for the odd business use case for sound, but explains why application level mixing is required to get good performance for more complex uses in games, music, etc.

OpenAL-Soft uses an internal mixer to write to a single playback "line" as required.  It would be possible to write a pure-Java application that did everything OpenAL-Soft does using a JavaSound line, but not using Clip.

6  Java Game APIs & Engines / Java Sound & OpenAL / Re: Should sound be on its own thread? on: 2016-10-28 16:40:24
Never use Clip for this purpose.  It's not really designed for it.  Clip opens a line to the soundcard every time it's used.  For good performance in a game you want to open a line once and mix sounds to it as needed.  This is low level stuff - you may want to have a look at a library that does software mixing for JavaSound, such as TinySound, instead.
7  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-25 11:22:10
AMEN $ Mother Function : having some fun doing a live-coded single function demolition of the most ubiquitous sample in modern music (takes a little while to get going)

This is why they added lambdas to Java 8, right?!  persecutioncomplex  Grin

<a href="http://www.youtube.com/v/qTQoE5UHgP8?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/qTQoE5UHgP8?version=3&amp;hl=en_US&amp;start=</a>
8  Game Development / Shared Code / Re: Midi and Hertz conversions on: 2016-10-07 23:42:32
I'm using the code as @KaiHH posted.  While it might be possible to optimize it, I highly doubt it's worth it.

The class with this in also has some code I ported from Frinika that converts note names to MIDI number to feed into this.  That might be useful for what you're doing?

https://github.com/praxis-live/praxis/blob/master/praxis.audio.code/src/net/neilcsmith/praxis/audio/code/NoteUtils.java
9  Games Center / WIP games, tools & toy projects / Re: Praxis LIVE v3 - hybrid visual IDE for creative coding on: 2016-10-06 14:21:14


A release candidate of Praxis LIVE v3 is now available, with lots of exciting new features.  It's feature complete, but not fully tested / documented yet.

I'm currently on my way to Canada for the International Conference on Live Coding, where I'll be presenting a paper and demo using Praxis LIVE.

The full release will be done ASAP when I get back (yes, ran out of time!  Grin ).  In the meantime ...

v3.0.0-rc1 download - https://github.com/praxis-live/praxis-live/releases
v3 key changes - https://github.com/praxis-live/support/issues/34
10  Game Development / Articles & tutorials / Re: GPU blur performance analysis on: 2016-10-04 17:14:16
Really interesting!  Are you happy to share the benchmark code?
11  Java Game APIs & Engines / OpenGL Development / Re: Gaussian Blur Blobs? on: 2016-10-04 13:40:35
It's an issue with the alpha I bet. Don't blur the alpha.

Or better, use premultiplied alpha textures. Blurring will never work correctly on images with alpha without it.
12  Discussions / General Discussions / Re: Comparison between 2 IDE's - Netbeans and Eclipse on: 2016-09-15 08:09:30
@nsigma
Hey you're up there with the big guns as an initial contributor, nice!
James Gosling (Liquid Robotics)
...
Neil C. Smith (PRAXIS Live)

Yeah, the company's not bad  Grin

... even if the capitalization leaves something to be desired!  Undecided
13  Discussions / General Discussions / Re: Comparison between 2 IDE's - Netbeans and Eclipse on: 2016-09-13 11:22:12
Interesting news on the NetBeans front -

https://wiki.apache.org/incubator/NetBeansProposal
14  Games Center / WIP games, tools & toy projects / Re: Praxis LIVE v2 - hybrid visual IDE for creative coding on: 2016-09-02 17:27:40
@quew8 - Thanks!  Glad you're having fun with it.  Please do share images, video. etc of your project when you're done.  Sounds great.

So, yes, this is a bit of a known issue, and I keep thinking I should make a little component for "side-chaining" like this.  You're right that the channel is being switched off as an optimization.  You could switch to using video:composite.  Put the blob processed stream in dst, and the none processed stream in src, with mix on full.  That should do the trick.

Or, create a video:custom and edit the code to -

1  
2  
3  
4  
5  
6  
7  
@In(1) PImage in;
@In(2) PImage sidechain;

public void draw() {
  copy(in);
  release(in);
}


That should also do it.
15  Discussions / General Discussions / Re: Comparison between 2 IDE's - Netbeans and Eclipse on: 2016-09-02 12:05:54

Just amused me because they're practically the same thing.  I do understand the point you were making though.

I will never use IntelliJ IDEA because it's not open source.
You need to get GNU/laid.

No need for that!  I (almost) never use closed-source software either.  There are lots of good reasons for having that viewpoint.  I've been burnt by crappy commercial software that doesn't work very well too often.  I'll stick with the crappy open-source software that doesn't work very well instead thanks!  Grin
16  Discussions / General Discussions / Re: Comparison between 2 IDE's - Netbeans and Eclipse on: 2016-08-31 11:18:54
It's only the community edition.

I said that!  Wink  All three have a liberal open-source license that allows for commercial extension.  There are commercial products built on top of all three.  It doesn't make the community edition any less open-source!  It does make it a little less well featured.  Grin
17  Discussions / General Discussions / Re: Comparison between 2 IDE's - Netbeans and Eclipse on: 2016-08-31 07:15:28
I will never use IntelliJ IDEA because it's not open source.

I fail to see how it (community edition) is any less open source than the other two.
18  Discussions / General Discussions / Re: Comparison between 2 IDE's - Netbeans and Eclipse on: 2016-08-30 13:50:20
I could never get into intelliJ IDEA ...
For Android development I might actually go Android Studio at this point.

That's kind of ironic!  Grin
19  Discussions / General Discussions / Re: Comparison between 2 IDE's - Netbeans and Eclipse on: 2016-08-30 09:56:45
... then you get things like Praxis LIVE built on it which are really impressive.

Thanks! Grin Glad you like it.

NetBeans
  • Is very good for Java and HTML5, bad for anything else

Like what out of interest?  I find the PHP support great for work I'm doing at the moment.  Other than that, it's Java or HTML 5 stack (HTML, SASS, JS) for me, which are fantastic.

IntelliJ Idea
  • Appearance! (seriously, the best looking Java IDE)

There's a Darcula look and feel plugin for NetBeans now, should you want to make NetBeans look like IntelliJ. I'm "nicking" it for the upcoming Praxis LIVE v3 too.  Smiley

Seen as most of my Java work builds on top of the NetBeans Platform, it's not entirely a surprise it's my first choice IDE.
20  Java Game APIs & Engines / OpenGL Development / Re: Possible to manually "start X" instead of -XstartOnFirstThread? on: 2016-08-23 09:23:01
Just to make this clearer, or to be a complete pedant  Grin

This has nothing to do with anything called "X".  -X just means this is a non-standard option for the JVM.

http://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html
21  Discussions / General Discussions / Re: Porting Native Windows Windows to Java on: 2016-08-06 08:53:55
But 'for spurious performance reasons' sounds like me alright.

I meant your argument was spurious ...

Besides that, JNA extends JNI just to have neat little interfaces which implement your native code the same way. And does it extensively from what I read in the sources. Correct me if I am wrong, but either httpdigest or Spasi concluded that JNA uses JNI at its very core and the overhead is a bit much for the scope of LWJGL in a github problem.

Of course JNA uses JNI - it's basically a JNI wrapper to libffi, which means you can write your native binding in Java and don't have to cross-compile.  There's an overhead to it, but in general it's not a major issue.  I'm the writer / maintainer of two JNA-based libraries that are used in Praxis LIVE, but also by a variety of other people.  Both of those have real-time constraints.  JNA isn't the bottleneck!  The extra overhead in JNA is in the native call itself, not what that call does.  JNI isn't cheap anyway - roll on Panama.  IMO the extra overhead of JNA is usually noise if your native code is actually doing any useful work (ie. not benchmarks adding ints together)

Your argument is spurious because you've had a quick look at JNA and think you understand it - hint, worrying about Native.loadLibrary() means you don't understand why that really isn't a problem, and if you had performance concerns you'd never use Native.loadLibrary() anyway.

If you want to learn JNI, go for it!  If you want a quick way to answer your main question, have a look at what already exists.

Does Hydroque like overhead or the core?

Referring to yourself in the third person?! ...  Emo
22  Discussions / General Discussions / Re: Porting Native Windows Windows to Java on: 2016-08-05 22:32:46
JNA is a really big package and uses reflect package in like every single call to Native.loadLibrary.

Yeah, let's just reinvent the wheel for spurious performance reasons that you haven't quite understood!  Tongue And as @princec says, what you're currently looking to do might be possible without native code at all.
23  Games Center / WIP games, tools & toy projects / Re: Praxis LIVE v2 - hybrid visual IDE for creative coding on: 2016-08-05 16:34:24
I'm very interested in your shader node editor component. Since your code base is really large - how big are chances that you/one can extract the node editor canvas, so that it could be integrated and reused in other gui applications?

Thanks!  I wouldn't necessarily call it a shader node editor, though - shaders are still written in code.  The graphical node editor works at a level above your Java or GLSL code, providing a way to easily route and reroute data through your code.

The graphical node editor is based on top of the NetBeans Visual Library, which is Java2D based.  It is theoretically feasible to use that as a library outside of the NetBeans platform.  My extensions to it are mainly in the praxis.live.graph module.
24  Discussions / General Discussions / Re: Porting Native Windows Windows to Java on: 2016-08-04 11:12:11
You could also check out the JNA Platform library - https://github.com/java-native-access/jna/blob/master/www/PlatformLibrary.md  It has lots of bindings to Win32 functions around windows and much more (caveat - never used it, although use JNA a lot)
25  Game Development / Artificial Intelligence / Re: Python or other scripting language for simple AI? on: 2016-07-25 16:18:37
Check out Jython. There are many scripting alternatives for the JVM, or JavaScript is built in.  You can even live-compile Java.  This is great if you want to let users edit stuff.  However, IMO this will not cut down on code, because you'll be adding loads of boilerplate and a great deal of complexity.  If it's just for you, I'd stick with Java - it isn't that much more verbose.   Wink
26  Discussions / General Discussions / Re: Oracle proposes deprecation of CMS in Java 9 on: 2016-07-17 10:05:49
G1 performed particularly badly for me - halving framerates in Battledroid. Not sure why.

Yes, performed terribly for me on any low-latency stuff last time I tried, but that was a while ago, and it is still improving.

My best performance from a real-time perspective still seems to be with -Xincgc (incremental CMS) and that was deprecated in Java 8.  Time to embrace the brave new world!  persecutioncomplex
27  Discussions / General Discussions / Re: Oracle proposes deprecation of CMS in Java 9 on: 2016-07-17 09:33:01

Flicking through the mailing list links linked from there makes me feel fairly optimistic about the situation.  a) G1 is likely to improve in that time with focus from Oracle on areas it is outshined by CMS, and b) it looks like a group of developers (Red Hat, Google, etc.) will take on CMS in OpenJDK and rather than stagnate it might actually get better.  The latter in particular is good to see - OpenJDK needs to keep growing bigger than Oracle.

@Hydroque - why not stop trolling and go and use Rust or something?  Wink
28  Game Development / Newbie & Debugging Questions / Re: getters and setters vs public vars on: 2016-07-11 17:28:04
@nsigma :
I think those are called builder classes, I've tried to make some of those before I dropped box2d, and with libgdx, that's how the Vector2 class was made... allows for multiple operations to be performed on single lines of code.  Never had much luck making those types of classes myself.

No, they're not builder classes, although builder classes usually use a similar fluent API (see https://en.wikipedia.org/wiki/Fluent_interface )  Unlike builders, these methods are used to modify an existing object rather than create a new one - they're still getters and setters.  My point was that you don't have to follow the JavaBean conventions.  I use the same principle for animations too -

1  
property.to(5, 0.75).in(3, 1.5).easing(easeIn, easeOut);
29  Game Development / Newbie & Debugging Questions / Re: getters and setters vs public vars on: 2016-07-11 09:41:13
I almost always use getters and setters, even for final variables unless they're static. However, don't assume using methods for set / get requires you to use JavaBean conventions.  Sometimes a fluent API can be more legible and less verbose.

eg. the audio coding API in Praxis LIVE uses setter / getter methods like -

1  
2  
3  
4  
5  
6  
7  
8  
Osc frequency(double hz) {
  // validate value or invalidate cached data !!
  this.hz = hz;
  return this;
}
double frequency() {
  return this.hz;
}


Which allows for code like -

1  
osc.waveform(SAW).frequency(440).gain(0.4);


If you're doing a lot of updating based on the existing value, you could even override the setter with a method that accepts a function -

1  
osc.frequency(hz -> hz*2);
30  Games Center / WIP games, tools & toy projects / Re: Praxis LIVE v2 - hybrid visual IDE for creative coding on: 2016-06-15 17:21:09
@Hydroque - Praxis LIVE has been out of alpha and very stable for a good while now.  It is not, and never will be, an alternative to Eclipse - it's aims are very distinctly different.

Thanks @ra4king

Quick question: what is "Steampunk VJ-ing"?

Well, Steampunk VJ-ing. Just seemed appropriate for a Victorian-looking device that allows you to play with video FX.  Grin
Pages: [1] 2 3 ... 40
 
ral0r2 (190 views)
2016-11-23 16:08:26

ClaasJG (331 views)
2016-11-10 17:36:32

CoffeeChemist (424 views)
2016-11-05 00:46:53

jay4842 (476 views)
2016-11-01 19:04:52

theagentd (487 views)
2016-10-24 17:51:53

theagentd (475 views)
2016-10-24 17:50:08

theagentd (433 views)
2016-10-24 17:43:15

CommanderKeith (430 views)
2016-10-22 15:22:05

Roquen (403 views)
2016-10-22 01:57:43

Roquen (302 views)
2016-10-17 12:09:13
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21
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!