Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (725)
Games in Android Showcase (216)
games submitted by our members
Games in WIP (791)
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 ... 91
1  Game Development / Performance Tuning / Re: Pathfinding over too large grid on: 2017-04-27 12:03:44
Maybe grid based pathfinding is the wrong algorithm use in this case.

For large worlds it is better to go for a NavMesh based pathfinding solution (like Starcraft 2), memory usage will be massively lower.
2  Discussions / General Discussions / Re: C++/Java Engine without GC in graphics on: 2017-03-27 11:37:21
The issue of Java's GC overhead has been around for a long time, any stuttering in game is usually automatically blamed on it (even though it might be something else). However recently there was a really interesting draft JEP for adding an option in the JVM to turn it off (i.e. allocation only GC).

This could be particularly interesting option for games as it could be used to test if any lag is being caused by the GC or where your code does not produce any garbage.
3  Game Development / Performance Tuning / Re: Quadtree Efficiency? on: 2017-02-22 10:29:59
Someone posted this article a while back.

Its a very good read for your problem, especially if you are trying to decide whether to use quad trees for collision detection.
4  Java Game APIs & Engines / Engines, Libraries and Tools / Re: LWJGL3 and Android Redux on: 2017-02-17 15:06:35
The main thing would be if it supports the Hotspots JIT on ARM.

There is the OpenJDK 9 Android Port but seems like it only supports the Zero Interpreter on ARM. Not sure if the speed hit will make it unusable but might get round some of ART specific issues raised by Spasi. They also have a similar port to iOS.
5  Java Game APIs & Engines / Engines, Libraries and Tools / Re: LWJGL3 and Android Redux on: 2017-02-17 14:47:23
Licensing wank :/
Ah right, looking at the pricing for the licence, it seems pretty expensive and not worth it for distributing games even if it did work on android.

Zulu Embedded does look nice, but can't find any information about it running on Android.
6  Java Game APIs & Engines / Engines, Libraries and Tools / Re: LWJGL3 and Android Redux on: 2017-02-17 12:20:45
What about OpenJDK (Zulu) on Android?

Cas Smiley
or what about Java SE Embedded, they already have ARM builds, if it can be made to run on Android devices, performance should be much better than ART's.
7  Game Development / Newbie & Debugging Questions / Re: LWJGL2 using LWJGL3's image loading on: 2016-12-21 12:38:43
I'd not bother trying to use two separate and incompatible versions of the same library, why not just drop LWJGL2 and update the project to use LWJGL3?
8  Games Center / WIP games, tools & toy projects / Re: Songs of Syx on: 2016-10-21 11:09:30
here is the output of stdOut.txt

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  
21
Game version : 0.6

SYSTEM INFO
---Running on a: Windows 8.1, amd64 Platform.
---jre: 1.8.0_111
---Processors avalible: 2
---Reserved memory: 1884Mb
---Directory : C:\Users\user\Desktop\syx\res\
---Input Arguments :
---JRE Input Arguments :

Starting the Launcher....

Firing up an engine, v: 0.8

OPEN_GL
---FB stencil Bits: 8
---FB depth Bits: 0
---FB Red Bits: 8
---FB Green Bits: 8
---FB Blue Bits: 8
---FB Alpha Bits: 8
---Version: 3.3.0 - Build 10.18.10.3958
---SL Version: 3.30 - Build 10.18.10.3958
---glRenderer: Intel, Intel(R) HD Graphics

DISPLAY
---dimensions: 960x480, RfrsRate: 75
---LWJGL: 3.0.0 build 90
---GLFW: 3.2.0 Win32 WGL EGL VisualC DLL
---6 supported video modes

class snake2d.GraphicContext was sucessfully destroyed
Core was sucessfully disposed
9  Games Center / WIP games, tools & toy projects / Re: Songs of Syx on: 2016-10-21 10:44:12
actually game works and gets to main menu screen (cool main menu btw) when I plugin in some speakers, so maybe you need to catch any openal exception and then fall back to a no sound mode to allow working in that situation.
10  Games Center / WIP games, tools & toy projects / Re: Songs of Syx on: 2016-10-21 10:41:17
thanks but different error now

1  
2  
3  
4  
5  
6  
7  
8  
java.lang.NullPointerException
   at org.lwjgl.system.Checks.checkPointer(Checks.java:103)
   at org.lwjgl.openal.ALC10.nalcCreateContext(ALC10.java:141)
   at org.lwjgl.openal.ALC10.alcCreateContext(ALC10.java:154)
   at snake2d.SoundCore.<init>(SoundCore.java:76)
   at snake2d.CORE.create(CORE.java:54)
   at launcher.Launcher.start(Launcher.java:28)
   at main.Syx07.main(Syx07.java:31)
11  Games Center / WIP games, tools & toy projects / Re: Songs of Syx on: 2016-10-21 10:04:46
When trying to run I get the following dialog


the debug log contains the following:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
java.lang.NullPointerException: "in" is null!
   at java.nio.channels.Channels.checkNotNull(Unknown Source)
   at java.nio.channels.Channels.newChannel(Unknown Source)
   at snake2d._IconLoader.ioResourceToByteBuffer(_IconLoader.java:85)
   at snake2d._IconLoader.setIcon(_IconLoader.java:33)
   at snake2d.GraphicContext.<init>(GraphicContext.java:147)
   at snake2d.CORE.create(CORE.java:51)
   at launcher.Launcher.start(Launcher.java:28)
   at main.Syx07.main(Syx07.java:31)
java.lang.RuntimeException: problem with icons : C:\Users\mail__000\Documents\syx6\Syx06\res\data\spriteSheets\
   at snake2d._IconLoader.setIcon(_IconLoader.java:38)
   at snake2d.GraphicContext.<init>(GraphicContext.java:147)
   at snake2d.CORE.create(CORE.java:51)
   at launcher.Launcher.start(Launcher.java:28)
   at main.Syx07.main(Syx07.java:31)


In case it helps, there is no "C:\Users\mail__000\" directory on this computer, maybe you've hard coded a path to a file in that location?
12  Discussions / General Discussions / Re: Excelsior JET Standard set free, first beta for Linux/ARM released on: 2016-09-29 14:33:01
Do you have any plan to fill the void left by RoboVM? such as releasing a version that can run applications on Android and iOS?
13  Game Development / Newbie & Debugging Questions / Re: TexturePacker - sprite blip on: 2016-09-18 20:47:34
looks like typical texture bleeding when using a texture atlas, a couple of options you could try to avoid the problem:

- leave a space/margin between different sprites on your texture atlas
- if you can, use GL_NEAREST instead of GL_LINEAR when loading your atlas texture
- handle the issue in your shader so that it doesn't pick up pixels from adjacent textures
14  Game Development / Shared Code / Starting JVM on Mac with -XstartOnFirstThread programmatically on: 2016-08-24 14:05:42
One of the nice features in LWJGL3 is that it comes with the SharedLibraryLoader, this automatically extracts any required natives.

This means you can create single executable fat jars without jumping too many hoops or having to fiddle with natives thus making distribution and running applications a lot easier. This works well on Windows and Linux as the user can just click a jar to start the application (or simply use 'java -jar app.jar' without having to type a long classpath or class name).

However one problem that I ran into was that on Mac you have to specify the "-XstartOnFirstThread" parameter and there is no easy solution to do this automatically with executable jars.

Therefore I've written a small method that basically checks if you are on Mac and if the XstartOnFirstThread option has been enabled, if not, it launches a new JVM and executes the same main method, settings, parameters and with the XstartOnFirstThread option enabled.

The above is difficult to get right and the code belows uses some nice tricks to detect everything, so should be useful for others who also want to use single file executable jars with LWJGL3 on Mac.

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  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
   public static boolean restartJVM() {
     
      String osName = System.getProperty("os.name");
     
      // if not a mac return false
      if (!osName.startsWith("Mac") && !osName.startsWith("Darwin")) {
         return false;
      }
     
      // get current jvm process pid
      String pid = ManagementFactory.getRuntimeMXBean().getName().split("@")[0];
      // get environment variable on whether XstartOnFirstThread is enabled
      String env = System.getenv("JAVA_STARTED_ON_FIRST_THREAD_" + pid);
     
      // if environment variable is "1" then XstartOnFirstThread is enabled
      if (env != null && env.equals("1")) {
         return false;
      }
     
      // restart jvm with -XstartOnFirstThread
      String separator = System.getProperty("file.separator");
      String classpath = System.getProperty("java.class.path");
      String mainClass = System.getenv("JAVA_MAIN_CLASS_" + pid);
      String jvmPath = System.getProperty("java.home") + separator + "bin" + separator + "java";
     
      List<String> inputArguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
     
      ArrayList<String> jvmArgs = new ArrayList<String>();
     
      jvmArgs.add(jvmPath);
      jvmArgs.add("-XstartOnFirstThread");
      jvmArgs.addAll(inputArguments);
      jvmArgs.add("-cp");
      jvmArgs.add(classpath);
      jvmArgs.add(mainClass);
     
      // if you don't need console output, just enable these two lines
      // and delete bits after it. This JVM will then terminate.
      //ProcessBuilder processBuilder = new ProcessBuilder(jvmArgs);
      //processBuilder.start();
     
      try {
         ProcessBuilder processBuilder = new ProcessBuilder(jvmArgs);
         processBuilder.redirectErrorStream(true);
         Process process = processBuilder.start();
         
         InputStream is = process.getInputStream();
         InputStreamReader isr = new InputStreamReader(is);
         BufferedReader br = new BufferedReader(isr);
         String line;
         
         while ((line = br.readLine()) != null) {
            System.out.println(line);
         }
         
         process.waitFor();
      } catch (Exception e) {
         e.printStackTrace();
      }
     
      return true;
   }


To use the above method, you simply put the follow at the start of your main method

1  
2  
3  
4  
5  
6  
public static void main(String[] args) throws Exception {
   if (restartJVM()) {
      return;
   }
   // the rest of your main method
   }


The only downside is that as the new JVM runs in a new process you can't get the console output in the same location without leaving the initial jvm running. If you don't need the output in the same location the the original jvm can just terminate.

With the above you can run executable jars which use LWJGL3 on Mac by simply clicking on them.
15  Java Game APIs & Engines / Engines, Libraries and Tools / Re: LWJGL 3.0.0 released on: 2016-06-03 18:49:55
Congrats on the release and thanks for the years of hard work behind making this happen. GitHub history says the initial commit was December 2012.
16  Game Development / Game Mechanics / Re: Hardware-like software cursor. on: 2016-05-04 09:35:03
This doesn't really help in this case. It's not that the mouse isn't polled often enough; it's that the screen isn't redrawn fast enough. Interpolation won't help if the mouse position only updates 10 times per second.
If the frame drop is that large then I agree with you. However if the application is running that slow then its unlikely the other techniques mentioned above are going to help much and in general the application has serious issues which need to be addressed first.

For smaller frame drops though, mouse interpolation should work well enough.

@kappa
Oh, that sounds pretty interesting Smiley Though not perfect, it may be enough of a compromise. I'll probably give it a try. Do you have any examples of this or is this just idea from top of your head?
It's a technique used in many commerical games and triple A titles (sometimes you can even toggle it on/off in the options), IIRC (not 100% sure) it was also used in Revenge of the Titans (OpenGL game with source code).

I don't have a link to an article setting out the implementation, however the concepts at the end of the fix your game loop articles are pretty similar such as here, here and here.
17  Game Development / Game Mechanics / Re: Hardware-like software cursor. on: 2016-05-03 11:49:17
have you tried implementing mouse smoothing?

Usually done by interpolating the mouse position between either:

1) where the mouse was and where it should be (previous polled position and current polled position)
or
2) where it currently is and by predicting where it will be the next time its polled (current polled position and predicted next position).

Rather than jumping between mouse positions you can move the cursor at a constant speed between mouse positions or draw it at an interpolated position between the two positions at the time the frame is rendered.

This should hide small amounts of lag and give the appearance of smooth movement.
18  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 3 vs JOGL on: 2016-04-28 15:05:32
I still can't actually use it commercially, myself, because GLFW still doesn't have buffered controller input :/

Cas Smiley
Why not just continue using JInput for Controllers with GLFW/LWJGL3? At least until GLFW controller support catches up. If you were using LWJGL2's Controller class, you could probably just continue using that as that was just a wrapper around JInput.
19  Java Game APIs & Engines / OpenGL Development / Re: GLFW now supports switching between windowed and fullscreen on: 2016-03-22 20:47:16
Yup pretty cool feature. It's already part of the LWJGL3 nightly builds. Was probably the last feature LWJGL2's Display had which GLFW was missing.
20  Discussions / General Discussions / Re: Vulkan 1.0 Release on: 2016-03-18 14:33:38
In theory Wayland would be just great. Still some question over mouse/keyboard/touch of course.

Cas Smiley
LibInput seems to be the most commonly used library by Wayland compositors to handle mouse/keyboard/touch. As the backend is still experimental not sure input support has been added yet but should eventually just be as simple as using GLFW's api to handle input.
21  Discussions / General Discussions / Re: Vulkan 1.0 Release on: 2016-03-18 12:33:57
Wouldn't using Wayland (which GLFW3 already supports to an extent) be a possible solution instead of X11 on the Pi? Its alot more lightweight than X11 and won't require using any Pi specific API's.
22  Discussions / General Discussions / Re: Power consumption of desktops vs ARM SOC's such as Odroid-C2 or Rpi3 on: 2016-03-11 17:10:04
One advantage that the RaspberryPI now has over other boards is that it has a driver for running the full desktop OpenGL 2.0 on it (as opposed to just OpenGL ES), should make porting stuff to it much easier.
23  Game Development / Newbie & Debugging Questions / Re: [LWJGL] Attributes and VBO on: 2016-03-02 15:21:20
Oh and I should may be start using LWJGL3, last time I checked it, it did not include any math utils classes for matrices and vectors, I was pissed and thought I should check it later when it would be less brutal!
You should use JOML with LWJGL3 for matrices and vectors. Its unlikely that LWJGL3 will add math util classes of its own.
24  Discussions / General Discussions / Re: Amazon releases "Lumberyard" on: 2016-02-09 20:33:25
From my reading, they haven't written the engine from scratch but just licensed Crytek’s CryEngine. So basically a modified CryEngine thats been re-skinned and a few components that are tailored towards Amazon's online services.
25  Game Development / Game Mechanics / Re: 2D point in polygon algorithm on: 2016-01-24 19:44:13
Thats very cool stuff, a polygon of that complexity is not something i'd have ever considered testing using its edges. An approach such as using bit masks (like Worms) to test such complex shapes might have been easier to implement (also would handle holes). Nonetheless very impressive results.

btw on OS X i get the following error message when running the jar

1  
2  
3  
4  
5  
6  
7  
java -jar polydraw.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.lwjgl.system.MemoryAccess.getPointerSize()I
   at org.lwjgl.system.MemoryAccess.getPointerSize(Native Method)
   at org.lwjgl.system.Pointer.<clinit>(Pointer.java:24)
   at org.lwjgl.glfw.GLFW.<clinit>(GLFW.java:594)
   at org.joml.lwjgl.PolygonDrawer.run(PolygonDrawer.java:51)
   at org.joml.lwjgl.PolygonDrawer.main(PolygonDrawer.java:176)
26  Game Development / Game Mechanics / Re: 2D point in polygon algorithm on: 2016-01-24 18:24:26
In case you cannot/wantnot Smiley build, here is a jar of that: https://www.dropbox.com/s/lqt8xdkmg9euvq5/polydraw.jar?dl=0
Uses LWJGL 3 with OpenGL 1.1 and GLFW and works under Windows, Linux, OS X.
the jar is missing the linux and os x lwjgl3 natives Smiley
27  Discussions / General Discussions / Re: JavaGaming.org app idea on: 2015-12-09 14:05:28
The Java distribution landscape has changed alot and there is no guarantee anymore that computers even have a system JVM installed (let alone applet or java web start support).

Therefore the way to distribute java applications is to bundle it with your own jvm. In which case jvm sandboxing makes little sense (on top of the sandboxing most OS's have for local applications).

Its better to spend time looking at some of the web brower tech's that allow you to run Java applications in the browser (GWT, WebGL, Asm.js, EMScripten, TeaVM, etc) for app's which require sandboxing and need to be mass distributed like applets.
28  Discussions / General Discussions / Re: SMF is falling apart. on: 2015-11-17 07:44:53
the RSS feed has also been down for a while.
29  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-11-06 10:40:54
Wrote a brute force distance field generator for use on fonts.

EDIT:
MY PROFILE IMAGE BROKE Q___Q
Very nice implementation, I see the generated field also makes some adjustments to compensate for lack of sharp corners (which is the usual weakness of distance field fonts). This is different from the algorithm mentioned by Green in the Valve paper, are you using a different algorithm or some custom solution?
30  Java Game APIs & Engines / Engines, Libraries and Tools / Re: WebGL4J - Simple GWT based WebGL wrapper for Java on: 2015-10-22 15:37:06
Not really looked to deeply into WebAL but does look well organised.

Emscripten uses the MIT license so there is no real problem about permission to use.

Writing and maintaining your own OpenAL implementation around Web Audio API would have its advantages (more control, faster fixes, etc) but also disadvantages (more code to maintain, write, test, etc).

I wouldn't worry too much about supporting internet explorer at this point, Microsoft have already put their weight behind Edge and there is not much point in complicating your code base for a browser that's on the decline. Any serious application using the library won't be ready for at least a year or so in which time it'll have declined even more. Besides WebGL support is pretty rubbish on IE anyway so not much use jumping so many hoops to support it. Alternatively if you must support it you could go for a library like SoundManager2 which adds more backends.

Sorry for going off topic, maybe a seperate thread would be a better idea.
Pages: [1] 2 3 ... 91
 
Archive (66 views)
2017-04-27 17:45:51

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

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

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

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

Rule (719 views)
2017-03-19 12:42:17

Rule (723 views)
2017-03-19 12:36:21

theagentd (733 views)
2017-03-16 05:07:07

theagentd (666 views)
2017-03-15 22:37:06

theagentd (507 views)
2017-03-15 22:32:18
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!