Java-Gaming.org Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (612)
Games in Android Showcase (172)
games submitted by our members
Games in WIP (659)
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 ... 94
1  Discussions / General Discussions / Re: Windows 10 on: 2015-08-11 17:50:05
Why would you ever adopt any technology early, unless your current system is broken?

Good point Smiley
My personal reason to consider upgrading is that Win10 seems to offer a better desktop experience than Win8, and I've heard that Win10 uses less memory (my laptop only has 4GB).
But yeah, I'll probably wait (if I upgrade at all) since Win8 is working fine now.
2  Discussions / General Discussions / Re: Windows 10 on: 2015-08-10 19:28:30
I have Win10 ready to be installed (and my laptop is reminding me of that quite often).
But reading about a lot of the problems, I'm thinking maybe I should just stick with Win8.1 just to be safe. I have some quite specialized drivers installed that I depend on and they were not quite straightforward to get to work on Win8 in the first place, so I wouldn't be surprised if that will give me problems in Win10.
And knowing Windows, every new iteration takes a while to get used to, so I'm not sure it'll be worth the trouble.

Anyway, I learned to live with Win8.1. It's not as nice and user-friendly as a good Linux distro (which was my first choice, but I had problems installing it on my laptop), but it's is still fine for me.
3  Game Development / Performance Tuning / Re: Disabling floating point denormals on: 2015-08-02 22:53:21
But the whole point is that it stays enabled when you return, right?
So just for my (perhaps slow) understanding, does this mean you might have to set some non-standard flags on the JVM to stop it from enforcing default settings there? Or is it just a testing issue?
4  Game Development / Performance Tuning / Re: Disabling floating point denormals on: 2015-08-02 21:30:59
A good description of why this happens can be found here.

That's interesting.
What I understand of it is that the JVM actively discourages changing such flags, is that correct?
5  Game Development / Performance Tuning / Re: Disabling floating point denormals on: 2015-08-02 21:17:31
I suppose for games it's normally a non-issue. Maybe in some cases where you for example calculate physics where 'ground-level' is usually at 0 then denormals can hit you, but I suppose that's a corner case (and easy to work around).
But as soon as you start doing real-time audio processing in your games, being able to enable 'flush-to-zero' mode is *really* nice to have.
6  Game Development / Performance Tuning / Re: Disabling floating point denormals on: 2015-08-02 20:27:31
Nice Smiley
Does it already work on Linux & Mac too?
7  Game Development / Performance Tuning / Re: Disabling floating point denormals on: 2015-08-01 22:17:18
Thanks, I think I'll add this to LWJGL 3.
That would be great!
8  Game Development / Performance Tuning / Re: Disabling floating point denormals on: 2015-08-01 21:55:06
Yes I know; that was just a remark about floating point in general.
9  Game Development / Performance Tuning / Re: Disabling floating point denormals on: 2015-08-01 21:39:38
If anyone is interested, I've put the pre-compiled library here:
http://sourceforge.net/p/jmodsyn/code/HEAD/tree/trunk/LibAbnormal/build/
Sorry, windows only for now...

To enable flush-to-zero mode, call
1  
org.modsyn.abnormal.Abnormal.setDenormals(false);

to restore normal behaviour, call
1  
org.modsyn.abnormal.Abnormal.setDenormals(true);


The source code is there as well (as much as there is any); feel free to use it any way you like. If it's useful enough, maybe this should become a proper cross-platform library.
10  Game Development / Performance Tuning / Re: Disabling floating point denormals on: 2015-08-01 09:41:40
Heh, clever Smiley

Floating point never fails to surprise.
I mean, after learning that 1.0f + 1.0e-8f == 1.0f  Stare I basically stopped caring about denormal values having a purpose for correctness.
11  Game Development / Performance Tuning / Re: Disabling floating point denormals on: 2015-08-01 08:04:00
So the results are now like as follows, using this code
1  
2  
3  
4  
5  
6  
7  
8  
9  
      float f = 1;

      for (int count = 0; count < 8; count++) {
         long start = System.nanoTime();
         for (int i = 10000000; i > 0; i--) {
            f *= 0.999998f;
         }
         System.out.println(count + ": " + (System.nanoTime() - start) + "   " + f + " \t" + (f < Float.MIN_NORMAL));
      }


Default behaviour:
0: 19782589   1.5903542E-9    false
1: 21886645   2.5291527E-18    false
2: 21601492   4.0223933E-27    false
3: 20395286   6.397437E-36    false
4: 384876680   3.45733E-40    true
5: 544109759   3.45733E-40    true
6: 544310570   3.45733E-40    true
7: 545460996   3.45733E-40    true

With flush-to-zero enabled:
0: 19982061   1.5903542E-9    false
1: 19439424   2.5291527E-18    false
2: 19738856   4.0223933E-27    false
3: 19458167   6.397437E-36    false
4: 19633095   0.0    true
5: 19759830   0.0    true
6: 19560804   0.0    true
7: 19418897   0.0    true

This will certainly make performance a lot more stable in my project, so I'm a happy camper Smiley

EDIT: I just tested it with my DSP project, and it absolutely works.
Even though I already prevented denormals in the most obvious cases, I didn't everywhere. As a result, where I get enormous performance spikes without enabling flush-to-zero, those spikes are all gone and generally performance is much better.
Result!  Cheesy
12  Game Development / Performance Tuning / Re: Disabling floating point denormals on: 2015-08-01 07:39:35
Thanks Roquen, that worked!
13  Game Development / Performance Tuning / Re: Disabling floating point denormals on: 2015-07-31 17:46:33
Shouldn't there be a library for this? It sounds like it'd be useful. Maybe someone feels obliged to make one? =P

If I could find one, I probably wouldn't be nerding around with JNI and C compilers right now Wink
So yes, if someone knows of a library that can do this, I'd happily use that!

EDIT:
In my benchmarks, hitting denormal floats means a performance degradation in the order of 25 times as slow as usual and up!
Obviously they are huge spikes that really hurt real-time applications.
Working around it by adding tests or adding an offset helps, but still degrades performance significantly in itself.
And those work-arounds need to be applied almost everywhere in my case, which not only makes everything noticeably slower, it's also a big pain in the behind to have to litter your code with all that stuff almost everywhere.
14  Game Development / Performance Tuning / Re: Disabling floating point denormals on: 2015-07-31 16:32:25
Because all FP computations while these modes are active are ignoring denormals. That's outside of the JVM's spec.  Additionally any routine that depends on the behavior of denormals will be effected.  The CPU and OS take care of limiting the mode changes to the thread(s) in question.

Ok I see.
There's just one thread where all these DSP calculations take place, but that's also the same thread as the Asio driver's, so to be safe I could enable the 'flush-to-zero' mode just before my DSP stuff takes place and re-enable the default 'denormal' mode afterwards.

I had some trouble getting it to work with MinGW (it seems it doesn't support '_controlfp_s'?), so I'm trying my luck with VS.
15  Game Development / Performance Tuning / Re: Disabling floating point denormals on: 2015-07-31 09:02:08
Can't you change the scale of your calculations?

That's what I'm often doing now, but it is a workaround that comes at a cost.
16  Game Development / Performance Tuning / Re: Disabling floating point denormals on: 2015-07-30 20:15:10
In what sense it is a no-no?
I mean I understand why floating point denormals exist and why they are a good thing, but I just want to change the behavior for my particular case.
17  Game Development / Performance Tuning / Re: Disabling floating point denormals on: 2015-07-30 18:54:36
Thanks for your reply! Smiley
That was exactly my understanding of it, but I wasn't sure if it would actually work in the context of a JVM.
18  Game Development / Performance Tuning / Disabling floating point denormals on: 2015-07-30 18:39:36
I'm working on a project where float denormals have a big impact on performance.
To clarify, float denormals are floating point numbers that are so close to 0 that its format isn't well supported by the CPU anymore, leading to incredibly slow performance.
Any floating point calculations that tend to gradually go towards 0 are potentially impacted. In my case, that's audio DSP stuff, but I can imagine that things like physics calculations are potentially affected too.
(For reference: https://randomascii.wordpress.com/2012/05/20/thats-not-normalthe-performance-of-odd-floats/ and also the javadoc of Float.MIN_NORMAL).

Currently, I either add a small offset or add a check to 'nudge' these values to 0 (the latter is surprisingly often faster than adding an offset), but that is both impractical in a lot of cases and has a performance impact in itself.

It seems it's possible to disable float denormals on the CPU so that such numbers simply become 0 (the linked article touches upon this), so I'm thinking of creating a little dll and JNI library to do that in java.
I think it would help my project tremendously, and I guess it could be a nice exercise for me.

Now my question is: Is it actually possible, especially within the context of a JVM? I mean I'm quite out of the loop of native programming, so maybe I'm unaware of something that might make this a no-go?
Or maybe something like this already exists somewhere? (I've googled, but I couldn't find anything myself).
19  Discussions / General Discussions / Re: mame emulator in java (arcadeflex) on: 2014-07-31 18:20:34
That conversion stuff is interesting BTW.
A guy named Julien Frelat has done something similar in a project called 'JAPE' (http://www.innoveware.com/projects.html). I think he's more into .net these days, but it might be worth it to hook up with him to exchange ideas on the subject. Very nice guy (I've worked with him on 'CottAge').
20  Discussions / General Discussions / Re: mame emulator in java (arcadeflex) on: 2014-07-31 18:05:29
I'll see what I can do about sound. The sound code in JEmu2 should be quite easily integrated in arcadeflex, I think (it has been reused before).

It was a bit tricky to add JavaSound support in JEmu2; not so much because JavaSound is that hard to use, but to make it work well (and across platforms).
My problem was to keep latency as low as possible and avoid buffer under-runs, since JavaSound doesn't provide any (reliable) way to measure how many bytes are in the queue. So I ended up timing everything and keep adjusting whenever there is a buffer under-run.
IIRC I had to rely on System.currentTimeMillis, so I suppose going to nanoTime will help there.

Anyway, if you have a use for the JEmu2 sources, just PM me; you can use it however you like as long its my own parts of the code (most of it is, but some parts were written by collaborators, for example the Out Run driver and the M68000 CPU emulator, so I can't be sure about those parts).
But I have to warn you, emulators were sort of my Java 'Hello World' getting out of hand, so things can get a bit messy in places Wink
21  Discussions / General Discussions / Re: mame emulator in java (arcadeflex) on: 2014-07-30 18:44:43
I just love emulation Smiley
I've made a few myself (with collaborators), probably most notably JEmu2. It emulates lots of arcade games (up to games like Galaxy Force 2, Rail Chase, After Burner and Outrun), and a few consoles and home computers (Sega Master System, MSX, MSX2, Spectrum) and it supports sound.

A few questions though:
Any reason why you're porting such an old MAME release? Is it because later releases started to depend on macros and such so much?

And why a direct port? I haven't looked at your code yet, but I found that following MAME to the letter will make the code very rigid and 'static'. In JEmu2 I would never have been able to implement things like 'VirtuArcade' (i.e. 20 arcades running in parallel in 3D) if JEmu2 was a straight MAME port.

If I were to write an emulator again, I'd not follow MAME too closely but just make some helper classes to make porting MAME drivers easier. MAME is a beautiful piece of code that despite its age is still quite well designed and is an invaluable treasure of knowledge. But IMHO it doesn't translate that well into java, especially if you want to take emulators further than MAME.

Anyway, I'll check out your project and see if I can merge some of my sound code in there.
22  Games Center / WIP games, tools & toy projects / Re: Jumproom on: 2014-07-07 18:25:03
It's a fun concept and it plays really well, as one would expect from you Smiley
It's like a concentrated mix of accessible one-button skill, and a puzzle element.

I played it on PC and used the keyboard, and found the level selection screen not obvious: It's not clear when you have selected the newly unlocked level, and my first instinct was to use space to start a level (which didn't work). When I found out that the Enter key works, it turned out that when I finished a level that the same level was selected instead of the next one.
But obviously this is meant for touch devices so probably not a big problem.

The arrows on the blocks that make you change direction are probably not clear enough. Maybe you should make it a bit more obvious; more contrast and maybe animate those blocks.

Maybe it's a an idea to add a time element to it. The mechanics really lend themselves for that. Like an extra prize or something if you finished a level in the best possible time.
23  Discussions / General Discussions / Re: Apple announces new graphics API: Metal on: 2014-06-16 19:34:29
Well, in your circles it may not be the case, but it is very much the general reality. iOS accounts for something like 70% of download revenue. iPhone users download fewer apps, but spend far more on them. Android users expect everything for free or extremely cheap, and they generally get it, to the detriment of developers.

While that may be true, it's a very broad statement that probably doesn't tell the whole story.
Android's target demographic is a lot wider than Apple's, so naturally the market is different in general.

But can we really say that app revenue is all that different if we focus on games and top-end phones for example? And do these stats include things like add revenue (still an important source of revenue)? Many Android devices don't even ship with Google Play; is content revenue from those devices counted in these stats?

It's difficult to directly compare Apple with Android when it comes to app revenue, so I have to say that I'm more interested in real life experiences there than general statistics.
24  Discussions / General Discussions / Re: Apple announces new graphics API: Metal on: 2014-06-09 11:00:02
Quote
Why didn't they just implement their Metal stuff within OpenGL?
That doesn't even make sense.  It would be purpose defeating.

Dev lock-in?  WTF?  How so?  All dev platforms have platform specific APIs.  Big deal.

tbh I don't know any details about Metal; I was sort of referencing Carmack who stated that Mantle could have been done as OpenGL extensions and on surface it looked like Metal was going for something similar as Mantle.

And yes, all platforms have specific APIs, and that is a big deal as that was an important reason for Java to exist in the first place.
Maybe Apple intends to make Metal an open standard, but realistically that won't really make a difference. It's not like Google or Microsoft will be in any hurry to support it.

The big game engines like UE and Unity will probably support it if Metal becomes successful, but I can't imagine many developers being overjoyed with the idea of having to deal with yet another API that does the same thing.
25  Discussions / General Discussions / Re: Apple announces new graphics API: Metal on: 2014-06-08 20:56:10
Having a better designed API is always a sucky excuse if it means changing everything for developers to become more locked into some platform.
Why didn't they just implement their Metal stuff within OpenGL?
26  Discussions / Miscellaneous Topics / Re: Watchdogs on: 2014-06-02 19:07:46
I was so aware it was just a game and had no reality to it, since it could never compare to the real situation, I honestly believe it had no effect whatsoever.

Sometimes I think the fact that a movie is not interactive might have more of an impact to viewers than an interactive video game. Perhaps the fact that something is obviously computer generated interactive content, controlled by a piece of plastic takes something away from the potential that one (especially a minor) perceives something as being real.
Maybe it would have made more of an impact if that Max Payne sequence was a movie with real actors?

But it's all a grey area.
Some people are affected by certain things, others aren't. I don't think there's anything you can do about that, and I don't think video games are somehow more hurtful there than other media like movies or books.
When people start getting out of control, making some form of media the culprit is like killing the messenger. The real reasons behind such things lie much deeper than that.

We've probably all been traumatized to some degree when we grow up and learn about the dark side of life through movies, books, videogames or otherwise. Usually that's not a bad thing.
27  Games Center / Featured Games / Re: Daedalus on: 2014-06-02 18:10:52
Congrats!
It looks really slick and good fun, so you'll have a sale from me at least Smiley
28  Discussions / General Discussions / Re: Give to charity, get a copy of Excelsior JET (commercial JVM with AOT compiler) on: 2014-06-02 18:03:28
Thanks for the opportunity!

Quote
If you don't need denormals I'd expect you could just use a JNI method to set the FP-control word per thread.
Sounds interesting, how would that work? Like calling a method once and the denormalization issue is gone, or calling a method at every point a denormalization issue could occur?
Currently I either add an offset or 'nudge towards zero', so if it's the latter than I'm not sure it'd be worth it.
29  Discussions / General Discussions / Re: [Swing] Can swing look sexy? on: 2014-05-28 20:37:55
JavaFX is supposedly the future, but so far it's a *tumbleweed* - who's making anything beyond trivial demos with it?

I would bet that any GUI application development companies currently using Swing will start using JavaFX for their new projects. Source: my job.

I can honestly say that I'm surprised that JavaFX is generating jobs today. Not unpleasantly surprised, but still surprised.
30  Discussions / General Discussions / Re: [Swing] Can swing look sexy? on: 2014-05-28 20:33:08
JavaFX is supposedly the future, but so far it's a *tumbleweed* - who's making anything beyond trivial demos with it?

Nail on the head.
Proven technology (or 'legacy' if you will) is worth more if the new alternative is both 'bleeding edge' and 'already irrelevant'.
Pages: [1] 2 3 ... 94
 
Andrew_3ds (13 views)
2015-09-01 19:08:10

afikri (15 views)
2015-08-31 09:30:22

afikri (22 views)
2015-08-31 09:30:07

afikri (11 views)
2015-08-31 09:27:24

afikri (15 views)
2015-08-31 09:26:40

Roquen (18 views)
2015-08-29 11:30:54

GamerC4 (32 views)
2015-08-22 20:38:50

GamerC4 (28 views)
2015-08-22 20:37:18

GamerC4 (32 views)
2015-08-22 20:37:01

Kefwar (41 views)
2015-08-22 18:07:24
HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37: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!