Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (702)
Games in Android Showcase (203)
games submitted by our members
Games in WIP (775)
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 ... 115
1  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-12-07 19:45:50
Since I haven't mentioned cuphead in awhile:  It has an approximate release date - http://studiomdhr.com/cuphead-coming-mid-2017-2/

Are you a developer on this game?
Nope...just not my kinda game but still looks awesome.
2  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-11-24 18:55:37
Interesting...that probably mean this isn't new to everyone.  (I get the same error BTW...but no surprise I've the latest eclipse).

EDIT: Figure 3 does compile, but not Figure 4.
3  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-11-24 18:42:23
I hadn't tried it yet.  You try javac?
4  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-11-24 18:14:54
Oh!  Never saw this flaw.  https://t.co/jgra2x0dZX
5  Game Development / Newbie & Debugging Questions / Re: Quaternion in Game Development. on: 2016-11-20 12:50:25
Oh, you're right. Thanks! That was a good hint. I gotta go change some code...
Representing uniform scaling in a quaternion works nicely when the conversion as layed out here is used (the matrix representation right before the sentence "since qw*qw + qx*qx+ qz*qz+ qy*qy = 1 this gives").
Apparently, one also does not need to renormalize the quaternion when applying any rotations. This is really nice. Applying uniform scaling to any quaternion is then just scalar-multiplying by sqrt(scaleFactor).

Yeap.  Since rotation is P' = QPQ-1 (which eliminates any scale factors) or QPQ* which will scale by magnitude of Q squared and these compose as expected.
6  Game Development / Newbie & Debugging Questions / Re: Quaternion in Game Development. on: 2016-11-20 01:17:37
On quaternions and scaling...yeah probably not worthwhile computationally.  The math's all wrong though.  The issue is if you convert to a matrix..the conversion code is assuming that it's a unit quaternion.
7  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-11-10 19:06:25
I bet he gets tired of it after 1 year.
Don't count on it.  Assuming he hasn't lost his mind...than we're talking about the same Trump as that of the 80s.  Hell he even sketched what he would do if he ever ran for president sometime in the 90s.
8  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-11-09 15:48:05
Even if he eliminates his hate speech and pushes totally moderate agenda and none of his WTF things...it's still a disaster.  Hate of others is now OK.  Hate of america is flamed. 
9  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-30 20:42:13
Since I haven't mentioned cuphead in awhile:  It has an approximate release date - http://studiomdhr.com/cuphead-coming-mid-2017-2/
10  Discussions / General Discussions / Re: It's official: Java 9 will support Ahead-Of-Time (AOT) compilation on: 2016-10-28 11:44:53
According to the updated JEP you can choose the compilation level...so already have profile guided at AOT.
11  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.9.0 Pre-Release on: 2016-10-27 13:53:03
Yeah you can just drop the high bits.
12  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.9.0 Pre-Release on: 2016-10-27 13:13:30
Well if 64-bit operations are ok...xoroshiro is state-of-the-art and very fast (notice the result is ready after one addition). 
13  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.9.0 Pre-Release on: 2016-10-27 12:44:21
The code for the sampling all looks good.  I'd think about changing the random number generator.  

xorshiro maybe: http://xoroshiro.di.unimi.it/

A maybe problem here is it's 64-bit (thinking android).  I tossed up a few other various choices here: https://github.com/roquendm/JGO-Grabbag/tree/master/src/roquen/math/rng

EDIT: Seems I drop the ball on some of mine.  I can restructure these to be faster on average for real use patterns.
14  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.8.0 Release on: 2016-10-23 09:28:02
That's great news! Are these trade-offs done automatically by sollya or does it need manual tuning?

You have to make the choices about how to reduce the range.  The tricky bit here is that they mostly involve division and java doesn't give access to 1/x approximation operations.

I had a rather unique situation where I was using a "circular heightmap", a 1D heightmap that wraps around a circle with a certain resolution.
Does the heightmap actually model a perturbed circle?  If so there are options of doing something other than equi-angluar.  That way you can move to a cheaper mapping function.
15  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.8.0 Release on: 2016-10-22 18:09:01
Yes.  The trick is range reduction since atan doesn't converge as fast.  So there are many more choice trade-offs.
16  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.8.0 Release on: 2016-10-22 15:59:12
I forgot to note in the pastebin code that brute force error checking isn't needed.  Say for polynomial methods you can compute where the error should be zero and verify that within a couple of ULPs of these points that the sign of the error does change.  Likewise compute where the error should be maximum and find the peaks.  Much faster and exact error measures.

EDIT: Oh and that code/output should be printing 'abs error' and not 'rel error'.
17  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.8.0 Release on: 2016-10-22 02:01:28
http://pastebin.java-gaming.org/e291e8d814b10


func   @                              : rel-error                      : ulp-dif  bits
orig   @   2.356194 (   0x1.2d97c6p1) : 5.881720e-09 (0x1.9430508p-28) : 52977825 27
horner @   2.356194 (   0x1.2d97c6p1) : 5.881720e-09 ( 0x1.94304fp-28) : 52977822 27
range  @   1.570795 (   0x1.921f9cp0) : 6.017409e-12 (    0x1.a77p-38) :    54200 37
sollya @   1.274948 (   0x1.4662fap0) : 4.440892e-16 (      0x1.0p-51) :        4 50

reduce @   0.651724 (   0x1.4daecp-1) : 3.338118e-09 ( 0x1.cac992p-29) : 30067090 28
18  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.8.0 Release on: 2016-10-20 10:48:57
Thinking two things really:  the actual error is more than theagentd found AND they are both at the same input value.
19  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.8.0 Release on: 2016-10-20 07:27:41
Since there are no comments.  Doesn't anyone notice anything "odd" about these results?
20  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.8.0 Release on: 2016-10-19 18:24:27
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
private static void brutex()
{
  float v = .1f;
  double e = 0.f;
  double ev = v;
  do {
    double r1 = sin_theagentd_arith(v);
    double r2 = Math.sin(v);
    double d  = Math.abs(r1-r2);
   
    if (d > e) {
      e  = d;
      ev = v;
    }
   
    v = Math.nextUp(v);
  } while(v <= PI);
  System.out.println(e + " @ " + Double.toHexString(ev) + " :" + sin_theagentd_arith(ev) + " " + Math.sin(ev));
}


5.881720110956223E-9 @ 0x1.2d97c6p1 :0.7071069396761204 0.7071069455578405
5.881719777889316E-9 @ 0x1.2d97c6p1 :0.7071069396761207 0.7071069455578405
21  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.8.0 Release on: 2016-10-19 07:49:53
Use Horner's form:  Less instruction issues and more accurate.  If you wanted more speed (call-site dependent) you could convert to Estrin's method at a very small accuracy reduction.  Rewritten in Horner's:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
private static double sin_theagentd_arith(double x)
{
  double xi = Math.floor((x + Math.PI/4.0) * 1.0/Math.PI);
  double x_ = x - xi * Math.PI;
  double sign = ((int)xi & 1) * -2 + 1;
  double x2 = x_ * x_;

// double sin = x_;
// double tx = x_ * x2;
// sin += tx * c1; tx *= x2;
// sin += tx * c2; tx *= x2;
// sin += tx * c3; tx *= x2;
// sin += tx * c4; tx *= x2;
// sin += tx * c5; tx *= x2;
// sin += tx * c6; tx *= x2;
// sin += tx * c7;
// return sign * sin;

  double sin;
 
  x_  = sign*x_;
  sin =          c7;
  sin = sin*x2 + c6;
  sin = sin*x2 + c5;
  sin = sin*x2 + c4;
  sin = sin*x2 + c3;
  sin = sin*x2 + c2;
  sin = sin*x2 + c1;
  return x_ + x_*x2*sin;
}
22  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.8.0 Release on: 2016-10-17 22:23:21
No..I just need to approximate a function once in a blue moon.

And since I forgot above, here's the Robin Green papers.  These assume minimal background in any of the topics.
https://basesandframes.wordpress.com/2016/05/17/faster-math-functions/
23  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.8.0 Release on: 2016-10-17 12:12:57
Yeah I just did a REPL session. 

I tossed together a script example: http://pastebin.java-gaming.org/aee29618e4d11
The output of the script looks like this: http://pastebin.java-gaming.org/ee2917e8d411b

24  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.8.0 Release on: 2016-10-16 11:49:28
junk=approximation from linked thread, order-9,11,15 are 9,11 and 15th degree polynomial approximations from the software package I provided a link to.  These were designed to minimize relative error and not required to be correct at sin(+/- pi/2) or any other constraints.  Call each of the approximations p(x) then the plot is abs. error expressed as p(x)-sin(x) where sin was computed at 165 bits.  The 'n' is nano.  I should have change that output but it didn't seem worth the time.  So the 15th degree poly from the linked thread has lower error than a proper 9-th degree poly for about 1/2 the domain.  At all other error measures it's worse, peak, average, RMS.  Average error is directly related to the unsigned area under the error curve. 
25  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.8.0 Release on: 2016-10-16 01:09:27
Like I said.  They have no clue what they're talking about.



@theagentd: You would want to walk the other way...https://en.wikipedia.org/wiki/Horner%27s_method
26  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.8.0 Release on: 2016-10-14 20:57:22
To note.  The linked paper and that thread on polynomial approximations are examples of exactly how to not attack a problem.  If anyone want to create approximations..start here: http://sollya.gforge.inria.fr/ either the software itself or walk the papers.  There's also the papers by robin green which cover the basics quickly.

Example: "It takes a long time to create these approximations".  It should take less than a second.  The approximation is 15th degree (pretty high) and the range reduction is unsound.
27  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-13 11:06:01
Just read: JEP 295 - Ahead-of-Time Compilation
http://openjdk.java.net/jeps/295
28  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-07 10:40:58
Now switch to quasi monte carlo.
29  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-06 21:00:20
Pointer to function: https://docs.oracle.com/javase/8/docs/api/java/lang/FunctionalInterface.html

You've always had pointers to data structure.
30  Game Development / Game Mechanics / Re: The Rendering Equation on: 2016-09-30 11:38:29
Adding up an infinite number of small pieces.
Pages: [1] 2 3 ... 115
 
Lunch (72 views)
2016-12-06 16:01:40

ral0r2 (297 views)
2016-11-23 16:08:26

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

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

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

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

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

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

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

Roquen (471 views)
2016-10-22 01:57:43
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!