Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (555)
Games in Android Showcase (148)
games submitted by our members
Games in WIP (601)
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 ... 98
1  Game Development / Articles & tutorials / Re: On magnitude and precision of floating-point values (2) on: 2015-03-02 09:02:54
It might be easier to some to understand if a result is insured to be within .5 ulp can also be called properly rounded.

Take addition.  If we have two fp values 'a' and 'b' then the fp result of a+b is:  F(a+b) where 'a+b' is logically performed as if in infinite precision and the function F rounds the result to a fp value.  By the spec the rounding function 'F' can be configured.  In Java you're stuck with round to nearest.

IMHO talking in decimal makes things more complicated.  The target audience is programmers so it's reasonable to expect they're comfortable in binary (or hex).
2  Game Development / Articles & tutorials / Re: On magnitude and precision of floating-point values on: 2015-03-01 09:55:22
You should note that all "normal" FP values have +1 bit of precision (it's implied), so 24 in singles.  2-24 is a very small relative value. (do the math)

The notion that everyone to defined relative to a single coordinate frame is one reason why people think singles aren't enough.  Have a character's position relative to the sun is pointless.  The character has no meaningful interaction with the sun.  Besides, it's absurdly complex.  An idealized model has the earth rotating at a constant (very fast) angular velocity about it's axis which in turn is moving around the sun.  Crazy complex which addresses no problem.  We've already had a thread about these kinds of problems.
3  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-02-28 22:28:35
@ KaiHH: Again no, it doesn't really matter what definition of noise you choice.  The problem is independent of scale.  In fact that's pretty much whole the point.  To keep it simple take any isotropic noise in 2D.  Apply any random composed transform (rotation, scaling, translation) of the plane and all results are self-similar.  

Moving to the simplest example would be 1D fbm.  You can zoom for an infinite amount of time with little precision and a little bit of memory.  Infinite here means uncountable..the machine running the simulation will die long before the simulation breaks.

Oh and because an infinite 2D plane can be mapped to a unit 3-sphere does not imply that mappings of the 3-sphere are equivalent to the m-set.

And all of this is very far from commonly needed in a game runtime.
4  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-02-28 11:37:54
You guys are hitting the nail on the head.  It's impossible to zoom forever on a chaotic map...it's a problem of precision.  It's easy to zoom forever on noise...it's a problem of scale.
5  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-02-28 08:11:30
big planet:  all spheres (assuming the planet is modeled as a sphere) are equivalent to the unit sphere.  So not an example..size doesn't matter.

deep zoom on the m-set: I totally forgot about this totally common game runtime example, but there's no complex number support in the library.
6  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-02-27 18:46:02
No.  They are different.  Give a common (not strawman) example.  I'll freely admit that examples do exist, but they are uncommon needs in terms of a game runtime.

WRT: error -- ok, but you're just hiding the problem.
7  Discussions / Miscellaneous Topics / Re: When things go too far on: 2015-02-27 18:43:25
Sharia isn't Islam.  It's tribal law.
8  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-02-27 15:01:35
For tools...sure.  There are existing libraries.  Runtime:  You don't need doubles.

(EDIT: the extra precision is more often the interesting part...not the wider range)
9  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-02-27 11:27:09
Doubles are for serious computing.
10  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-26 08:55:57
Opps: http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/
11  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-23 14:11:56
That looks like some of the upscaling methods.  hqx,scalex,sai, etc.
12  Discussions / General Discussions / Re: Does Java have 'pointers on: 2015-02-21 09:20:53
SEE: handle vs. pointer. (and that reminded me that I typed the wrong thing above)
13  Discussions / General Discussions / Re: Does Java have 'pointers on: 2015-02-20 13:09:16
I come from the school of thought:  think low-level, write high level.  Dot can be a pointer deference or not...static/optimistic analysis will determine.
14  Discussions / General Discussions / Re: Does Java have 'pointers on: 2015-02-20 12:23:03
method handles references are typed function pointers.  class object references are typed data pointers.  array references are typed and based primitive pointers.  arrays are the only ones you can (without stepping outside of the box) perform limited arithmetic with.

EDIT: I typed handle instead of reference.  A method handle is something else...well, a handle.
15  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-02-20 12:18:07
Additionally angles are usefully avoidable in the first place.
16  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-02-20 10:52:37
You're missing my point.  If any user wants to manipulate degrees AT RUNTIME PROCESSING for some reason...they can but it's their responsibility to do the conversion themselves.  And "degrees" is more natural is mostly myth.  That's only true for very large angles.  Burdening a library with extra useless functionality doesn't meaningfully help anyone.

Note everyone would agree if some library had:  getDistanceMeters, getDistanceFeet, getDistanceYards, getDistanceMiles, getDistanceInHoursForAEuropeanLadenSwallowToFly.  Yo, just do one.
17  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-02-18 21:21:38
Never, ever support degrees.  The idea of degrees is that it takes the sun exactly 360 days to travel around the earth.  And that's exactly how useful they are.
18  Game Development / Game Play & Game Design / Re: What's The Best Way To Define Items? on: 2015-02-18 09:01:27
http://www.java-gaming.org/topics/archtypes-composition-and-code-is-data/26554/view.html
19  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-17 16:55:06
Nice.
There needs to be something like Souper but for shader code, although it would probably be more effective on pre-compiled shaders.
Super optimizers are an interesting toy thing to do, but they're insanely slow.  Also this page's results aren't too encouraging. 31*i no result?  Constant multipliers and divisors over integer -> addition chains.
20  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-17 16:35:54
Manipulation of sign bits is handy on the CPU as well (both float and integers).  Have I ever mentioned that GL compiling GLSL from source in the driver was a really terrible idea?? Wink
21  Game Development / Game Mechanics / Re: Calculate Derivatives for Newton's Method on: 2015-02-16 17:55:52
Math.pow(x,INTEGER)?  Stop.
22  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-16 09:25:23
Hold on kids!  Method references are way more than sugar.  You can define a method signature and have references to methods which match that signature.  The simplest usage is you no longer need a one to one mapping of an implementation to class file.  The implementation can be anywhere.
23  Discussions / General Discussions / Re: Do you sometimes skip braces? on: 2015-02-08 18:33:06
That's why skipping the braces is such a bad idea to start with. Down the road you "might" (read: will) need to add statements to that block, and you "might" (read: will) forget to add the braces.
Meh.  The notion that coding conventions can prevent bugs is even sillier than test units can.
24  Discussions / General Discussions / Re: Do you sometimes skip braces? on: 2015-02-08 11:09:36
Whenever it seems easier to understand what I'm writing.
25  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-07 13:15:58
Got a really good laugh out of this: http://upload.wikimedia.org/wikipedia/commons/1/1b/Linux_Distribution_Timeline.svg
26  Discussions / Miscellaneous Topics / Re: Unit Testing: Waste Of Time? Discuss on: 2015-02-07 13:08:46
Note...these
For Roquen, this mostly means code generating code.
For me, this mostly means code modifying code.
Note: my perspective these two are the same.  And really my example of GCs is also the same reasoning.  Which is code which is performing complex structural changes via a set a rules, transformations, etc.  As a personal example I have some Mathematica libraries which manipulate specialize forms of equations.  The "test-units" associated with a given library are ~50x larger than the library it's testing.  Something as simple as swapping the ordering of two valid rules can cause things to break.

Quote
For anything related to finances, health or security, thorough unit tests should be a matter of course.
The real problem here is that there are no good programming languages for these things to be written in.  It's rather dumb that checking of invariants is outside of the programming language itself.  I've never looked at any of them seriously but I know there's some experimental languages which are rolling in automatic proofs and theorem solving.

Pretty much all major areas of CS are suffering from this.
27  Discussions / Miscellaneous Topics / Re: Unit Testing: Waste Of Time? Discuss on: 2015-02-07 09:51:22
The question has nothing to do with insuring a piece of code is correct to its contract.  That's a different topic entirely. 

Unit-testing is a battery of black-box tests which attempts to insure contracts are fulfilled.  This is pretty much only useful in very narrow situations.  Code that writes code is always one (languages, meta-programming, expressing rewriting, etc.).  Some serious numeric code is another, GCs of any complexity.  The vast majority of code (even dynamic and functional) don't really need it.

The notion that one can prevent bugs by design is a fail.   
28  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-06 10:04:56
I've always had bad luck with ubuntu.  Mint and centos seems to work better for me.
29  Discussions / Miscellaneous Topics / Re: Unit Testing: Waste Of Time? Discuss on: 2015-02-06 06:30:48
The Rust language relies very heavily on unit...
Code that writes code.
30  Discussions / Miscellaneous Topics / Re: Unit Testing: Waste Of Time? Discuss on: 2015-02-05 20:26:43
See: white box vs. black box testing.  White box is good.  Black box is usually a waste of time.
Pages: [1] 2 3 ... 98
 
BurntPizza (30 views)
2015-02-27 06:09:35

BurntPizza (22 views)
2015-02-27 05:56:17

Riven (15 views)
2015-02-27 02:34:15

Riven (21 views)
2015-02-27 01:47:26

Riven (20 views)
2015-02-27 01:46:04

BurntPizza (16 views)
2015-02-27 00:52:04

BurntPizza (18 views)
2015-02-27 00:50:29

Riven (37 views)
2015-02-26 23:38:45

Riven (14 views)
2015-02-26 23:37:24

BurntPizza (32 views)
2015-02-26 21:13:04
How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27
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!