Java-Gaming.org Hi !
Featured games (88)
games approved by the League of Dukes
Games in Showcase (681)
Games in Android Showcase (196)
games submitted by our members
Games in WIP (746)
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 ... 39
1  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
2  Games Center / WIP games, tools & toy projects / Re: Praxis LIVE v2 - hybrid visual IDE for creative coding on: 2016-06-14 19:32:55
If anyone here is in the Montreal area, I'm doing a Praxis LIVE workshop this Thursday evening (June 16th), looking particularly at video, live-coding Java and Processing integration.

https://www.facebook.com/events/194747680919971/

I'm also doing another workshop in Oxford (back in UK!) on Sunday June 26th as part of this.

And here's a recent video demonstrating support for audio and visual live coding - best viewed full screen!

<a href="http://www.youtube.com/v/c1rI6_Lg3eQ?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/c1rI6_Lg3eQ?version=3&amp;hl=en_US&amp;start=</a>

https://youtu.be/c1rI6_Lg3eQ
3  Java Game APIs & Engines / JavaFX / Re: JavaFX For Pixel Games on: 2016-06-02 18:19:49
Well, Swing didn't die... it's still pretty bloody good, but you know, for ordinary desktop applications... not so much for fancy things.

But that's really what we want in the JDK.  Fancy things belong elsewhere, but a basic usable UI toolkit for desktop applications should be in there.  Swing may not be dead, but it's kind of on life support.  It needs some support for more modern features.  Why Snoracle had to go with revolution over evolution I don't know.  Something a bit more like PureSwing might have been good?!
4  Java Game APIs & Engines / JavaFX / Re: JavaFX For Pixel Games on: 2016-06-02 10:12:02
And yes, Oracle should seriously spin off JavaFX into a separate project, and throw a lot more engineers at it.

JavaFX (OpenJFX) always has been a separate project.  In some ways it might have done better if it was part of OpenJDK / JavaSE.  Still, I doubt you'll see Oracle throwing engineers at it, if anything (check out Future of JavaFX thread on openjfx mailing list, etc.) it seems to be the opposite with Oracle focus on browser and cloud.

Internal dependencies may at least improve because they have to make it work with Jigsaw.  Wink

Double vs what?  If some things should really be integers I agree with you - if we're talking double vs float it's double every time!
5  Java Game APIs & Engines / JavaFX / Re: JavaFX For Pixel Games on: 2016-06-02 09:24:01
@princec, was going to say similar (about no longer supported - why does insert quote no longer work on FireFox!  Sad )

JavaFX is no longer supported by Oracle in their ARM Java downloads, which means the one that comes with the Pi is old and missing features / bug fixes.  However, there are community builds of OpenJFX available for Pi that (AFAIK) will work with the Oracle JVM - http://chriswhocodes.com/  I would expect Pi to get, if it hasn't already, a package for OpenJFX at some point ... but

Other than that, in JavaFX you can basically do everything you could in Swing + much more.

Except that you can't, although for games you're probably OK.  Still, again I agree with @princec that there's some trivial stuff that just makes it not interesting for me right now.  Having just got back from NetBeans Day the topic of JavaFX came up a few times in conversation, and I don't recall anyone being that positive about current situation, and I get the feeling development is not far off stalled.  I kind of agree with this post - https://www.codenameone.com/blog/should-oracle-spring-clean-javafx.html
6  Discussions / General Discussions / Re: Interesting proposals: Java 9 and beyond on: 2016-05-29 09:14:02
Multiple inheritance of state...always had multiple inheritance of type and the line is abit blurred with recent(ish) additions.

Well, we've now got multiple inheritance of behaviour - doesn't feel that blurred.  Smiley
7  Games Center / WIP games, tools & toy projects / Re: TreeML markup language on: 2016-05-27 11:02:28
I like tabs because they don't require as many keypresses ... to type in the first place.

The crux of the issue is that most people who works with space indented projects (and I don't currently work with anything Java or otherwise that doesn't use spaces) has their editor set up to output spaces when the tab key is used.

I'm currently working on something with lots of YAML, and I don't disagree with the "nasty and dirty" comment, but for me using tabs is even more of a PITA because of the above issue.
8  Games Center / WIP games, tools & toy projects / Re: TreeML markup language on: 2016-05-27 09:44:14
Standard Java style is tabs, not spaces.

er, no it isn't, unless it's changed since this http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-136091.html

Indentation is 4 spaces - tabs must be set to 8 spaces.  Which means you either have all spaces or a mix, but it's not possible just with tabs.  The default NetBeans formatting is definitely based on 4 spaces.
9  Games Center / WIP games, tools & toy projects / Re: TreeML markup language on: 2016-05-27 09:21:43
What's wrong with tabs?

Because every project I work on or with uses spaces by convention.  Standard Java style is spaces, or spaces and tabs (yuck!).  This means my editors and IDE are set to output spaces by default.  Even @ags1 mentioned he uses spaces everywhere else and has to put an exception in his IDE to output tabs instead for this.  IMO, that's where this falls down and becomes less useful.

I also agree with @princec that whitespace as a syntactical feature is horrible (although I don't on spaces - who codes in a proportional font - you'll be using Comic Sans next)

Praxis LIVE has a similar-ish format for its patch files, except the syntax is based on Tcl and so uses braces for structure.  I have some similar parser code (though there's no way @KaiHH is writing a JavaCC grammar for it!  Wink )
10  Games Center / WIP games, tools & toy projects / Re: TreeML markup language on: 2016-05-26 13:40:10
Nice! ... but, tabs?  Undecided  Doesn't everyone else set their IDE and text editor to output spaces instead of tabs?  persecutioncomplex
11  Game Development / Newbie & Debugging Questions / Re: Optimizing FBO's on: 2016-05-19 10:04:48
(e.g. it does two texture lookups at vTexCoord),

And most blur filters will blur the alpha channel too anyway, so why not return vColor * sum?
12  Game Development / Newbie & Debugging Questions / Re: [Solved][Libgdx] How do I blend textures? (like Flash) on: 2016-05-16 13:46:28
But if it's not overlay, what is it? And why did it work?

It's a weird (lighter) version of Multiply, which would normally be -

1  
batch.setBlendFunction(GL20.GL_DST_COLOR, GL20.GL_ONE_MINUS_SRC_ALPHA)


That assumes the source (sprite) is pre-multiplied alpha or opaque (otherwise you can't do Multiply).  Multiplying the destination by SRC_ALPHA is unlikely going to match any of the Photoshop / Flash blend modes, because they tend towards a no-op as the source becomes transparent, whereas in that case a transparent source would erase the destination (ie. 0 * DST).

In this case, for opaque pixels you're effectively doing

1  
batch.setBlendFunction(GL20.GL_DST_COLOR, GL20.GL_ONE)


which is Multiply and Add together ((SRC * DST) + DST).  The reason it may look similar to you is that Overlay is defined as a brighter Multiply operation (2 * SRC * DST) where the source colour is below half.  It's not Overlay, but depending on the colours in your source image may be close enough.
13  Game Development / Newbie & Debugging Questions / Re: [Solved][Libgdx] How do I blend textures? (like Flash) on: 2016-05-16 11:03:59
Well it's not the wrong one either, so whatever it is, I'm not complaining! Cool

If the effect works for you, fine.  But it's not "useful for people lurking Google searches" because you're replicating a wrong answer to your question!
14  Game Development / Newbie & Debugging Questions / Re: [Solved][Libgdx] How do I blend textures? (like Flash) on: 2016-05-16 07:47:03
^^^ There is no way that is Overlay!  Wink
15  Game Development / Newbie & Debugging Questions / Re: [Libgdx] How do I blend textures? (like Flash) on: 2016-05-15 09:16:52
You could "just" copy the shader files and classes from the libgdx source to your project and add your blend function.

Bear in mind that to do custom blending in a shader you need to do multi-texturing with an additional texture having a copy of the destination region of the sprite - you cannot read the existing pixel colour from a shader.

Example for additive blend:
1  
2  
Gdx.gl.glBlendEquation( GL20.GL_FUNC_ADD );
Gdx.gl.glBlendFunc( GL20.GL_SRC_ALPHA, GL20.GL_ONE );


I highly recommend you use pre-multiplied alpha if you want to do lots of different blending or you can soon run into trouble.  In which case the above additive blending would be -

1  
Gdx.gl.glBlendFunc( GL20.GL_ONE, GL20.GL_ONE);


Without shaders using the built-in blend function you can at least cover normal blending, additive blending, subtract blending, and multiply blending.

These slides from an NVidia talk about their blending extension is worth a flick through too (and check out slide 16 if you're questioning my position on pre-multiplied alpha!  Wink )

http://www.slideshare.net/Mark_Kilgard/blend-modes-for-opengl
16  Game Development / Newbie & Debugging Questions / Re: Sound on Debian Jessie Linux on: 2016-04-26 20:26:16
because the sound works when no other programs are open.

OK, that means it's reverting to using the direct ALSA device, which is exclusive - only one application can access this at a time.  PulseAudio should be the default audio device.  Which means either -

a) OpenJDK is using the direct ALSA device for Applet audio output (really, you shouldn't be using these methods for audio - use JavaSound or check out TinySound if you want something simpler on top).

or, b) someone has changed the configuration of OpenJDK on that machine not to use PulseAudio.
17  Game Development / Newbie & Debugging Questions / Re: Sound on Debian Jessie Linux on: 2016-04-26 15:59:37
Just to double check, because I'm not sure what you mean when you say you are using AWT's sound. AFAIK, there is no play() method for audio in the AWT library.

There's one in Applet.  I think it might be using JavaSound under the covers anyway, but doing anything with Applet seems pointless in this day and age.  Grin

... hmmm, that JavaDoc says nothing happens if the audio clip cannot be found!  Are you sure you're finding the URL of the file correctly?
18  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 3 vs JOGL on: 2016-04-26 15:48:06
I switched from LWJGL (2) in Praxis LIVE v1 to JOGL in Praxis LIVE v2, because I switched rendering library from (a fork of) libGDX to Processing.  In general I'd suggest the library support around whichever binding you choose is more important than the binding itself.

I'd also say I'm becoming more in favour of JOGL's non-static approach <ducks for cover  Grin >.  This is worth a read in that context - https://jogamp.org/wiki/index.php/Why_Instance_Design  I made similar choices for similar reasons in bindings for a native audio library that I maintain.

19  Game Development / Newbie & Debugging Questions / Re: Sound on Debian Jessie Linux on: 2016-04-24 15:10:32
I'm using the newest Java update ...

Oracle or OpenJDK?  IIRC the Oracle one doesn't include PulseAudio support.

and just playing audio with audio.play() in AWT.

Why would you do that?
20  Discussions / Miscellaneous Topics / Re: lambdas rant on: 2016-04-11 09:07:42
I'm using lambdas only where readability is more important than performance

Well, if that's the case in practice, they've failed!  (not used them yet - still targeting JDK 7 compatibility  persecutioncomplex )

Quote from: roquen
The last I heard JVM lowering invokedynamic was much more expensive than they thought it would be.

But that's still only a one time hit?
21  Discussions / General Discussions / Re: Core Java Syntax on: 2016-03-20 10:50:42
I'm not a fan of fluent style stuff myself

You must really hate Java 8 then?!  Tongue

Have to say I really am a fan of this if done well.  To me it's the opposite issue to above - reducing verbosity increasing legibility.  And it's not like you have to use it anyway.

Mind you, the fluent stuff (or any method call) on the end of a constructor does look daft.  To each his own.  Wink
22  Discussions / General Discussions / Re: Vulkan 1.0 Release on: 2016-03-18 12:09:23
@princec - ah, good point!  I was more wondering what the runtime performance differences might be between the OpenGL ES headless mode and the full OpenGL X11 one (having read recently that it's now in public beta)  Wasn't thinking about boot time.
23  Discussions / General Discussions / Re: Vulkan 1.0 Release on: 2016-03-18 11:18:59
I am eagerly awaiting LWJGL on the Pi (headless?)

Any idea what the (longer term) benefit would be to having it headless?
24  Game Development / Newbie & Debugging Questions / Re: Video playing in game on: 2016-03-17 13:02:23
Like @Cero I'm not personally interested in Android as a platform.  However, there is a GStreamer build for Android, and JNA should also work, so in theory you should be able to get it to work with a bit of effort.

https://gstreamer.freedesktop.org/download/

There is also a tutorial for using GStreamer on Android via NDK, but then you have to write a bit of C code too - http://docs.gstreamer.com/display/GstSDK/Android+tutorials
25  Discussions / General Discussions / Re: Core Java Syntax on: 2016-03-17 12:50:33
That will not work because the compiler does not know what type var would be if you use it as method parameter.

I know. I was being sarcastic!  Grin
26  Games Center / WIP games, tools & toy projects / Re: 3D audio test using JavaFX and procedural java sound on: 2016-03-17 09:17:11
As far as I know, there's no way to package a game with a Max patch without it turning into an embarrassing mess of duct tape, and anyway, I can't see why any sane human would want to. Max is fun and easy, but Java->OSC->Max isn't exactly a high-performance solution.

I'm assuming Max doesn't have an equivalent to libPD then?  That might be an alternative to look at based around the open-source "equivalent", Pure Data.

There's no reason in principle the Java->OSC->[something] approach couldn't be high-performance.  OSC was originally designed for real-time audio control.  Lots of systems use it to communicate between audio process and front-end (incl. Supercollider as you said).  In fact, I'm using a Java->OSC->Java mechanism to offload Java audio into a separate process and this performs better than using a single VM because the audio process can be tailored to have low memory heap, minimal garbage collection, etc.
27  Discussions / General Discussions / Re: Interesting proposals: Java 9 and beyond on: 2016-03-16 16:58:38
The only thing time implicit casts would be okay would be inside an if(instanceof)-block. Frankly, why not just update the type of the object tested if it can be proven to be that type within a block?

1  
2  
3  
if(x instanceof String){
    //Inside here x is a String.
}


Try reading the example I posted earlier and the link to the Project Coin mailing list archives.  One reason your suggestion was rejected relates to overloaded methods -

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
void doSomething(Object s) {}

void doSomething(String s) {}

//

if (x instanceof String) {
    //Inside here x is a String.
  doSomething(x); // oops, we've changed behaviour!
}



28  Discussions / General Discussions / Re: Interesting proposals: Java 9 and beyond on: 2016-03-16 15:18:27
then I am already asserting that thing.foo() always returns a String even it it is declared to return an Object

You're asserting it for certain circumstances / certain state of your project.  If that's always the case and thing.foo() is your code, rewrite thing.foo()!  Otherwise, that's not the same assertion.

My point is really the opposite - in line 2 you're not asserting anything.  It's equally likely that people write that code as a mistake.  Now, the compiler will flag that as an error.

Quote from: CommanderKeith
Isn't widespread use of instanceof seen as an anti-pattern?

I'm generally of the opinion that single use of instanceof or casting (eg. not a chain of if statements) is fine on occasion and better than the convoluted crap people sometimes write just because they've heard they shouldn't use it!   persecutioncomplex  It's a useful workaround to Java not having double dispatch.
29  Discussions / General Discussions / Re: Interesting proposals: Java 9 and beyond on: 2016-03-16 14:57:49
1  
2  
String x = (String) thing.foo();
String x = thing.foo();


And as @KaiHH says, this has nothing to do with what the compiler can figure out and everything to do with what a human can figure out!  Looking at that code, line 2 tells me that thing.foo() always returns a String, line 1 says it might not.  These are semantically different.  I think the number of people who'll code that pattern by mistake will outnumber the number who want it!
30  Discussions / General Discussions / Re: Interesting proposals: Java 9 and beyond on: 2016-03-16 14:40:04
Thirdly, the diamond operator was previously invalid syntax, not just invalid code?  I think some of the Project Coin proposals were rejected on that basis.

Project Coin had a similar proposal to JEP 286 which used final.  In some ways that makes a lot more sense to me - if you want a variable you can assign to later you should be explicit about the type.
Pages: [1] 2 3 ... 39
 
CopyableCougar4 (64 views)
2016-06-25 16:56:52

Hydroque (96 views)
2016-06-22 02:17:53

SwampChicken (99 views)
2016-06-20 13:22:57

SwampChicken (102 views)
2016-06-20 13:22:49

SwampChicken (95 views)
2016-06-20 13:22:26

Hydroque (139 views)
2016-06-15 08:22:50

Hydroque (136 views)
2016-06-13 06:40:55

DarkCart (247 views)
2016-05-29 02:30:33

Hydroque (213 views)
2016-05-26 14:45:46

Mac70 (197 views)
2016-05-24 21:16:33
Making a Dynamic Plugin System
by Hydroque
2016-06-25 00:13:25

Java Data structures
by BinaryMonkL
2016-06-13 21:22:09

Java Data structures
by BinaryMonkL
2016-06-13 21:20:42

FPS Camera Tutorial
by Hydroque
2016-05-22 05:40:58

Website offering 3D Models specifically for games for free
by vusman
2016-05-18 17:23:09

Website offering 3D Models specifically for games for free
by vusman
2016-05-09 08:50:56

Website offering 3D Models specifically for games for free
by vusman
2016-05-06 11:10:21

Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17
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!