Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (602)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (650)
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 ... 89
1  Discussions / General Discussions / Re: Windows 10 on: 2015-07-29 22:26:55
Personally don't like the new start menu in Windows 10, seems to try to do too much, cluttered, not easily customisable and still partially uses the horrid metro UI. Installed Classic Shell which works great and restores the simple straight forward start menu.
2  Game Development / Shared Code / Re: Extremely Fast sine/cosine on: 2015-07-26 15:51:17
HeroGraveDev thanks for the modification, it does clean up the code however after benchmarking it seems that the modulas '%' operator is pretty slow. My benchmark result after warming and running 100,000,000 invocations of both sin/cos are as follows:

1  
2  
3  
4  
5  
Default      :   22383602954ns (fifth)
Devmaster    :   106982ns (second)
Fast         :   115546ns (third)
Riven        :   103070ns (first)
Hero         :   6229776220ns (fourth)
3  Game Development / Shared Code / Re: Extremely Fast atan2 on: 2015-07-25 22:15:08
I'll put together a benchmark for sin/cos real quick with the two versions you guys posted and then break out into a new topic for sin/cos specifically probably
cool, thanks for the benchmark, theres also an implementation for fast sin/cos found here which you might also want to try.
4  Game Development / Shared Code / Re: Extremely Fast atan2 on: 2015-07-25 21:02:33
That's great! Now please another one for fast sin() and cos() replacements within [-pi, +pi). Smiley
Rumor has it that the GNU Scientific Library is a treasure trove of nice and fast math functions.
Heres a fast sin and cos from around the same time
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  
31  
32  
33  
34  
35  
public class FastCosSin {
   
   static final float PI = 3.1415927f;
   static final float MINUS_PI = -PI;
   static final float DOUBLE_PI = PI * 2f;
   static final float PI_2 = PI / 2f;
   
   static final float CONST_1 = 4f / PI;
   static final float CONST_2 = 4f / (PI * PI);

   public static final float sin(float x) {
      if (x < MINUS_PI)
         x += DOUBLE_PI;
      else if (x > PI)
         x -= DOUBLE_PI;

      return (x < 0f) ? (CONST_1 * x + CONST_2 * x * x)
            : (CONST_1 * x - CONST_2 * x * x);
   }

   public static final float cos(float x) {
      if (x < MINUS_PI)
         x += DOUBLE_PI;
      else if (x > PI)
         x -= DOUBLE_PI;

      x += PI_2;

      if (x > PI)
         x -= DOUBLE_PI;

      return (x < 0f) ? (CONST_1 * x + CONST_2 * x * x)
            : (CONST_1 * x - CONST_2 * x * x);
   }
}
5  Game Development / Shared Code / Re: Extremely Fast atan2 on: 2015-07-25 20:40:40
There was also another version of a fast atan floating around on the forums a while back, not sure how it'll compare to the above but might be worth giving it a spin in one of the benchmarks

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  
public class Atan {
   
   static final float PI = 3.1415927f;
   static final float PI_2 = PI / 2f;
   static final float MINUS_PI_2 = -PI_2;
   
   public static final float atan2(float y, float x) {
      if (x == 0.0f) {
         if (y > 0.0f)
            return PI_2;
         if (y == 0.0f)
            return 0.0f;
         return MINUS_PI_2;
      }

      final float atan;
      final float z = y / x;
      if (Math.abs(z) < 1.0f) {
         atan = z / (1.0f + 0.28f * z * z);
         if (x < 0.0f)
            return (y < 0.0f) ? atan - PI : atan + PI;
         return atan;
      } else {
         atan = PI_2 - z / (z * z + 0.28f);
         return (y < 0.0f) ? atan - PI : atan;
      }
   }

}
6  Games Center / WIP games, tools & toy projects / Re: We Shall Wake Demo 7 Preview on: 2015-07-07 23:05:56
No problem! I'm currently working on physically based atmospheric scattering, so we'll have procedural skies from now on. I don't think we'll manage to get clouds in there for the demo though, so you'll just have to be satisfied with seamless day/night transitions and sexually arousing orange sunsets. =P
sounds awesome, look forward to that.
7  Games Center / WIP games, tools & toy projects / Re: We Shall Wake Demo 7 Preview on: 2015-07-07 18:53:07
Looks awesome, really love the look and nice AA Smiley

If you like some critical feedback, I found the skybox a bit distracting (although looks great) it sort of broke the illusion due to the way it stretches and skews when the camera rotates, e.g. at 1:02 to 1:16 of the video, especially see how the moon stretches.
8  Game Development / Shared Code / Re: embedding javaFX inside opengl on: 2015-07-01 09:24:05
This looks interesting, not very familiar with JavaFX yet but would you mind explaining briefly the technique you are using here to embed JavaFX inside OpenGL? are you simply rendering the javafx gui to a javafx image and then copying that over to an opengl texture? or some other method?
9  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-06-25 19:33:34
Personally prefer degrees over radians, just find them easier to wrap my head round when thinking about rotations. Guess it ultimately boils down to personal preference.

Just curious and not sure how feasible it is, would it be possible to support both? like having a method in the library that can be used to switch all the methods globally in the library to use either DEG or RAD?

Would end the debate over which type of angle measurement to use Smiley
10  Java Game APIs & Engines / Java 2D / Re: Approaches to active rendering with no libraries on: 2015-06-17 14:47:06
One thing to keep in mind is that going forward the preferred way to distribute Java application is going to be (already is) by embedding a JRE (since you can't really rely on there being a system JRE anymore).

Java 9 is introducing modularisation (project jigsaw), so AWT/Swing will probably be put into its own module and JavaFX into its own. Therefore it'll be up to the developer to include the modules or other libraries (SWT, LWJGL, LibGDX, etc) one needs in addition to the basic JRE. So not really any point targeting "no libraries" since you'll have to include a module library or 3rd party library anyway so best to just pick the one best for the job.

AWT/Swing module will probably be around for a while though but eventually dropped once usage drops below a certain level.
11  Java Game APIs & Engines / Java Sound & OpenAL / Re: Does any1 know any good LWJGL3 OpenAL library? on: 2015-05-29 14:24:47
This library does not seem to work anymore as OpenAL binding has been changed even further? I tried to fix it by replacing instances of AL10.alListener with AL10.alListenerfv, but that seems to break the 3D sound.
The code broke because of API's changes in LWJGL3 (it was in pre-alpha at the time), anyway I've updated the library to work with the latest nightly build of LWJGL3 and re-uploaded.

You can grab it from here.
12  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-05-21 11:58:39
Added stb bindings to LWJGL 3:
Awesome stuff, finally a decent AWT free solution for Java to read/write images and generate fonts on the fly.
13  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-05-14 10:23:35
Is there some special form that gets me to a place where I can do shadows across a larger scene?

Kev
Depending on how large your scenes are and your maximum depth buffer precision, you might be able to get away with just simple shadow mapping but for really large scenes typically the CSM or PSSM techniques have been used.

Most games also these days use some form of Ambient Occlusion (or approximation of it, like SSAO). Its an effect which really adds to the scene (especially for voxel style games). A relatively recent and popular algorithm seems to be Scalable Ambient Obscurance.
14  Discussions / Miscellaneous Topics / Re: Unit Testing: Waste Of Time? Discuss on: 2015-02-05 13:57:18
Another argument for techniques like TDD which is usually pushed is that they help you design cleaner and better public API's but personally not seen any advantage here over manually doing so (in fact its faster to do so manually).

When it comes to writing games (as opposed to libraries and engine code), unit testing is a complete waste of time. Jonathan Blow sums up the problem pretty nicely (including arguing pretty strongly against spending time commenting code and most types of optimisations).
15  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-04 17:41:10
Replaced the LWJGL vecmath packages with libgdx ones in SPGL (my "framework"). Discovered libgdx vecmath is not threadsafe and everything broke. Grr.

Cas Smiley
Any plans to move to LWJGL3? or going to stick to LWJGL2 for now?
16  Game Development / Newbie & Debugging Questions / Re: Moving an object in a circle on: 2015-02-03 20:18:40
Do keep in mind that Java's Math sin and cos methods use radians and not angles.

You'll need to use Math.toRadians() to use angles.

e.g.
1  
2  
Math.sin(Math.toRadians(speed * angle));
Math.cos(Math.toRadians(speed * angle));
17  Game Development / Newbie & Debugging Questions / Re: Access violation with glDrawArrays on: 2015-01-28 16:07:09
Would anyone be interested in an extensive graphics performance optimization article about identifying and solving bottlenecks?
Yes, that would be very useful.
18  Game Development / Newbie & Debugging Questions / Re: Access violation with glDrawArrays on: 2015-01-28 15:30:59
I'm assuming theagentd is referring to ARB_buffer_storage when talking about persistently mapped memory.

If so, he's right in that its the fastest way now, only downside is that it seems to require pretty new hardware (OpenGL 4.3+) making it pretty much unusable for applications targeting the masses (unless you want to have an application with multiple rendering paths). Once such hardware becomes mainstream its definitely the way to go.
19  Discussions / General Discussions / Re: Most graphically polished (HD)3D games developed in Java? on: 2015-01-26 12:45:09
There a quiet a few super nice looking 2d Java games these days but as for 3d, aside from some of the ones mentioned above, two really impressive looking ones are Caromble! and the WIP game We Shall Wake (which is probably the most impressive I've seen).
20  Java Game APIs & Engines / Engines, Libraries and Tools / Re: GLFW 3.1 is out on: 2015-01-20 15:23:30
And, is this going to bring LWJGL out of alpha?
It won't bring LWJGL3 out of alpha but into alpha (its pre-alpha atm) and it'll hit beta once OpenGL ES support and the missing OpenGL extensions are added.
21  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [Slick2D] Why the F is it so slow? on: 2015-01-09 11:15:16
You need to post more of your slick code, not enough to isolate the problem from the above snippet.
22  Discussions / General Discussions / Re: New rules regarding Game Engine topics on: 2015-01-07 14:35:24
The JGO Graveyard might be a nice name Smiley
23  Java Game APIs & Engines / OpenGL Development / Re: glVertex3f doesn't care about z axis??? on: 2015-01-05 00:05:19
I'm well aware that I should be using VBO's.  I just wanted to get an image displayed before I tried anything else...
OpenGL is pretty low level, so it not as straight forward as high level libraries to draw an image.

To draw an image you would normally first need to set up your matrices on how to draw your vertices on the screen which you can pass to a shader, then draw a square (using two triangles, the vertices and texture coordinates of which would be in a VBO). Then you would load your image as an OpenGL texture and pass that to a shader which draws it on the triangles when rendering them.
24  Java Game APIs & Engines / OpenGL Development / Re: glVertex3f doesn't care about z axis??? on: 2015-01-04 23:55:11
try the OpenGL tutorials here, they are easy to read, use GLFW and include source code. Your above snippet of code is using jurassic OpenGL which should be avoided.
25  Game Development / Newbie & Debugging Questions / Re: Using a .tmx file with a lwjgl game on: 2015-01-04 22:27:06
LWJGL doesn't come with support for loading tiled maps (.tmx), but Slick2D does.
26  Discussions / Miscellaneous Topics / Re: OpenGL or DirectX on: 2015-01-04 16:45:40
One thing to keep in mind, DirectX is for Windows only (and other Microsoft platforms).

OpenGL is supported on a lot more platforms (including Windows). The tech landscape has changed a lot in the last few years, so if you intend to also target growing platforms such as Mac, Linux/SteamOS, Mobile/Tablet (e.g iOS, Android), WebGL, etc OpenGL may be the better and future proof choice.
27  Discussions / General Discussions / Re: Most graphically polished (HD)3D games developed in Java? on: 2014-12-30 15:49:25
well apart from that beautiful game made by one of the members here , Hardland .
IIRC Hardland isn't written in Java but a C++ engine and DirectX.

*basically "Make me Unity 4.5 in Java and you'll get a ton of money" snip*
Challenge accepted.
Good luck with that, Unity3d is developed by a company with 500+ employees and been in development for over 10 years to get to version 4.5 Smiley
28  Discussions / General Discussions / Re: New 'feature': distributed backups (with a little help from my friends) on: 2014-12-30 11:20:56
1.4GB isn't really that much, why not just set the files to automatically sync to a number of free secure cloud service providers, Dropbox, Mega, Google Drive, Spideroak, etc, then once you are nuked, your dead man's switch could send out instructions on how to recover such files.
29  Game Development / Newbie & Debugging Questions / Re: Compute + Geometry Shaders on: 2014-12-29 20:19:49
a pretty good article here about how to use compute shaders for realtime raytracing.
30  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 2.9.2 on: 2014-12-29 19:40:34
@kappa, quick question, I've tried to use LWJGL3 but there seems to be a lot of different stuff... any tutorials?

I tryied to follow the guide on the LWJGL website but it was broken.. at least it didn't work...

Thanks,
Joao Lourenco

Yeh, LWJGL3 is still pretty new so there aren't many tutorials yet. A few of the good ones i've seen include the ones by SHC found here and on the LWJGL3 wiki here. The GLFW3 documentation is also pretty good and simple to follow. The rest should be pretty much the same as LWJGL2 (i.e. just OpenGL, AL and CL).
Pages: [1] 2 3 ... 89
 
Jesse (16 views)
2015-07-29 04:35:27

Riven (37 views)
2015-07-27 16:38:00

Riven (18 views)
2015-07-27 15:35:20

Riven (21 views)
2015-07-27 12:26:13

Riven (12 views)
2015-07-27 12:23:39

BurntPizza (30 views)
2015-07-25 00:14:37

BurntPizza (42 views)
2015-07-24 22:06:39

BurntPizza (24 views)
2015-07-24 06:06:53

NoxInc (31 views)
2015-07-22 22:16:53

NoxInc (18 views)
2015-07-22 22:13:39
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

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

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
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!