Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (527)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (594)
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  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
2  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+.
3  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
4  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.
5  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.
6  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
7  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.
8  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.
9  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.
10  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.
11  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)
12  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."



13  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.
14  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.
15  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.
16  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.
17  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.
18  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?
19  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.
20  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.
21  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.
22  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.
23  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.
24  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.
25  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.
26  Game Development / Newbie & Debugging Questions / Re: Struggling to get going with 3D libraries + JavaFX on: 2014-08-21 09:48:37
Another option you could consider is using one of the many GUI libraries that work inside OpenGL, some good options include TWL and LibGDX's Scene2D UI.

I know some people prefer native frameworks rather than a GUI running inside OpenGL, but in the long run you get a lot more flexibility, better integration with OpenGL and doesn't break the atmosphere of your game (probably why all AAA titles use in game GUI's).

Integrating OpenGL with GUI frameworks which and not designed for such integration (Swing, AWT, JavaFX, etc), especially if they themselves have their own OpenGL backends or hardware accelerated paths is always problematic and you'll have to jump through various hoops to get it to work properly (if at all).
27  Discussions / Miscellaneous Topics / Re: A rant on OpenGL's future on: 2014-08-14 20:11:12
interestingly see this news story: AMD Offers Mantle For OpenGL-Next
28  Discussions / Miscellaneous Topics / Re: A rant on OpenGL's future on: 2014-08-11 17:08:08
a ground up rewrite for OpenGL sounds great (and long overdue) and they seem to have ticked all the right boxes, however judging by the description of how they intend to work with so many parties and being aimed at mobile, desktop and console platforms (and probably the web), I'm guessing it'll be a couple of years before they get anywhere (e.g. html5).
29  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-08-05 20:35:24
Started animating some sprites:
Cheers,

Kev
Really nice work, your art is definitely getting really good, that last animation has a nice 3d looking effect on that spear movement.
30  Game Development / Newbie & Debugging Questions / Re: Should I move to LWJGL on: 2014-08-04 11:54:51
I'd also recommend you stick with LibGDX, not liking the starter LibGDX classes isn't a  very good reason to switch (you could always wrap them with your own API).

With LWJGL you'll have to write your own starter classes and rewrite much of the utility code that LibGDX already provides (which is time you could probably better spend on a game). In any event switching could be a fun learning exercise if you enjoy writing engine/library code rather than actual game code.
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.

PocketCrafter7 (14 views)
2014-11-28 16:25:35

PocketCrafter7 (10 views)
2014-11-28 16:25:09

PocketCrafter7 (10 views)
2014-11-28 16:24:29

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

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

toopeicgaming1999 (17 views)
2014-11-26 15:20:08

SHC (30 views)
2014-11-25 12:00:59

SHC (28 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (28 views)
2014-11-24 19:59:16
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

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