Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (555)
Games in Android Showcase (148)
games submitted by our members
Games in WIP (601)
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
1  Games Center / Cube World Projects / Re: Technetium - A realistic voxel game on: 2015-03-02 09:19:51
tech demo / non voxel lookey likey or not I think the second video still visually looks good, so congratulations on that. I look forward to seeing how this pans out in the future.

@Gibbo3771 - I think the point of the WIP is forum is to post "work in progress" games and this is the very start of a work in progress game. All games start of as tech demo like programs because that is how you progressively develop things, they become more game like during the development process as you add features. I think your comment was a little rude, it may not be anything new at the moment but at least give them a chance, they stated a June / July time for an Alpha of the game which gives them plenty of time to add things. It may eventually be just another pile of crap but you are judging it at an early stage.
2  Game Development / Newbie & Debugging Questions / Re: (LibGdx) Controlling an animation on: 2015-03-01 08:38:48
Thanks, it worked perfectly. I can't medal you for some reason sadly.

I appreciated on your behalf Smiley
3  Game Development / Newbie & Debugging Questions / Re: What should i use to develop multiplayer game online in browser ? on: 2015-03-01 08:36:35
have a look at webgl, a selection of engines for you to try can be found here
4  Game Development / Game Mechanics / Re: Making GUIs on: 2015-02-28 07:19:08
Swing as a whole is a light weight framework that is platform independent but at its core it still extends AWT (JComponent extends the AWT container), this is its hook in to the OS to get screen graphics and user interface events of the operating system which it then translates to an OS agnostic set of events for it to use (it therefore manages its own event queue on top of the OS event queue). It also does this translation on its own thread which is why you need those invokeLater commands to run anything on the underlying event queue thread. AWT was born when Java was born and is a very old horrible piece of technology.

JavaFX should fix a lot of the AWT issues, it doesn't run the event processing on its own thread, it instead does this in the same thread that the application is run on (JavaFX Application Thread). It also hooks in to the native OS event queue rather than maintaining its own version of the event queue. JavaFX also has a separate rendering thread (Prism render thread) to the main application thread (which helps you use multi threaded systems better for rendering). Lots of good things in JavaFX but its big disadvantage is it will need a different native build for every OS it runs on and it currently doesn't run on all OS's
5  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-24 14:10:20
No textures are created (texture coordinates change though), but you could be on to something here

I won't take up any more space here, I thought it was something worthy of posting here Smiley turns out it probably isn't and is something subtle somewhere else.
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-24 13:48:24
You are probably right (I hope you are), but just adding this line

currentTime = System.currentTimeMillis();

(currentTime is a private class variable and is a double (doesn't matter if its a long))

To my FPS calculator class increments the loaded class count for DirectByteBuffer

And replacing that line with

currentTime = 1.56;

(ie hard coded)

Stops the loaded class count going up. I'm sure there is something else going on here but it is looking odd at the moment
7  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-24 12:56:00
I learnt that calling






In an FPS calculator all lead to a steady increase in java.nio.DirectByteBuffer objects being created on the heap. Does anyone have any idea on how to stop this happening?
8  Java Game APIs & Engines / Engines, Libraries and Tools / Re: TGA Decoder on: 2015-02-24 10:47:31
What license is it under?

I'd love to include it in Spade. We've had this issue open for a while now.

@HeroesGraveDev I noticed you were using ImageIO in Spade, this library here (not me but I have used it) has some good image plugins for ImageIO and is actively developed. You might find it useful.
9  Discussions / General Discussions / Re: Do you sometimes skip braces? on: 2015-02-13 22:22:19
      for(int count =  0; count < nestAmount; count++)
         for(int dex =  0; dex < nestAmount * 2; dex++)

Much better Smiley There is much happiness in the braces aligning up
10  Discussions / General Discussions / Re: Do you sometimes skip braces? on: 2015-02-13 19:20:57
I always put braces on everything, I'm quite compulsive with this  Grin I find it makes the code more readable because its easier to see where the scope starts and finishes among lots of things. I don't think you lose anything by having them on.

I always put the brace on a new line too, but that's a whole other discussion!
11  Discussions / Miscellaneous Topics / Re: Unit Testing: Waste Of Time? Discuss on: 2015-02-07 22:35:15
TDD = Code a test then build some code to pass that test  (I don't know anyone who does this)
Unit testing (Manual) = You test your own code after you code (Most people do this in some basic form)
Unit testing (automated) = re runnable set of tests you can run, probably done in Junit / JBehave or something similar (more people than TDD but less than unit testing manual probably do this)
12  Discussions / Miscellaneous Topics / Re: Unit Testing: Waste Of Time? Discuss on: 2015-02-07 08:30:11
In principal testing is a great idea but in practise it is quite hard to do to make it really effective

  • You could write tests for every class but you aren't then testing how the application works as a whole
  • Its very hard to create every possible type of input, for a complex system, and to then have something that can test all the possible output. Opengl is a great example of it being very hard to test the output
  • if you don't maintain tests, they can very easily get out of date
  • The effort vs reward ratio is very biased towards effort

Where I work every agrees test cases are a good thing but in practise non are actually written
13  Game Development / Newbie & Debugging Questions / Re: How would you simplify a nested for loop? on: 2015-02-03 07:01:54
But tinfoilboy did specify performance

I'm wondering how you would simplify a nested for loop for better performance

On the benchmark point you are kind of correct but the results do show that the single loop was more expensive which was the point I was trying to make.
14  Game Development / Newbie & Debugging Questions / Re: How would you simplify a nested for loop? on: 2015-02-03 06:05:18
Not sure how you define "simpler," but since x and y are integers:

for (int i = 0; i < width * height; i++) {
    makeTile(i % width, i / width);

This transformation is occasionally useful.
It's simply the inverse of
index = x + y * width
which you may have seen turn up in a few places.

Is this actually going to be any quicker? You have now added a mod operation and a division operation for every i. My mind says it will be slower

I ran a quick test to prove it

public class Speed
    private static int counter = 0;
    public static void main(String[] args)
        int width = 800;
        int height = 600;
        long a = System.nanoTime();
        for (int i = 0; i < width * height; i++)
            makeTile(i % width, i / width);
        long b = System.nanoTime();
        for (int y = 0; y < height; y++)
            for (int x = 0; x < width; x++)
                makeTile(x, y);

        long c = System.nanoTime();
        for (int i = 0; i < width * height; i++)
            makeTile(i % width, i / width);
        long d = System.nanoTime();
        for (int y = 0; y < height; y++)
            for (int x = 0; x < width; x++)
                makeTile(x, y);
        long e = System.nanoTime();
        System.out.println("Single : " + (b-a));
        System.out.println("Double : " + (c-b));
        System.out.println("Single2 : " + (d-c));
        System.out.println("Double2 : " + (e-d));
    public static void makeTile(int x,int y)

Output :

Single : 6771960
Double : 1434076
Single2 : 4413039
Double2 : 1309231

Note I ran both tests twice to avoid any optimisations the compiler does on the first run, the times also vary on every run but they all show the same picture
15  Game Development / Newbie & Debugging Questions / Re: LWJGL VBO Texture not being displayed - Unsolved on: 2015-02-01 18:20:09
Double check the texture id that vboTexture.bind(); binds to is a valid number (if it isn't you probably haven't got a valid texture bound)

16  Game Development / Newbie & Debugging Questions / Re: Textbook for Java NIO Networking. on: 2015-01-31 17:03:19
I'm curios to find out more about why you think its buggy? For file base operations i have found it to be pretty stable, one of the benefits it that it allows you to have direct allocation buffers.
17  Discussions / Miscellaneous Topics / Re: Laptop hardware on: 2015-01-31 16:52:33
Clevo lapops and the reseller branded versions are normally pretty good. The link below shows a variety including the 15.6 you were looking at.

If you are feeling very adventurous you can install a custom bios on these

Which allows you to configure things quite a bit
18  Discussions / General Discussions / Re: Anyone with knowledge on Cygwin? (+Shogun) on: 2015-01-30 05:45:46
The ones you have listed are basically adding values, if you want to be thorough use this at the beginning


Any previous settings won't be lost

${CMAKE_CXX_FLAGS}" just adds the previous value of CMAKE_CXX_FLAGS to the end of what you want to add.
19  Game Development / Newbie & Debugging Questions / Re: Starting to develop games. on: 2015-01-25 17:53:32
If you are interested in making games and only games then grab an existing game engine / library and go make a game, there are quite a few around which are good and these have some good tutorials and intros. Lots of people on this forum will help you out with the many questions.

If you are interested in making games but would like to like to eventually make an engine or library then make a game using an existing library and learn how the engine is structured to get an idea of how to do it yourself, the alternative is to make them both together but this will be much harder because there will be a lot of trial and error (a lot will be an understatement).

If you want to make an engine / library you should understand it will probably be a personal project which little or no other people will use and that it will also take a long time. Your engine will also be in the quality range of very bad to very good and most likely near the bad end, this is just because the task is a big one and a hard one.

Me personally, I have always had a life long ambition to make a game (3D RPG) and because of who I am I like to learn all the bits that go in to making the game so I am also making an engine at the same time. Its a really fun project but I know it will take a very very long time but I am ok with that. And I also understand that little or no people will ever see it or use it, again I am ok  with this. Some people would say its a colossal waste of time but to me it isn't Smiley

20  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-21 22:11:35
the Game.jar loads the Test.png like this:
new File("./Test.png");

the current directory is the directory from where java was launched from. If it can't find it then you didn't execute your jar in the same directory as Test.png

To run a totally separate process in java is tricky because there isn't a platform independent way to do it. For windows you can force it by maybe doing cmd /c

Runtime.getRuntime().exec("cmd /c start java -jar ./Game/Game.jar");

You are probably ok on linux / mac osx but if not you could use nohup.
21  Game Development / Newbie & Debugging Questions / Re: LWJGL Lighting Bug on: 2015-01-15 21:24:04
Looks like the shader definitely expects a normal to work properly.

To calculate the normals of a triangle (which your landscape will lots of), use the below which is quoted from

"The cross product of two sides of the triangle equals the surface normal. So, if V = P2 - P1 and W = P3 - P1, and N is the surface normal, then:

22  Game Development / Newbie & Debugging Questions / Re: Up Vector calculation for matrices on: 2015-01-13 07:02:37
if you start in a known position, then just rotate this matrix in a similar way to how your camera rotates the world and it should automatically give you all vectors
23  Java Game APIs & Engines / OpenGL Development / Re: modern OpenGL discussion on: 2015-01-08 06:48:37
Have a look at this JGO tutorial which Riven provided

In this tutorial you will see draw methods showing intermediate mode, VA, VBO (a few variations), you will also notice that no shaders are used here so shaders aren't mandatory in this setup.

In this setup you are still using the fixed pipeline design but you are changing the way the GPU is fed the vertex data. Shaders are part of the programmable pipe line design of opengl and you can again choose which method you want to feed the data to the GPU, you can use VA and VBO (not intermediate mode) with shaders, the only difference is how you do you draw call, VA's will pass the data to the GPU every frame and VBO's will just pass a reference to data that is already on the GPU every frame
24  Java Game APIs & Engines / OpenGL Development / Re: [LWJGL] Cant Figure Out How To Do Frustum Culling on: 2015-01-07 07:14:12
I know you already have your answer but here is a good tutorial series on frustrum culling and the various collision algorithms

A good read to find out what your culling algorithm and frustrum shape creation code is doing
25  Game Development / Newbie & Debugging Questions / Re: [LWJGL] So, are there any (up to date) UI libraries? I can't find them. on: 2014-12-30 09:03:23
For TWL, have a chat to MatthiasM in the LWJGL irc channel, he is normally very helpful.

There are quite a few libraries around which give you ui functionality, check out the LWJGL wiki page - "Game Engines and Libraries Using LWJGL". I'd normally post a link but I am typing on my phone at the moment.

Its also quite fun creating one yourself (I have done this) but it is not easy nor quick.
26  Game Development / Newbie & Debugging Questions / Re: Compute + Geometry Shaders on: 2014-12-30 06:10:55
I use a Geometry Shader to implement a particle emitter, you pass in the center points of each particle and it outputs quads which always face the camera.

That is valid use case but there are plenty better ways to do it.

I'm currently sticking to opengl 3.3 so I can't use a lot of those directx techniques in opengl because they don't exist in 3.3

Have you considered using point sprites for that?

I haven't. they look interesting. I will give them a try. the 64 size limit shouldn't be a problem. Thanks for the heads up

p.s. How do you quote a specific person? My quotes just say quote!
27  Discussions / Miscellaneous Topics / Re: What I am up to on: 2014-12-29 22:33:03
Maybe you need a truncated icosahedron, wikipedia has the general set of coordinates for the points you might be able to use in your pre computed set

This shape is the shape they make footballs (soccer) in.
28  Game Development / Newbie & Debugging Questions / Re: Compute + Geometry Shaders on: 2014-12-29 22:15:05
I use a Geometry Shader to implement a particle emitter, you pass in the center points of each particle and it outputs quads which always face the camera.
29  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [GLFW] keyboard layout on: 2014-12-29 22:09:11
Fix should be out in GLFW 3.1

I believe there are other "nice" things in 3.1 so when it is released I suspect LWJGL3 will be quick to pick it up
30  Game Development / Newbie & Debugging Questions / Re: OpenGL Color Blending on: 2014-12-29 21:51:02
What order do you draw your objects on to the screen? I suspect you have an issue here
Depending on the order you draw things in the source and destination colors will be different"

I render all of the tiles on the map, then the entities. But I don't see why this should make a difference.

Have a look at, you will see what I mean by the order of things. The blend function you have is order dependant. Which order do you draw your grey / green and blue tiles?
Pages: [1] 2
BurntPizza (31 views)
2015-02-27 06:09:35

BurntPizza (23 views)
2015-02-27 05:56:17

Riven (16 views)
2015-02-27 02:34:15

Riven (22 views)
2015-02-27 01:47:26

Riven (21 views)
2015-02-27 01:46:04

BurntPizza (17 views)
2015-02-27 00:52:04

BurntPizza (19 views)
2015-02-27 00:50:29

Riven (38 views)
2015-02-26 23:38:45

Riven (15 views)
2015-02-26 23:37:24

BurntPizza (33 views)
2015-02-26 21:13:04
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

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