Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
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  Java Game APIs & Engines / OpenGL Development / Re: Possible to manually "start X" instead of -XstartOnFirstThread? on: 2016-08-22 23:51:21
It's Apple (specifically, the Cocoa API developers/designers) being a special snowflake, and AFAIK there's nothing you can do about it.

Same problem occurs no matter what language you use. It's just that most (native) languages don't start on a new thread by default, so single-threaded applications aren't affected.
2  Discussions / Miscellaneous Topics / Re: HTML/CSS Is Gross on: 2016-08-17 04:44:05
#1 problem with HTML/CSS is that content and layout aren't seperated the same way styling is.

But that's what template libraries are for. Problem solved.
3  Discussions / General Discussions / Re: Porting Native Windows Windows to Java on: 2016-08-06 06:37:43
Why not use C#?

write once run anywhere . write once run anywhere . write once run anywhere .

If you're binding to win32 then you've already thrown out cross-platform.
4  Discussions / General Discussions / Re: Porting Native Windows Windows to Java on: 2016-08-05 23:27:12
Why not use C#? It will have much better access to the APIs you want and syntax-wise is practically Java anyway.
5  Discussions / General Discussions / Re: Porting Native Windows Windows to Java on: 2016-08-04 04:50:59
Unfortunately I don't think LWJGL will be able to offer what you want, as it using GLFW for windowing, and AFAIK, GLFW does not expose those parts of the API.

However, there are very few things that you would need access to window handles for. So what exactly are you trying to do?
6  Discussions / Miscellaneous Topics / Re: Sub Image in Shader Tiling on: 2016-08-01 05:35:44
It's not really clear what you're trying to do. Might want to try a drawing or something.
7  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.
8  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).
9  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.
10  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.
11  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.
12  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.
13  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).
14  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).
15  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.
16  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.
17  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.
18  Games Center / Showcase / 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.
19  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.
20  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.
21  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.
22  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.
23  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).
24  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Compatibility Check on: 2016-06-07 05:34:52
25  Discussions / Miscellaneous Topics / Re: Graphics Cards on: 2016-06-06 03:22:40
A Raspberry Pi Zero is only $5.
26  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.
27  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?
28  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.
29  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.
30  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.
Pages: [1] 2 3 ... 74
ivj94 (579 views)
2018-03-24 14:47:39

ivj94 (42 views)
2018-03-24 14:46:31

ivj94 (346 views)
2018-03-24 14:43:53

Solater (59 views)
2018-03-17 05:04:08

nelsongames (104 views)
2018-03-05 17:56:34

Gornova (122 views)
2018-03-02 22:15:33

buddyBro (665 views)
2018-02-28 16:59:18

buddyBro (89 views)
2018-02-28 16:45:17

xxMrPHDxx (491 views)
2017-12-31 17:17:51

xxMrPHDxx (727 views)
2017-12-31 17:15:51
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!