Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
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 ... 61
1  Discussions / General Discussions / Re: JDK: upcoming features on: 2013-05-21 21:59:45
Me too, but I'm not even holding my breath for stuff their actually talking about.
2  Discussions / General Discussions / Re: Blogpost about Java for Game Programming on: 2013-05-21 21:58:57
structures, arrays of structures, SIMD, cache preload hints, non-temporal stores, load fences, store fences.  Questions?
3  Discussions / General Discussions / Re: Blogpost about Java for Game Programming on: 2013-05-21 18:15:00
Shame on me for looking at the wrong column.
4  Discussions / General Discussions / Re: Blogpost about Java for Game Programming on: 2013-05-21 17:50:09
And that's what I said.  These benchmarks should java being between 2-37x slower than GCC, and GCC is a hunk of junk.
5  Discussions / General Discussions / Re: Blogpost about Java for Game Programming on: 2013-05-21 14:54:40
Taking a step back, most folks really shouldn't care about the speed difference between C/C++ and Java.  They're smallish linear differences say between 4-20x.  And most people will only see the bottom end of that range because they aren't going to be taking advantage of SIMD and cache oblivious methods (to name a couple).  And more to the point most people don't need to push tons of computations.  And since the speed difference is linear, algorithmic improvement is much more important than the choice of language.  Likewise moving away from single threaded to multi-threaded should give a nice additional linear boost.   Now of course the same changes could be applied to a C/C++ version as well, so it boils down to your point:  which language (or some other choice) can you to get the job done in the least amount of engineering time (and to spec)?  Choose that language and run with it.

What am I referring to is simple.  I only benchmark very expensive computations and C/C++ exposes a closer to the metal feature set which allow for very significant performance gains.  We've covered what Java's (actually the JVM) missing to allow to help close the gap pretty much ad nauseam.  Sometimes some programming trickery (a la Riven's structure library) can help, but mostly we're SOL until some features are added to the JVM.

Not serious mode:  Java?  compact?  And you said that with a straight face?
6  Discussions / General Discussions / Re: JDK: upcoming features on: 2013-05-21 14:19:28
John Rose is mocking me...basic support is being considered for:  Tuples/structs, foreign data views & macros (templates in C++ speak).

Slides: http://cr.openjdk.java.net/~jrose/pres/201207-Arrays-2.pdf
Video: (I haven't watched this) http://medianetwork.oracle.com/video/player/1785452137001
7  Discussions / General Discussions / Re: Blogpost about Java for Game Programming on: 2013-05-21 09:49:08
In other words: I'm realistic.
8  Game Development / Articles & tutorials / Re: Real 4D World Rendering on: 2013-05-20 14:30:17
Complete unrelated, but Java doesn't have concrete nor flattened multidimensional arrays, so type[][][] with fixed lengths should be avoided (except in cases where your using the fact to quickly swap rows...for instance).
9  Game Development / Performance Tuning / Re: Anyone else here get a major kick out of refactoring and optimizing regularly? on: 2013-05-20 14:12:08
Best case micro-optimizations are linear increases...never forget that.  Sometimes linear increases are sufficient, but really you want to be pretty sure that there isn't a reasonable high level change that would give you more "bang-for-your-buck".
10  Game Development / Newbie & Debugging Questions / Re: Using less timers in a game on: 2013-05-18 20:55:34
Simple answer: priority queue.
11  Discussions / General Discussions / Re: Blogpost about Java for Game Programming on: 2013-05-18 17:35:37
Language benchmarks are mostly useful to language implementors.  Let me quote the referenced benchmark: "A team at Google created a "simple and compact" benchmark that didn't take advantage of language-specific features. An algorithm was implemented using each language's "idiomatic container classes, looping constructs, and memory/object allocation schemes.".

"Simple & compact" = can't be testing much.
"memory/object allocation schemes" = using default malloc/free in C++ which is dumb if you want high performance.
"didn't take advantage of language-specific features" = WTF?  The not much tested is totally meaningless.

Every single time I've compared code that I've implemented in Java and C, the C version completely smokes the Java...no contest...not even close.
12  Java Game APIs & Engines / OpenGL Development / Re: Texturing a sphere, creating a cube map - the proper way? on: 2013-05-18 17:02:01
Short answer: Cube map is easiest and cheapest.  Any simple mapping of a 2D texture to a sphere has aweful texture coverage which is also non-uniform.  Imagine wrapping a square piece of rubber around a ball and you'll get a rough idea (being a rectangle doesn't really help).
13  Game Development / Newbie & Debugging Questions / Re: Tween functions? on: 2013-05-16 11:38:16
Well then: splines.  3rd order Hermite is a nice easy starting point.
14  Game Development / Newbie & Debugging Questions / Re: LibGDX Actor - to use or not to use; or, *when* to use? on: 2013-05-15 17:40:48
It'd be kinda neat to see an Actor system built off that lightweight thread library that's been making the rounds here... any takers?
I'll pass.  But it would be nice to have a very lightweight actor framework that (at least optionally) is inherently single threaded.
15  Game Development / Shared Code / Re: Java Quadtree Implementation on: 2013-05-15 17:11:35
Immutability hurts you here.  In no way does it help.  People with distributions which aren't close to uniform prefer <method-X> over uniform grids.

Yes... I was talking about functional languages...  Cranky
You mean you're talking about purely functional languages. Wink
16  Game Development / Newbie & Debugging Questions / Re: Text based combat system trial (Java) on: 2013-05-15 11:26:46
Probability distributions are interesting (I promise!).  A reasonable accessible overview of some basics is available here: http://www.redblobgames.com/articles/probability/damage-rolls.html
17  Game Development / Newbie & Debugging Questions / Re: How do i generate triangles from points on a plane? (in 3D) on: 2013-05-14 19:58:39
In that case: I'm pretty sure that there is a java version of qhull which probably has the code that you need.
18  Game Development / Newbie & Debugging Questions / Re: How do i generate triangles from points on a plane? (in 3D) on: 2013-05-14 17:43:44
We're already having a communication problem:  You say that all the point are on a plane.  If that is the case there's no projection needed.

search: "mesh from point cloud".
19  Game Development / Newbie & Debugging Questions / Re: How do i generate triangles from points on a plane? (in 3D) on: 2013-05-14 17:20:19
You're teacher's correct, since all the points are on a plane it's a 2D problem.  But to get an answer to your question you'll have to provide more details.  Like what are you attempting to do.

EDIT: Well, assuming that there's an outer perimeter of whatever it is you're doing, then you need to find the convex hull...well assuming you want convex containment.
20  Game Development / Newbie & Debugging Questions / Re: Finding nearest objects on: 2013-05-14 14:54:15
Well, the next step up from the naive n2 is n(n-1)/2 (still n2 in Big-O, but we don't care).  Collision detection is inherently an n2 problem.  The worst case of SAP is still n(n-1)/2 checks plus the cost of whatever sorting scheme.
21  Game Development / Shared Code / Re: Java Quadtree Implementation on: 2013-05-14 14:22:32
Immutability hurts you here.  In no way does it help.  People with distributions which aren't close to uniform prefer <method-X> over uniform grids.
22  Discussions / General Discussions / Re: New feature: necro thwarter on: 2013-05-07 16:44:33
@Riven - sadly yes.
23  Discussions / General Discussions / Re: New feature: necro thwarter on: 2013-05-07 16:36:41
In all these years, I can't recall a reply that actually was worth such a revival.
Sad  I've posted in old threads.
24  Game Development / Newbie & Debugging Questions / Re: Bayer ordered dithering on: 2013-05-07 06:48:27
Keep it simple.  Throw away some bottom bits, add (or sub) the dither, throw away some bottom bits.  Goof around with that...you'll need to clamp unless you account over or underflow (add vs. sub).

R = ((R & ~0xF)+D)&~0xF.
25  Game Development / Shared Code / Re: Java Quadtree Implementation on: 2013-05-07 05:59:01
Distribution is the key litmus test.  Then it depends on the implementation.
26  Game Development / Newbie & Debugging Questions / Re: Finding nearest objects on: 2013-05-06 08:12:34
Sweep-and-prune can be in any direction and number of dimensions, so a 2D systems can use 1 or 2.  As I said in that other thread, nobody can tell you what's fast without knowing (probably more information you can provide) information about your data set.  It'll be pretty common that a uniform grid will out-perform sweep-and-prune alone however and if your cells can contain a largest number of entities then sweep-and-prune inside the grid cells can be a win (there's a closely related technique called SAP-trees).  SAP can reduce the n(n-1)/2 by limiting how far forward your looking.  A uniform grid can be viewed as SAP where your sorting along the axises and only sorting in discrete chunks.

EDIT: No AABB requirement...but if your using the coordinate frame as sort directions then you effectively using an AABB.  Also note that for an arbitrary direction D, then choosing -D will be faster or slower.
27  Game Development / Performance Tuning / Re: Optimizing a QuadTree for enormous maps on: 2013-05-03 14:54:24
I just ran across this: http://www.dtecta.com/files/GDC13_vandenBergen_Gino_Physics_Tut.pdf
28  Game Development / Game Play & Game Design / Re: [SOLVED]Random Generated 2D world on: 2013-05-02 13:34:35
nextInt(100) will return values between 0 and 99...so 100 possible results.  (Hint: read the documentation..if you're using an IDE it should automagically display it for you)
29  Game Development / Performance Tuning / Re: Optimizing a QuadTree for enormous maps on: 2013-05-02 11:21:39
Let me semi-address your question of references.  The trick is that I'm not aware of much "new" that pertains to the problem.  The speed issue of UG and RQT is solely an implementation detail related to being cache obvious.  Back when I had anything to do with academia (and dinosaurs walked the earth) the references were by Hanan Samet.  You're probably better off just spending some time on citeseer, arxiv and/or mendeley.  You kids today have no idea how lucky you are to have free access to tons of research papers.  A quick search yielded this http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.148.4652 which appears (from a 2 minute skim of 160 page paper) to be a reasonable to get an overview of some various methods.
30  Game Development / Game Play & Game Design / Re: Random Generated 2D world on: 2013-05-02 10:31:12
nextInt(int)

For not explicitly storing the location of all random placeables look here: http://www.java-gaming.org/topics/uniform-feature-points/28000/view.html
Pages: [1] 2 3 ... 61
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Try the Free Demo of Revenge of the Titans

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (74 views)
2013-05-17 21:29:12

alaslipknot (86 views)
2013-05-16 21:24:48

gouessej (115 views)
2013-05-16 00:53:38

gouessej (110 views)
2013-05-16 00:17:58

theagentd (121 views)
2013-05-15 15:01:13

theagentd (110 views)
2013-05-15 15:00:54

StreetDoggy (155 views)
2013-05-14 15:56:26

kutucuk (177 views)
2013-05-12 17:10:36

kutucuk (174 views)
2013-05-12 15:36:09

UnluckyDevil (183 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.202 seconds with 20 queries.