Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (701)
Games in Android Showcase (203)
games submitted by our members
Games in WIP (774)
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 ... 15
1  Discussions / Miscellaneous Topics / Re: Humble monthly keys on: 2016-11-11 15:27:37
I remember "Styx: Master of Shadows" looked really neat when it came out. If that's still going I'd love that one please?
2  Discussions / Miscellaneous Topics / Dynamically produce a shatter pattern on: 2016-10-25 16:50:11
So over the past few weeks I've been working a lot on overlaying the shatter pattern you get from something like glass. Example:

Now you can mess around a lot with these types of images to produce nice effects in static imagery but I'd quite like to produce a more dynamic experience where you can see the shatter grow over time - I've experimented with expanding/shrinking the image and clipping it off with expanding circles but you can only do so much particularly with regards to directing the shatter.

With this in mind does anyone know of any material on procedurally generating similar patterns? It strikes me that it is a similar pattern to lighting or spider webs and I have definitely seen this generated.

Any ideas would be greatly appreciated. Thank you
3  Games Center / WIP games, tools & toy projects / Re: Praxis LIVE v2 - hybrid visual IDE for creative coding on: 2016-09-02 17:15:02
Heya,
I'm working on a little project for a play I've got in the works and have a query.

I'm using the built in video:analysis:simple-tracker with a processed input stream like the examples and I'd like to use the blob info it generates and render on the original non-processed input stream but if you don't connect the output of the tracker it seems to just shut off. I presume an optimization because that channel isn't being used for anything. Now at the moment I'm just fading the two with a mix ratio of 99% so you essentially can only see the non-processed channel but just wondering if there is a better solution?

Also simply amazing program. Love it.
4  Discussions / General Discussions / Re: Comparison between 2 IDE's - Netbeans and Eclipse on: 2016-08-28 22:13:45
IDE choice tends to be a pretty subjective thing. Personally I'm so used to Netbeans that I use it for everything whether the IDE is designed for it or not. Plenty of plugins and then you get things like Praxis LIVE built on it which are really impressive.

As for LWJGL 2 vs 3, I'd go for 3 if I were you. You're probably thinking because there are tutorials for LWJGL 2 but frankly LWJGL3 is really simple. It even has a utility for loading natives which gets run automatically. So it's super simple.
5  Java Game APIs & Engines / OpenGL Development / Re: LWJGL instance in Javafx on: 2016-04-29 17:16:21
Take a look at this example: https://github.com/Spasi/LWJGL-FX
6  Java Game APIs & Engines / Engines, Libraries and Tools / Re: WebGL4J - Simple GWT based WebGL wrapper for Java on: 2016-04-09 13:58:13
Much appreciated as ever.

It's a very useful library btw. At first I tried to write in pure JS but then as ever the application got bigger than 3/4 files and JS began to become increasingly untenable so I thought to myself oh no I'm going to have to write the bridge between WebGL and GWT myself and it's going to be messy and horrible and then I remembered you posting about this and, as one of the most important marks of a good library, it just worked. So thank you.
7  Java Game APIs & Engines / Engines, Libraries and Tools / Re: WebGL4J - Simple GWT based WebGL wrapper for Java on: 2016-04-06 20:00:00
Hey @SHC, I found another little bug.

glGetUniformLocation() is supposed to return a "-1" if the uniform doesn't exist in regular OpenGL. Obviously WebGL returns a "null" instead but the WebGLObjectMap maps a null to a zero. I suppose technically not a bug but I'm thinking undesirable behaviour?
8  Java Game APIs & Engines / Engines, Libraries and Tools / Re: WebGL4J - Simple GWT based WebGL wrapper for Java on: 2016-03-30 21:11:00
Ah very good. Knew they existed for the extensions but just never thought to look on the core classes, sorry.
9  Java Game APIs & Engines / Engines, Libraries and Tools / Re: WebGL4J - Simple GWT based WebGL wrapper for Java on: 2016-03-29 14:55:03
Amazing. Thanks so much. One last thing, not a bug this time I promise, a suggestion. I was updating my graphics driver the other day and once it installed it messed around with already open Chrome and long and the short I notice that the default behaviour for your library if it cannot get a WebGL context is to blast you with an alert saying you don't have WebGL which then takes you to the get WebGL website.

A lot of the time this is desirable behaviour but not always. For example WebGL might only be a section of the page and the other stuff is still useful even if the WebGL isn't working in which case it's pretty annoying if you keep getting redirected whenever you tried to load it up. Also redirecting with alerts like that can screw up the back button on some browsers I think (because you can't go back twice since you keep getting redirected). So perhaps A) include a function to test if WebGL is supported (also turns out you can test whether it is the browser not supporting WebGL or the hardware) and B) make the popup behaviour default but optional for the developer?

Anyway here is a quick function I wrote to test for WebGL support:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
/**
 * Returns null is WebGL is supported otherwise a String giving the reason why not.
 */

private static native String isWebGLSupported() /*-{
    var canvas = $doc.createElement("canvas");
    var gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
    if(gl && gl instanceof $wnd.WebGLRenderingContext) {
        return null;
    } else {
        if($wnd.WebGLRenderingContext ) {
            return "Hardware does not support WebGL";
        } else {
            return "Browser does not support WebGL";
        }
    }
}-*/
;

I think there are a few reasons you might not be able to create a WebGL context if the browser supports it but I'm pretty sure I'm getting this from the WebGL spec on MDN so seems fairly legit. Also not 100% on the creating an offscreen canvas and canvas just to test for support but this is apparently the established method according to MDN again. Also if you incorporate this into the actual context creation then it's a non-problem.

Obviously just my penny's worth but what do you think?
10  Games Center / Showcase / Re: Cross Platform MMORPG: Little War Online on: 2016-03-29 14:37:03
Very pretty website but watch out cos there are a few typos. The ones I noticed:

Quote
The mission of the Draxian Paladin is to protect his foes
I presume that should be "protect his allies" unless I'm missing something.

Quote
These voracious spellcasters summon mystical minions to fight beside them and are experts sorcerer's
Should be "expert sorcerers"

Quote
they are the fastest and more agile warriors of the world
"and most agile"

So maybe it is worth a quick once over? Sorry to be picky it's just it really is a very pretty website but stuff like that just spoils things (certainly for me).
11  Java Game APIs & Engines / Engines, Libraries and Tools / Re: WebGL4J - Simple GWT based WebGL wrapper for Java on: 2016-03-27 12:28:28
Thanks very much. I actually just found something else as well.

For glBufferSubData(), it's spec is,
1  
void bufferSubData(enum target, long offset, Object data)

but WebGL4J has a prototype like the desktop GL version with a size parameter: "glBufferSubData(int target, int offset, long size, ArrayBufferView data)" which causes a crash when you try to use it "No function was found that matched the signature provided."
12  Java Game APIs & Engines / Engines, Libraries and Tools / Re: WebGL4J - Simple GWT based WebGL wrapper for Java on: 2016-03-26 19:17:20
Hey @SHC
Just started using WebGL4J (literally few hours ago so might be missing something) but I think you're missing a function.

In WebGL there is a variant of glBufferData() which takes a long for initializing an empty buffer of a certain size.
1  
void bufferData(enum target, long size, enum usage)

That's its definition on the WebGL quick reference card.

Anyway it certainly works for me using WebGL straight from JS but doesn't seem to exist in WebGL4J. Obviously easily worked around but just letting you know.
13  Game Development / Newbie & Debugging Questions / Re: Array Of Sub-Classes on: 2016-03-23 09:57:16

...
Note: this will get you some unchecked warnings
...

Protip: you can cheat Java into letting you create generic arrays without any ugly, unnecessary (from the pov of the programmer) casts or annoying warnings by using a generic, varags method.

1  
2  
3  
public static <T> T[] genericArray(T... arr) {
    return arr;
}


use like this:

1  
2  
3  
4  
public static final Class<? extends GameItem>[] items = genericArray(
    Hammer.class,
    Nail.class
);


Java even infers the generic type when used like this so it's a very clean method. You can even create empty arrays of programmable lengths by using the Array.copyOf method as well:

1  
2  
3  
public static <T> T[] genericArrayEmpty(int n, T... foo) {
    return Arrays.copyOf(foo, n);
}


Where "foo" is a dummy parameter. You can use it like this:

1  
public static final Class<? extends GameItem>[] items2 = genericArrayEmpty(5);


Helps if you're a fan of pretty code.
14  Game Development / Newbie & Debugging Questions / Re: AABB collision detection as a filter for SAT collision detection on: 2016-01-27 10:35:40
This often a very good idea. As @Opiop says definitely benchmark and if there's no need for it, don't bother, but this is called the broadphase collision - with very broad, simple and indefinite collision tests and the narrow phase collision - with exacting collision tests which can be as complex as they need to be.
15  Game Development / Newbie & Debugging Questions / Re: Modern OpenGL & Shaders on: 2016-01-23 16:05:48
Also check out JOML https://github.com/JOML-CI for doing the maths. Don't use it myself but seems to be pretty popular and certainly has all the features you'll be needing. I believe it even has it's own matrix stack implementation.
16  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [libGDX] Is the LibGDX bullet binding standalone? on: 2016-01-12 19:09:13
I never bothered to isolate it because I don't really know the framework well enough but the basics were: whenever you tried to test the collision between a kinematic character controller and a static plane collision shape, a class cast exception was thrown. It's not a showstopping bug because obviously static planes don't appear too much in most games but I just felt it was worth seeing if it was actually necessary to use an old version of the library.
17  Game Development / Newbie & Debugging Questions / Re: [libgdx] trouble understanding orthocam and viewport on: 2016-01-12 10:48:14
So the best way to understand this is by looking at the camera analogy:
Click to Play


So the camera is all of the viewing (putting the camera in place), modeling (putting the objects in place) and projection (choosing the lens). The viewport is developing the picture (putting the image somewhere on the paper, the paper be analogous to the window).

So glViewport() only controls where in the window the stuff is rendered. Do not use it to control what is rendered. For most use cases, you should call glViewport() when the window is resized to make sure that you are rendering to the entire window.

I'm not sure what you mean by "a viewport that would be suitable for any resolution without the bars of glClear color" What bars is glClear presenting? If you mean to control the aspect ratio of a particular resolution, that should be taken care of in the camera.

For zooming, think about the camera analogy. To zoom in with a camera, you can either change the lens or you can move the camera closer. Same for OpenGL, change the projection or the viewing. What you cannot do is zoom by developing the photo differently.

Hope I've answered some questions.
18  Java Game APIs & Engines / Engines, Libraries and Tools / [libGDX] Is the LibGDX bullet binding standalone? on: 2015-12-28 14:20:22
Wondering whether LibGDX Bullet bindings can be used without the rest of LibGDX? This topic in the LWJGL forums http://forum.lwjgl.org/index.php?topic=5409.msg28691#msg28691 (last post, last paragraph) suggest yes but I've just been trying and it seems to depend on the LibGDX math packages which are part of core LibGDX. Am I missing something or has the situation changed or is that just wrong.

I've been using JBullet previously but after encountering a pretty serious bug, I've decided using an older version is just untenable as well as being a bit silly.

Thanks.
19  Java Game APIs & Engines / OpenGL Development / Re: Netbeans GLSL editing mode? on: 2015-12-14 16:09:31
There are plugins but for older versions. For example a syntax highlighter: http://plugins.netbeans.org/plugin/46515/glsl-syntax-highlighter.

But if I were you I'd just edit your shaders in something like Notepad++.
20  Game Development / Newbie & Debugging Questions / Re: Inertia tensor of aggregate mass on: 2015-11-15 12:48:35
Ditto.
It's that one thing which you never need again until suddenly you need it again.
21  Game Development / Newbie & Debugging Questions / Re: Inertia tensor of aggregate mass on: 2015-11-14 11:23:08
What you're looking for is the "Parallel Axis Theorem." It lets you sum various inertias (second moment thereof) and it's quite simple.



Essentially you can shift the second moment of inertia in one direction (let's say the x, y and z axes) to a new reference point. Once all second moments of inertia are all in relation to the same point, they can be summed together.

https://en.wikipedia.org/wiki/Moment_of_inertia#Parallel_axis_theorem (Pretty poor source of info unless you're at a far, far higher level of understanding of mechanics than me but even I was able to get the basics.)
22  Game Development / Newbie & Debugging Questions / Re: 3D Maths and OpenGL -- how and where do I get started? on: 2015-11-13 10:28:10
When it comes to vector maths in the context of game dev, my absolute favourite is http://www.wildbunny.co.uk/blog/vector-maths-a-primer-for-games-programmers/.
23  Discussions / General Discussions / Re: WIP Publication Reel on: 2015-09-25 18:29:04
The publication reel is just this sub-forum. If you want to talk to people about your in development game.
http://www.java-gaming.org/boards/wip-games-tools-toy-projects/78/view.html
24  Game Development / Newbie & Debugging Questions / Re: jBullet compiling issue with JStackAlloc on: 2015-09-11 13:11:47
OK so it just started working. As far as I can tell, the only difference between today and yesterday is

A) My computer and the IDE (NetBeans) have been off and on again.
B) I've used JStackAlloc in another completely separate project.

I can only assume that one of these things have fixed the issue as I haven't touched the original project otherwise.
25  Game Development / Newbie & Debugging Questions / Re: jBullet compiling issue with JStackAlloc on: 2015-09-11 13:07:38
Tested out this theory just now by implementing my own little project testing out JStackAlloc. Took quite some figuring out the build script but managed to get it working allocating Vector3f and my own classes, both final and not. Only wish it could have been that simple.

26  Game Development / Newbie & Debugging Questions / Re: 2D - Smooth lighting with shadows for a tile-based game on: 2015-09-11 12:55:23
You might want to take a look at this tutorial. It isn't quite what you want but I think could easily be adapted. https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows, it isn't the easiest but would probably look the best in the end. (disclaimer: I've never actually implemented anything in this tutorial, just read it a while back out of interest).

If nothing else, give it a read and it'll give you an idea of how shadows are more commonly implemented.
27  Game Development / Newbie & Debugging Questions / jBullet compiling issue with JStackAlloc [SOLVED] on: 2015-09-10 19:59:41
So downloaded latest jBullet (Release 20101010) and I've been trying to get it to compile but I'm stuck on this error:

Quote
java.lang.IllegalStateException: first parameter of Stack.alloc(Class) must be constant (in class com.bulletphysics.collision.dispatch.ConvexConcaveCollisionAlgorithm, method processCollision)

It occurs during JStackAlloc's instrumentation phase of the compile, processing this snippet (I assume, that's the only calls to that method in the named method):
1  
2  
3  
4  
concaveShape.processAllTriangles(
        btConvexTriangleCallback,
        btConvexTriangleCallback.getAabbMin(Stack.alloc(Vector3f.class)),
        btConvexTriangleCallback.getAabbMax(Stack.alloc(Vector3f.class)));


Now it seems to me that the first parameter IS constant and the instrumentation source code is a bit beyond my knowledge so I'm at something of a loss.

Thanks for any help you can give.

EDIT: The problem sort of resolved itself - see the 4th post for detail.
28  Game Development / Newbie & Debugging Questions / Re: Newbie Game Development Starting Point? on: 2015-09-03 16:07:21
Just to let you know, if you want to really start "from the bottom" then you do have to use an external library like LWJGL or JOGL and use OpenGL. That's the core graphics API that Swing is using under the hood.

Not saying you should, just letting you know.
29  Game Development / Newbie & Debugging Questions / Re: [LibGdx/LWJGL] What does this do? on: 2015-08-04 21:30:49
It shouldn't really be being called every frame. You should be reusing buffers, not reinitializing them every frame. I know LibGDX is managing this for you but perhaps you're using the wrong rendering method for this use case. (If you're interested)
30  Game Development / Newbie & Debugging Questions / Re: Simple Stupid Funnel Algorithm on: 2015-07-30 21:06:55
I know the feeling. I try to keep a bookmark to any resource I use for anything longer than half an hour and still I completely lose good resources all the time. Thanks for the link.

If anyone does have a definitive answer to the simplified version however, I'd still like to hear it just for completeness.
Pages: [1] 2 3 ... 15
 
ral0r2 (200 views)
2016-11-23 16:08:26

ClaasJG (340 views)
2016-11-10 17:36:32

CoffeeChemist (434 views)
2016-11-05 00:46:53

jay4842 (485 views)
2016-11-01 19:04:52

theagentd (496 views)
2016-10-24 17:51:53

theagentd (484 views)
2016-10-24 17:50:08

theagentd (442 views)
2016-10-24 17:43:15

CommanderKeith (440 views)
2016-10-22 15:22:05

Roquen (413 views)
2016-10-22 01:57:43

Roquen (304 views)
2016-10-17 12:09:13
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55: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!