Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (736)
Games in Android Showcase (224)
games submitted by our members
Games in WIP (813)
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 ... 116
1  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-09-21 19:42:01
I downloaded java 9.  Go me.
2  Game Development / Shared Code / Re: Fast Atan2 [Again] on: 2017-09-11 09:00:58
My expectation is that the branches will be the much bigger problem in most cases.  If you're making enough atan/atan2 calls to be statistically important then it's pretty likely they will bunch up in time and the cost of loading the LUT to cache won't be a killer.  For the branches it's very unlikely that the probability of each won't be in the neighborhood of .5  so ~n/2 branch mispredictions per call where 'n' is the number of branches along a path.

EDIT: The way the benchmark is structured means the branch will statistically always be correctly predicted.
3  Game Development / Shared Code / Re: Fast Atan2 [Again] on: 2017-09-09 11:38:04
Broken record time.  Any benchmark that doesn't reflect an actual usage pattern is wishful thinking.  If you're linearly walking through angles you can compute with tiny errors in a couple of products and adds (I'm tired and was thinking forward here, opps)..no lookups no branches.
4  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-08-16 10:52:19
Didn't watch video but symbolically, computer's are actually quite excellent at algebra given a good piece of software...and getting there on verifying and generating proofs.
5  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-08-15 09:11:10
But he was design in different way – so it hold as many float part as he can.

Exactly, the point is to maintain the most significant part of a (sub)result.  The simplest example is multiply, if we think of our two numbers as consisting of a 24 bit integer (all fractional part so: 0.24) and an exponent, then the product simply adds the integer exponents and to store the new fraction part would require: 0.24 x 0.24 = 0.48, so 48 bits for the significand.  Since we're using a fixed number of bits those 48 bits are rounded to 24.
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-08-14 06:52:27
Looking at it that way doesn't seem useful.  For singles we have the 24 most significant bits so looking at in hex format and showing all 24 bits and aligning the decimal point gives (the '-' are bit positions beyond 24):

65536.0   0x1p+16               10000000000000000.00000000------
0.00300   0x1.89374cp-9                          .00000000110001001001101110100


So even the highest bit of 0.003 is too small to contribute (by one) so:  65536.0+0.00300 = 65536.0

If we were to multiply that by two and then add then it could:

65536.0+2*0.00300 = 65536.007812 = 0x1.000002p+16 = 10000000000000000.0000001

The exponents from the first are +16 and -9, so 16-(-9)=25 so too large a gap to contribute.
7  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-08-13 19:46:11
The point is it's single precision "floating point" (da dum tish!).  You have 24 significant bits and there you have it.  Notions of "epsilon" seem to add more confusion than clarity.
8  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-07-04 08:09:59
Made another thing. Sorry for spamming, this is just so neat. I love math!

4yrs ago did some quick goofying with mset domains here (set sampling to .5):
http://glslsandbox.com/e#9994.2
http://glslsandbox.com/e#9903.1
http://glslsandbox.com/e#9904.1
http://glslsandbox.com/e#9915.1
http://glslsandbox.com/e#9916.2
http://glslsandbox.com/e#9971.0
9  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-07-02 08:27:06
Obviously he's being an ass but cmon bruh.

Putting the best possible spin...what's the "valid point" of any of his comments?
10  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-07-01 11:32:52
Ah...cunt + straight pride week?  Nope, he's being an ass.  Even if being straight was illegal and/or got you killed in some places the cunt bit would ruin any potential point.
11  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-06-30 12:43:42
Wow. Markus is being a real dick recently.  If anyone still talks to him, now might be a good time to have a chat.
12  Game Development / Networking & Multiplayer / Re: Best - and currently active - networking lib? on: 2017-05-02 12:23:07
Aeron is designed for extremely low latency and destroys every other library in that metric.
It's too bad Martin Thompson stopped writing blog entries.  Still some great stuff there:  http://mechanical-sympathy.blogspot.fr/
13  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-05-01 21:24:50
Huh...this will be interesting: https://www.infoq.com/news/2017/05/no-jigsaw
14  Game Development / Performance Tuning / Re: Pathfinding over too large grid on: 2017-04-27 02:54:46
A course grain graph of waypoints?
15  Game Development / Shared Code / Re: Basic Image Quantization into 256 colors in 90 lines on: 2017-04-23 06:15:41
RBG isn't a good space to measure color differences.  Web search: "perceptual color spaces"  You'll also get better results if you don't simply map each pixel directly to a palette entry.  There are various methods, search "error diffusion"
16  Game Development / Game Mechanics / Re: Random weighted number between two numbers? on: 2017-04-14 11:03:14
Note that the Gaussian distribution isn't bounded...not sure if that's what you want.
17  Game Development / Game Mechanics / Re: Random weighted number between two numbers? on: 2017-04-14 09:48:51
Of course wikipedia is about as clear as ever:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
// symmetric triangle distribution: result on (-1,1)
public static float symmetricTriangular()
{
   return nextFloat()-nextFloat());  // from random number generator of choice
}

// symmetric triangle distribution: result on [lo, hi)
public static float symmetricTriangular(float lo, float hi)
{
    float halfDiff = 0.5f*(hi-lo);
    float triDist  = nextFloat()+nextFloat();   // triangle on [0,2)
    return halfDiff*triDist + lo;
}
18  Game Development / Game Mechanics / Re: Random weighted number between two numbers? on: 2017-04-14 09:33:34
The easiest the triangle distribution (https://en.wikipedia.org/wiki/Triangular_distribution), but it depends on how you what distribution curve to look.
19  Game Development / Performance Tuning / Re: Question: Branch Prediction Alleviating Performance Loss in Looped Conditionals? on: 2017-04-09 06:57:26
Of course for perf it's really hard to generalize.  On average a switch will win when using it can allow optimizations that wouldn't otherwise occur like not spilling registers between inside/outside the statement.  So the amount of work inside/outside is a really bad guess.
20  Game Development / Performance Tuning / Re: Question: Branch Prediction Alleviating Performance Loss in Looped Conditionals? on: 2017-04-08 20:55:45
Sound like using a @FunctionalInterface might be the thing to do.

"let's say that you have a loop that repeatedly calls a virtual function:"
If it can determine that the actual number of targets is one then it becomes a direct call, two or less it become an 'if' test between them, otherwise the standard read address and jump to it thing.
21  Game Development / Performance Tuning / Re: ArrayList$Itr and Escape Analysis on: 2017-03-06 13:13:11
You don't need a debug VM, just the disasm DLL (which Oracle can't distribute).  I posted a link at some point, but am unable to find it with a search (and don't have a copy ATM)

EDIT: Oh the file is 'hsdis-amd64.dll' and probably someone has a copy. 
22  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-02-19 18:49:58
My thinking was more "how to think about costs" than the specific example.  BTW, the original (not-complete) sequence is found here: http://www.codercorner.com/
23  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-02-19 10:58:14
RYG did an easy to understand breakdown of out-of-order optimization of some code by PhysX author Pierre Terdiman,
https://gist.github.com/rygorous/fdd41f45b24472649aaeb5b55bbe6e26?ts=4
24  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-02-13 19:40:52
https://twitter.com/Jonathan_Blow/status/831225844655796226

edit: or just click here: https://www.humblebundle.com/freedom
25  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-01-10 10:05:13
I quickly skimmed this (a list of java libs and such): https://github.com/akullpp/awesome-java
26  Game Development / Performance Tuning / Re: Tips for reducing frame rate spikes due to JIT early in a game? on: 2016-12-26 17:07:43
client/server VM is just a 32-bit VM thing.  Everything's server VM for 64-bit.
27  Game Development / Performance Tuning / Re: Most optimal collision detection algorithms on: 2016-12-14 06:29:24
Yeah, it depends too much on data.  For wide-open areas then a uniform grid is a nice easy choice and will perform reasonably.  Couple that with sweep-and-prune for the broad pass.
28  Game Development / Performance Tuning / Re: Most optimal collision detection algorithms on: 2016-12-14 01:14:06
Yeap...
29  Game Development / Performance Tuning / Re: Has anyone tried creating an optimized HashMap implementation? on: 2016-12-14 00:50:50
In C like using bucketed cuckoo hashing.
30  Game Development / Performance Tuning / Re: Most optimal collision detection algorithms on: 2016-12-13 20:58:14
@VoidBuffer - It all depends on how you can move less data (and not cache-thrash) and keep the local neighborhood 'n' small.

@bmanmcfly - different topic..this is broad-phase.  SAT's only claim to fame is it's easy to implement (that's not a bad thing). 
Pages: [1] 2 3 ... 116
 
cybrmynd (127 views)
2017-08-02 12:28:51

cybrmynd (151 views)
2017-08-02 12:19:43

cybrmynd (144 views)
2017-08-02 12:18:09

Sralse (160 views)
2017-07-25 17:13:48

Archive (633 views)
2017-04-27 17:45:51

buddyBro (755 views)
2017-04-05 03:38:00

CopyableCougar4 (1287 views)
2017-03-24 15:39:42

theagentd (1252 views)
2017-03-24 15:32:08

Rule (1227 views)
2017-03-19 12:43:22

Rule (1303 views)
2017-03-19 12:42:17
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

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
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!