Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (683)
Games in Android Showcase (196)
games submitted by our members
Games in WIP (751)
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 ... 74
1  Game Development / Newbie & Debugging Questions / Re: Proper OOP solution on: 2016-07-25 21:37:07
In your castSkill() (or whatever you call it) function you can pass the grid as an argument.

But sticking to a pattern 'just because' isn't a good way to code. Pick the right techniques for the job. Usually the simplest code is the best.
2  Game Development / Newbie & Debugging Questions / Re: JavaFX OBJ parser transparency issue on: 2016-07-21 09:57:26
Looks like there's no depth buffer. When you're creating the Scene I think you need to specify that you need a depth buffer (it probably isn't enabled by default).
3  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JGLOOm - Loading Every File Format for Every OpenGL Lib* on: 2016-07-17 05:53:20
Why is there no support for XM files?

I think you know the answer to that question, even if you don't want to admit it.
4  Discussions / Miscellaneous Topics / Re: MP3 Specification on: 2016-07-06 08:46:07
It's great that you know these formats. You know, companies pay big money for new programs because not everyone knows specifications of file formats. The more you know, the more you are worth. I've seen a local posting on craigslist looking to pay serious $$$ for adding support for some formats a couple years ago to their program.

I knew MP3 was an extension was relevant to MPEG  Pointing

Since you know basic level formats I would just be worried about getting that data to be rastered into OpenAL or whatever.

Er... not everyone needs to know the specification of formats. Any codec that becomes popular nowadays does so by having good encoder/decoder support for popular languages, as well as proper documentation and specification. MP3 would never have caught on had it been created today. All you need to know now is how to find the encoding/decoig library and use it.

The main problem with using MP3 is that it's caught up in patents. And to be honest, it isn't a particularly good format anyway. Better to use an open and non-patent-encumbered format and just convert everything to that.
5  Discussions / Business and Project Management Discussions / Re: How to package game files on: 2016-07-06 08:12:00
When people use LWJGL, they have a hard time distributing it. I've instructed countless beginners over at ThinMatrix's youtube channel how to do this because he doesn't have a video yet. So just remember to check your jar's META-INF. This is a bit shakey when your are looking to do it the way HeroesGraveDev evidently does because of how URLClassLoader works. But if you know what ur doing its just another task Smiley

There's no need to mess around with META-INF or URLClassLoader to do the loading.

It's literally 1 line of code:
InputStream input = SomeClass.class.getResource("/path/from/jar/root/file.png");

Packaging LWJGL natives is an entirely different issue, and doing that manually isn't a good idea. There are plenty of tools that will create 'fat JARs' for you and do it the right way.
6  Discussions / Business and Project Management Discussions / Re: How to package game files on: 2016-07-05 03:14:05
There's not really that much point.
Even in cases of standalone executables, the assets are still in there, and it is usually trivial to extract them.

And even if you come up with the most secure and obscure storage system in the world, the code for loading the assets into a usable form is contained right in the executable anyway, and can easily be manipulated to 'decode' the resources.

However, if you're just looking to do this for convenience reasons, in Eclipse you create a new source folder and store the assets there. Then you just adjust your code to load assets from within the jar (using ClassLoaders) instead of outside the jar using Files.
7  Game Development / Newbie & Debugging Questions / Re: Fast color manipulation on: 2016-07-04 21:31:31
Please keep in mind that x/255 is not the same as x >> 8, and that the latter will not give correct results all the time (in fact, it's impossible to get the maximum value of 255).
How bad could the results be? The graphics still look fine to me

Each time you pass the image data through the operation, each component will decrease by 1. So if you pass it through 255 times, the entire image will be black.

As long as you're not storing the output anywhere and reusing it, you are probably fine (your colour range will be reduced to 0-254).
8  Game Development / Newbie & Debugging Questions / Re: Fast color manipulation on: 2016-07-04 20:13:25
Please keep in mind that x/255 is not the same as x >> 8, and that the latter will not give correct results all the time (in fact, it's impossible to get the maximum value of 255).
9  Game Development / Newbie & Debugging Questions / Re: Fast color manipulation on: 2016-07-04 06:40:13
First thing to do is get rid of the floating point math.

int r = (t >> 16 & 0xFF) * c[0] / 255;
int g = (t >> 8 & 0xFF) * c[1] / 255;
int b = (t & 0xFF) * c[2] / 255;

If the images are sufficiently large enough (I have no idea how large 'large' is and it could be too high for practical purposes), you could split the image up for a number of threads to do the work concurrently (make sure each thread has a contiguous section of the image's backing array to avoid cache issues).

Other options would be using JNI to run the algorithm in native code, where you can take advantage of things like SIMD.
10  Game Development / Shared Code / Re: XM File Formats on: 2016-07-03 23:56:28
You guys are just mad because I have a good file format that you didn't think of.

Hahahahaha. @Longor1996 beat you by almost 3 years, and he used this unoriginal format for a legitimate purpose, rather than advertising it as better than PNG.

Please just quit the arrogance. You're only making yourself look bad.
11  Game Development / Shared Code / Re: XM File Formats on: 2016-07-03 02:41:46
You guys have to chill. He's working on a cool project that he obviously enjoys. No point in telling him nobody will ever use it, he's enjoying coding something. That should be enough for you guys.
It's like saying "Hey, don't show me or continue that art project! Nobody will ever buy it, geez." Who cares? If you don't care about the project don't post on it.

The advice that doesn't say that is great though. CoDi^r's response was great.

I don't think that Hydroque should neccessarily discontinue the project. I'm just saying that if you've posted 5 times in a row and nobody's responded, then maybe these forums aren't the right place to discuss the project. And even in the situations where you're not getting responses but people seem interested, there are proper ways to go about bypassing that limit (message a mod, or find someone who's interested and ask them to comment). Creating a new thread to continue the WIP-spamming is somewhat rude.
12  Games Center / WIP games, tools & toy projects / Re: Dodger Dog on: 2016-07-03 02:34:35
The art looks like it could do with some more consistency. Either do the whole thing in programmer art or the whole thing with proper sprites. Mixing and matching doesn't look that great.
13  Game Development / Shared Code / Re: XM File Formats on: 2016-07-01 23:32:37
The consecutive post limit was designed to stop people WIP-spamming when nobody else was interested in discussing the project. If you find yourself in this situation then you need a blog rather than a forum thread.

It was not designed so people would instead spam a bunch of new threads once they hit the limit.

There are plenty of free blogging options that will be better suited to your project.
14  Discussions / General Discussions / Re: Any open-source RTS game? on: 2016-06-30 21:52:15
Zero-K is more advanced than Supreme Commander, and is open source (

However, it uses the (also open-source) Spring Engine (, which may not be very helpful if you're looking for something 'from scratch'.

There's also 0 A.D. ( if you're looking for a more medieval-themed RTS that doesn't use a streaming economy.
15  Java Game APIs & Engines / OpenGL Development / Re: Texture Loading on: 2016-06-15 22:05:09
You know, you've never said or supported anything I've ever said. Always baised.
Making a post just to say that I agreed wouldn't contribute anything to the discussion, which could explain this perceived bias (or maybe you just haven't said anything I agreed with). Don't take it personally.

Exempt the texture from opengl. They are unrelated at the moment. 21 bit is possible, you will have 2 bytes per pixel over 4. It would be much different looking at it as rgb only. You would have empty bytes/half bytes at the end. It isn't a bad idea to go this route and do this. There are some benefits you could get from using half bytes and the way I am looking at it, equivalent exchange. I'd gladly sacrifice colors we don't use for some basic gui colors.
In one post you say you're using half-bytes, in another you say you're getting half the number of states. I've tried twice (and trollwarrior has once) to show you that (2^8)^(1/2) != (2^8) * (1/2), but you keep taking it as a personal attack and ignoring the point I'm actually trying to get across.

You did post this in OpenGL development so I hope you can see why I made a point of saying OpenGL doesn't support 21-bit colour (it does support 16 bit colour).

To be honest, downing the idea is like calling cmyk color model redundant.
Redundant? No. Impractical for video games? Probably.

Also, why not ask my intentions?

To learn.
I'm trying to get you to learn. If you would stop assuming I have some personal vendetta against you then maybe I could help you.

It's worth noting that image size on disk (when using PNG) is in most cases far smaller than uncompressed in memory. Trying to make savings in disk usage is a worthless endeavour if it takes up the same space in memory.

Using 16-bit colour is only a worthwhile optimisation when you don't care about quality and are limited by bandwidth. And you can't know if you're limited by bandwidth until you actually make a game.
16  Java Game APIs & Engines / OpenGL Development / Re: Texture Loading on: 2016-06-15 09:31:00
256*256*256 is 16.777m (24 bit) colors. 128*128*128 is 2.097m colors.

Yes that is correct. 256^3 = 2^24 (24-bit) = 16.777mil. However, 128^3 = 2^21 (21-bit) = 2.097mil.

Is saving those three bits really so important? (And you can't really do 21-bit integers, so you're going to end up using 24 bits anyway) The VRAM of modern graphics cards is probably more than you could ever use as an indie developer (and if you're AAA, then you won't be going anywhere near this 'technique').

Besides, all of this "compression" is pointless unless OpenGL has a format that support it. Otherwise your low quality images are going to end up taking the same amount of memory as normal quality ones. And no, OpenGL does not support it. If you really want to save then just use one of OpenGL's compressed formats (and even then I don't think you're going to see any benefits).

And in the end all you can show for it is a half second speedup on something that only happens once, but at the cost of losing half the quality.

Save yourself the trouble and just use PNGs.
17  Java Game APIs & Engines / OpenGL Development / Re: Texture Loading on: 2016-06-15 02:31:06
I never said 128 colors either. It's just a color scale.

You said you were only going to 'split' bytes in half, representing each component with half a byte instead of the usual 1 byte.

Half a byte can only encode 16 different states (2^4 = 16), whereas you're saying you get a range of 128. Of course, you can still get a range of 128, but you still only get 16 shades, which means each shade is 8 units separated form the next (which for normal human sight, is pretty noticable).
18  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Compatibility Check on: 2016-06-07 05:34:52
19  Discussions / Miscellaneous Topics / Re: Graphics Cards on: 2016-06-06 03:22:40
A Raspberry Pi Zero is only $5.
20  Game Development / Performance Tuning / Re: Faster way to find primes? on: 2016-03-14 18:55:31
You can skip over all multiples of 2/3 by incrementing in steps of 6 (starting at 0) and checking the number above and the number below.
21  Game Development / Newbie & Debugging Questions / Re: Video playing in game on: 2016-03-13 20:25:54
I have a suggestion...

Could you guys load in the video then provide the option to EXPORT the video in a raw-ish file.

I think it would be beneficial to everyone if...

> BMP-like header
> Image-like pixel storage

All I want to do is grab the initial pixel data given the data from a header and invoke each change to the pixel data over a course of time specified in the header.


Do you have any idea how massive the file would be?
22  Game Development / Game Mechanics / Re: How To Rotate/Position a Camera at a Point on: 2016-03-10 05:00:29

I, along with other members of the forum, are perfectly happy to help you learn this stuff if you're willing to put in the effort. But we're not going to waste time solving all your problems when other libraries (in this case, JOML) have already done that.
23  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2016-03-10 03:27:22
I opened it to look at it and when it didn't explain to me what the coefficients and subscripts were I kind of just assumed and then got bored within two minutes.

Having this sort of attitude is a sure way of never learning anything. Maybe certain concepts came to you easily in the past, but that's no guarantee that it is always going to be the case.

Math is not easy. Programming is not easy. Learning any field beyond a few basic ideas is not easy. If you don't understand something you have to look for explanations, and explanations for those explanations, etc. until you finally get it.
If you find yourself in way over your head, it's probably because you're trying to learn something without the proper foundations of previous concepts, in which case you need to take a step back and learn all those.

If you want to become good at something, you have to work hard at it, whether it's interesting or not.
24  Game Development / Game Mechanics / Re: How To Rotate/Position a Camera at a Point on: 2016-03-10 02:07:12
Quick guide to your average "lookat" camera matrix:

You treat your matrix as a set of 4 columns, X, Y, Z, W, where each column is a 4-component vector.

The 4th component of the X, Y and Z matrices is 0. The 4th component of the W matrix is 1.

The first 3 components of the Z vector are a 3-dimensional vector representing the direction the camera is facing.
The first 3 components of the Y vector are a 3-dimensional vector representing the "up" direction of the camera (which direction will be 'up' on the screen).

The first 3 components of the X vector are a 3-dimensional vector representing the left/right (depending on your coordinate system) direction of the camera, ie: what direction is left/right on the screen. This vector can be derived from the previous two vectors through the cross product operation.

The first three components of the W vector are the position of the camera.

Therefore, set the W column/vector to the location of the camera.
Set the Z column/vector to the direction the camera is facing ((target - camera).normalize())
Use various vector math trickery (which I can't remember off the top of my head) to get the Y column.
Set the X column to the cross product of the Z and Y vectors.

To pan, you translate the target point.
To zoom, either move the camera closer to the target, or decrease the FOV (they will create somewhat different effects).
To rotate, you move the camera around the target in a circle.
25  Java Game APIs & Engines / OpenGL Development / Re: Culling faces on: 2016-03-10 01:49:53
I can't prove anything and they can't prove anything. There was nothing else to say.

The internet is emotionless and I am dealing with everyone who assumes any emotion or meaning.
If I were to attack someone over the internet, I would call myself stupid.
If I were to try to make sarcasm over the internet, I would call myself stupid. (Unless message saying *sarcasm* ya kno)

I've been holding back on posting this for a while now, but I guess it seems appropriate.
I happen to have saved the ending of our little discussion on IRC, mostly because of how amusing it was, but also if I ever needed to refer back to it in a time like this.

Maybe I can't prove anything, but everyone can decide for themselves.
For those with nothing better to do with their lives, here's how our discussion ended:
26  Discussions / General Discussions / Re: Forum is quiet on: 2016-03-08 23:13:45
It's not about the amount of posts, it's the quality and meaning.

A silent forum is just as good as, if not better than, one with a thousand posts but no useful information.

If you're looking for an online community to waste time on, there are plenty of places to go (reddit is the best I can think of). JGO is not one of them.
27  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Samples on: 2016-03-07 03:13:08
Vulkan, to my understanding, works with OpenGL, but I have 0 research and 0 understanding of Vulkan.
Vulkan and OpenGL are independent of each other, although with the latest OpenGL plus the right extensions you can get almost identical behaviour in the common cases. (And having 0 knowledge of Vulkan now only puts you behind everyone else by a few weeks)

Quote from: Hydroque
OpenGL is too big to die out immediately and in the next 10 years it will still be around.

Probably, but people won't be bothered writing new tutorials by that time.

Therefore, you should just use the resources that are already available. They are plenty good enough to learn from. Lots of other people can manage and I don't see why you can't.

Even if you plan on jumping to Vulkan later, you probably still need to learn OpenGL first or you'll completely be lost.
28  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Samples on: 2016-03-07 01:07:16
I'm going to throw in my 2c and say that writing OpenGL tutorials is soon going to be redundant.

On one side of the fence, you have people who don't care, and will just use an engine that hides it all away.
And on the other side, you have people that love all the low level fiddling, and therefore will ditch OpenGL for Vulkan.

There might be a very narrow area in the middle, but I suspect those people will be perfectly happy to use the resources that already exist.
29  Games Center / WIP games, tools & toy projects / Re: ChessBall on: 2016-03-07 00:59:07
Are you seriously arguing over switch vs if-else?

If your performance tuning is that specific then you should definitely not be using Java.
30  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-03-06 22:45:20
Could you check out my mat4 class later and tell me what is wrong with it?

Throw up a pastebin link and I (or anyone else) can have a look through it. (Also, being more specific as to what is wrong would help)

But you really should just use JOML.
Pages: [1] 2 3 ... 74
orrenravid (217 views)
2016-07-16 03:57:23

theagentd (288 views)
2016-07-11 14:28:54

Hydroque (375 views)
2016-07-06 05:56:57

Hydroque (527 views)
2016-07-03 08:52:54

GrandCastle (399 views)
2016-07-01 09:13:47

GrandCastle (392 views)
2016-07-01 09:09:45

CopyableCougar4 (445 views)
2016-06-25 16:56:52

Hydroque (420 views)
2016-06-22 02:17:53

SwampChicken (386 views)
2016-06-20 13:22:57

SwampChicken (306 views)
2016-06-20 13:22:49
Making a Dynamic Plugin System
by Hydroque
2016-06-25 00:13:25

Java Data structures
by BinaryMonkL
2016-06-13 21:22:09

Java Data structures
by BinaryMonkL
2016-06-13 21:20:42

FPS Camera Tutorial
by Hydroque
2016-05-22 05:40:58

Website offering 3D Models specifically for games for free
by vusman
2016-05-18 17:23:09

Website offering 3D Models specifically for games for free
by vusman
2016-05-09 08:50:56

Website offering 3D Models specifically for games for free
by vusman
2016-05-06 11:10:21

Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17 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!