Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
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 ... 88
1  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-12-21 20:25:41
Also, I'm starting to write my LWJGL Tutorial Series with LWJGL3.
Oh nice write up. Just a minor correction GLFW is a C library (not C++) and Disruptor is no longer a required dependancy and the jar will be removed from the package soon.
2  Java Game APIs & Engines / OpenGL Development / Re: Lwjgl Error: Failed to load the native library: lwjgl on: 2014-12-19 17:35:51
Looking at the code you posted there doesn't seem to be any declaration of it being the core package which could be why you are getting that error.

Also one cool thing with LWJGL3 is that you do not need to point to the exact folder containing the system specific natives (in org.lwjgl.librarypath or java.library.path), you can just point to the LWJGL natives folder and it will automatically pick up the relevant natives from the linux, window, mac sub folders. Pretty useful when using the same workspace across different platforms as you do not need to change the native path once set.

@SilverTiger should also reduce your code to
1  
2  
3  
4  
5  
if (System.getProperty("org.lwjgl.librarypath") == null) {
    Path path = Paths.get("native");
    String librarypath = path.toAbsolutePath().toString();
    System.setProperty("org.lwjgl.librarypath", librarypath);
}
3  Java Game APIs & Engines / Java Sound & OpenAL / Re: Does any1 know any good LWJGL3 OpenAL library? on: 2014-12-16 19:43:22
Here's my OpenAL stuff for LWJGL 2, not sure what it would take to make it work with 3.
https://github.com/libgdx/libgdx/tree/master/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/audio
I've been working on a LWJGL2 compatibility layer which runs on LWJGL3 (allows running LWJGL2 apps with very little source code changes). I did attempt to use it to port LibGDX to LWJGL3 (the audio part should work), however ran into a problem as LibGDX's LwjglApplication class seems to want to run LWJGL on a secondary thread which didn't sit well with GLFW. Ended up giving up after that point, did however get jMonkeyEngine3 working with it Smiley.
4  Java Game APIs & Engines / Java Sound & OpenAL / Re: Does any1 know any good LWJGL3 OpenAL library? on: 2014-12-16 10:58:35
I usually use Paul's Code Sound System but recently I have found a few problems:
- doesn't work with LWJGL3
If you like, you can use Paul's Code Sound System with LWJGL3. Ported it while working on a compatibility layer for LWJGL3. The LWJGL3 OpenAL library plug-in can be downloaded from here.
5  Discussions / Miscellaneous Topics / Re: Building a new PC on: 2014-11-30 11:56:25
I'd also seriously consider a SSD instead of (or in addition to) a HDD. The performance boost is well worth the compromise in hard disk space.
6  Games Center / WIP games, tools & toy projects / Re: Paint.JAVA - Attempt at cloning Paint.NET (with cross-platform support) on: 2014-11-26 15:52:57
Also for more consistency, stick with using either Color or Colour, above screenshot uses both types Smiley
7  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 3; how's it getting along? on: 2014-11-19 15:08:07
1  
ByteBuffer dataBuffer = GL11.glMapBufferARB(GL_ARRAY_BUFFER_ARB, ARBBufferObject.GL_WRITE_ONLY_ARB, (9 + 9) << 2, null);

Which just required ARBBufferObject.GL_WRITE_ONLY_ARB to be replaced with ARBVertexBufferObject.GL_WRITE_ONLY_ARB .
Now ofcourse somebody in the upper echelon has to decide whether my tutorial should be changed, or LWJGL needs a thorough redesign... Kiss
Considering that 90%+ of OpenGL drivers out there have a version of OpenGL 2.0+ or greater, best thing would be to just update those two bits of the tutorial to use the following two calls instead.
1  
2  
GL15.GL_ARRAY_BUFFER
GL15.GL_WRITE_ONLY

and replacing other corresponding methods by removing the ARB bit and adding GL15 before them.

Plus IMO there is not much point in learning OpenGL using such old OpenGL calls or on a system that doesn't support at least a basic requirement of OpenGL2+.
8  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 3; how's it getting along? on: 2014-11-14 11:03:25
for Android and iOS support, LWJGL could always write a LibGDX backend Smiley
9  Games Center / WIP games, tools & toy projects / Re: Legends of Fore on: 2014-11-10 10:41:45
This is crap
Not very nice or helpful to just state a game is crap, a better response would have been to state why you think its crap and what, if anything, you think can be done to improve/fix the game.
10  Discussions / General Discussions / Re: How to make an experience, not a game. on: 2014-10-24 13:30:35
Papers, Please IMO is a pretty good example of how you can deliver a pretty good experience through a game without being too heavily focused on gameplay mechanics.
11  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles > GREENLIT + FUNDED!!!! WOooOOOoooOooOoo! < on: 2014-10-10 19:59:23
congrats on hitting the kickstarter goal, still a whole 16 days left, good luck with the stretch goals Smiley
12  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-10-10 11:08:48
nice update, still think that XML is way too verbose (unless you have a gui tool to auto-generate it or something), if you are rewriting might be a good chance to look at JSON, YAML or Google Protocol Buffers.
13  Discussions / Miscellaneous Topics / Re: Who's using RoboVM? on: 2014-10-09 16:42:26
Is LibGDX GWT output not working for you?

Kev
As it stands, getting anything working in GWT requires jumping way too many hoops. GWT uses Java source code (as opposed to java bytecode) which removes a lot of flexibility when using pre-compiled third party libraries. From my limited testing CPU performance is also pretty crappy for anything mildly taxing.

Further there is a whole tool chain of C/C++ libraries and engines being ported using Emscripten but using them through GWT requires glue code which is another pain, a project like RoboVM could potentially allow one set of JNI code to be used for both native applications and web application which use those same libraries.

While the LibGDX folk have done really well to overcome some of these problems and made life easier for developers in the long run the GWT backend is still probably a pain to maintain and a such a tool could make it easier.
14  Discussions / Miscellaneous Topics / Re: Who's using RoboVM? on: 2014-10-09 11:57:03
Other platforms would definitely be cool. Especially would love to see a solid solution for Java on the web. As plugins are no longer cool, maybe something like RoboVM -> Emscripten/Asm.js. The web may also be the most lucrative in terms of the RoboVM business model.
15  Games Center / WIP games, tools & toy projects / Re: Red Game 2D Engine tech demo on: 2014-09-30 11:40:12
I have an idea of how to fix it but sadly I'm going away tomorrow...
You will have to wait till next week (i might put it in a fresh topic)...
You are using a FileInputStream to try read the file "img\icon\icon-large.png" from inside the jar. This won't work as its technically not a file but a file inside another file (you probably have it extracted locally on your computer hence why its working there).

Use something like getResourceAsStream instead, plenty of tutorial online on how to load resources from inside a jar.
16  Games Center / WIP games, tools & toy projects / Re: Red Game 2D Engine tech demo on: 2014-09-30 09:32:23
Gets further in the start up process but fails with the following error now:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
java -jar faster.jar

java.io.FileNotFoundException: img\icon\i
con.png (The system cannot find the path specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at rg.utils.ImageUtils.loadImage(ImageUtils.java:56)
        at rg.core.World.setIcon(World.java:220)
        at Main.main(Main.java:21)
java.io.FileNotFoundException: img\icon\icon-large.png (The system cannot find t
he path specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at rg.utils.ImageUtils.loadImage(ImageUtils.java:56)
        at rg.core.World.setIcon(World.java:222)
        at Main.main(Main.java:21)
Exception in thread "main" java.lang.NullPointerException
        at rg.utils.ImageUtils.resizeImage(ImageUtils.java:73)
        at rg.core.World.setIcon(World.java:227)
        at Main.main(Main.java:21)
17  Games Center / WIP games, tools & toy projects / Re: Red Game 2D Engine tech demo on: 2014-09-29 09:59:57
getting the error "Could not launch game. See console for details."



18  Discussions / General Discussions / Re: Website Content Management on: 2014-09-22 10:17:50
IMO Wordpress or Drupal are probably the quickest, most flexible and future proof ways to go.
19  Game Development / Newbie & Debugging Questions / Re: Get points of rotated rectangle? on: 2014-09-20 14:51:25
Its not really clear from Op's post whether he is using Java2D, another library or if he's implementing his own 2d renderer, therefore I suggested a generic answer rather than pointing him to a specific API like AffineTransform.
20  Game Development / Newbie & Debugging Questions / Re: Get points of rotated rectangle? on: 2014-09-19 17:06:50
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
   public float[] rotateAroundCenter(float x, float y, float angle){
      float dx = x - cx;
      float dy = y - cy;
      float distance = (float) Math.sqrt(dx * dx + dy * dy);
      float originalAngle = getAngle(cx, cy, x, y);
      float newangle = originalAngle + angle;
      float ndx = distance * (float)Math.sin(newangle);
      float ndy = distance * (float)Math.cos(newangle);
      float nx = cx + ndx;
      float ny = cy + ndy;
      return new float[]{nx, ny};
   }

}

Room for some optimisation in your rotateAroundCenter() method by avoiding the expensive Math.sqrt() call, see method in my previous post.
21  Game Development / Newbie & Debugging Questions / Re: Get points of rotated rectangle? on: 2014-09-19 16:41:36
Slightly shorter answer, if you would like to rotate a point around the origin (x = 0, y = 0) using degrees, you could use code like the following:

1  
2  
3  
4  
5  
float sin = (float)Math.sin(Math.toRadians(angle));
float cos = (float)Math.cos(Math.toRadians(angle));

float rotatedX = x * cos - y * sin;
float rotatedY = x * sin + y * cos;


e.g. if the rectangle had a width and height of 10 and the centre of the rectangle is the origin (0, 0). Then the x, y values for top white point would be (0, -5), bottom (0, 5), left (-5, 0) and right (5, 0). Set angle as the rotation in degrees and rotatedX and rotatedY will give you the rotated result.
22  Discussions / General Discussions / Re: Java 8 Default Methods and Multiple Inheritance on: 2014-09-17 11:21:06
An interface still can have no kind of member state, so using them as traits is not as straight forward as you might think.
Came across this article, which describes a possible implementation for Mixins and how to workaround this limitation.
23  Discussions / General Discussions / Java 8 Default Methods and Multiple Inheritance on: 2014-09-15 13:30:29
As most of you are probably aware 'default interface methods' was one of the new features introduced in Java 8. The stated purpose of such a feature seems to be to allow extending existing interfaces without breaking backward compatibility.

However since its now part of the core language I've been thinking that such a feature could potentially be pretty useful for other use cases such as implementing a clean and lightweight entity component systems (such as those described by Adam Martin).

You could for example have code like the following:

1  
2  
3  
public class Ship implements Logic, Render, Collision {
...
}


You would just implement the interfaces/components each class/entity would need. You then only need to override a few default methods as needed and the bulk of code can be contained in the interfaces/components. Using Java's 'instanceof' you can easily tell which class implements which types of interfaces/components.

As far as I can tell, this type of usage would potentially allows faster, smaller, cleaner and more flexible code for these types of use cases. However many articles recommend against such usage and consider it an abuse of the feature.

Not really found any detailed discussion on the topic, so wanted to get some opinions on such usage or if others have been using default methods in a similar way?
24  Discussions / General Discussions / Re: Microsoft to buy Mojang for $2 billion? on: 2014-09-10 06:40:45
The bean-counter in my head can't come up with an equation where 2b makes sense.  There'd need to be some secret plan to make more than that back that isn't insane wishful thinking.  While it's true that some web calendar thing sold for a couple hundred mill in the 90s....but that was the 90s when everything tech was nuts.
Do keep in mind that there is a Minecraft movie in the works and its being written by the people that did the Lego movie (which was really well done and has made over $1/2 billion on a budget of just $60m).

Add in media franchising (toys, lunch boxes, books, etc) which can make more money then the movie if done right. Further add in a Minecraft game sequel (possibly even a movie sequel or two) and the benefits to the XBOX brand for having an exclusive like Minecraft. Then its not too far fetched for a company like Microsoft to make its $2 billion back.
25  Games Center / Featured Games / Re: Altitude on: 2014-09-08 21:44:55
Just noticed that this game is now free to play on Steam, Windows, Mac and Linux link.
26  Games Center / Cube World Projects / Re: Open source cube world projects on: 2014-09-08 10:21:47
Terasology is a nice open source clone.

If you are looking to learn then the best way would be to start from scratch rather than learning from an already complex code base. Learn to draw a simple opengl textured cube. Thereafter its mostly just about implementing voxel optimisations to allow you to draw lots of them. There are plenty of tutorials covering such techniques.
27  Discussions / General Discussions / Re: String deduplication coming in Java8U20 in the G1 GC on: 2014-09-03 10:19:07
So far I've not seen any convincing arguments in favour of the G1 garbage collector being that much better than the default CMS collector for real time games (in fact some here have mentioned that CMS is still better).

It seems a lot of these optimisations are aimed at server side applications rather than real world desktop applications.
28  Game Development / Newbie & Debugging Questions / Re: Take shortest rotation on: 2014-09-03 09:35:39
If working with angles in degrees, I usually use the code below for this problem.

1  
2  
3  
4  
public static boolean rotateCounterClockwise(float currentAngle, float targetAngle) {
      float diff = (currentAngle - targetAngle) % 360;
      return diff > 0 ? diff < 180 : diff < -180;
}


Simply put in the current angle and the target angle you want to face, and it will return the direction which is shortest i.e. true if you should rotate counter clockwise or false if you should rotate clockwise.
29  Discussions / General Discussions / Re: dart on: 2014-08-28 09:31:25
The idea is that a stricter language than javascript could allow for better compiler optimization. Though I doubt Dart itself will become huge, I could see another language, or some changes to Javascript (a 'use strict' type mode) coming out of the idea of Dart.
asm.js is practically that, this strict subset of javascript is already optimised by browsers like firefox and chrome. Reports state that it already runs at about half the speed of native code.

Its been hugely popular (along with Emscripten) as the tech used to port some of the big C/C++ game engines (unreal, unity, etc) to html5/webgl.
30  Game Development / Newbie & Debugging Questions / Re: Slick2D&LWJGL Font Rendering on: 2014-08-24 11:16:28
If i was to guess, i'd say you are disabling textures before drawing the slick text, try enable them using glEnable(GL_TEXTURE_2D); before you draw.
Pages: [1] 2 3 ... 88
 

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

The first screenshot will be displayed as a thumbnail.

rwatson462 (36 views)
2014-12-15 09:26:44

Mr.CodeIt (29 views)
2014-12-14 19:50:38

BurntPizza (61 views)
2014-12-09 22:41:13

BurntPizza (98 views)
2014-12-08 04:46:31

JscottyBieshaar (58 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (76 views)
2014-11-29 21:32:03

toopeicgaming1999 (136 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36

toopeicgaming1999 (37 views)
2014-11-26 15:20:08
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

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
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!