Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (690)
Games in Android Showcase (201)
games submitted by our members
Games in WIP (764)
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 ... 307
1  Game Development / Shared Code / Re: Converting floats/doubles to 10/11/16/N bit floats on: 2016-09-23 19:49:05
@Cas: the hardware will never catch up, because the hardware will never be fast enough.

Even in hardware 20 years from now, when we have realtime photon-mapping, memory bandwidth will be a bottleneck.
Any way or form to halve your data size is bound to yield performance gains.
2  Games Center / Contests / Re: JAVA4K GAMES DOWNLOAD on: 2016-09-14 23:51:10
How is not 'anybody' a responsible party? Just upload all those jars/classes to a dropbox account - these files were publicly available once, after all. Numerous people have offered before to take over the java4k data/code - including me. What are you looking for in this responsible party? How do we know whether we qualify?
3  Java Game APIs & Engines / OpenGL Development / Re: *testing needed!* Vertex cache shenanigans on: 2016-09-12 16:24:17
I am so sorry. Friends don't let friends buy Intel GPUs.
Nah, it's a work laptop. I blame my boss. Anyhoo - enough derailing.


Oh, these might help:

Intel HD 530 driver:
   Version: 10.18.15.4271
   Release date: 2015-08-11

Installing the latest drivers now - let's see if I can brick this thing.
4  Java Game APIs & Engines / OpenGL Development / Re: *testing needed!* Vertex cache shenanigans on: 2016-09-12 16:18:45

1  
2  
3  
java -jar VertexCacheTest.jar
Error: Pipeline statistics are not supported. Aborting.
  Renderer: Intel(R) HD Graphics 530


I started the gfx driver utility, to figure out the version - then my W10 system BSODed. You're welcome. Emo
5  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java Graphics Github Organisation on: 2016-09-03 20:18:37
404 Emo
6  Discussions / General Discussions / Re: Used to compile, now doesn't?? on: 2016-08-29 12:34:50
Now that you solved your problem... we can frolic and laugh for a bit... right?


... shutting down which turned out to be thermal paste causing CPU to overheat.
Who in their right mind would assume that adding any more material between 2 objects, without significantly increasing their contact area, can increase the heat transfer between the original materials... The top of the CPU heatspreader and the bottom of the heatsink are already exceptionally flat - for a reason. There is very little margin for improvement, and huge room for adverse results.

Thermal paste should fill near-invisible cavities in both metal surfaces... if you see any thermal paste, you are doing it wrong. If you feel it sloshing about when pushing your heatsink on top of it, you're doing it wrong. Thermal paste manufacturers provide such rediculous quantities per sold unit, that it gives the wrong impression. The volume they provide could be used to 'treat' at least a few hundred CPUs.
7  Game Development / Game Mechanics / Re: Downloading and running jars from servers - Security? on: 2016-08-28 14:28:09
The theory behind applets was exactly that - lock the java code in a sandbox
that protects the user from harm.  Sadly, Oracle gave up trying to maintain that
model.
The sandbox model blacklists (locks and barriers), it doesn't whitelist.

Furthermore, the sandbox did checks at runtime, instead of whitelisting code at compile/load-time.
8  Game Development / Game Mechanics / Re: Downloading and running jars from servers - Security? on: 2016-08-26 17:13:52
You can write a bytecode analyser, block reflection, and then whitelist all privileges on each class/method/field that you want to expose (you can even only grant read-access on certain fields). There isn't any performance overhead with this approach. It's just quite advanced stuff.

Oh, and blacklisting never works. Whitelisting is your only option.
9  Game Development / Newbie & Debugging Questions / Re: Converting RGB images to a master palette on: 2016-08-24 18:43:46
Why is memory such a constraint?
10  Game Development / Newbie & Debugging Questions / Re: Converting RGB images to a master palette on: 2016-08-23 20:03:02
Don't forget you can use dithering to approximate colors (in groups of pixels).

Here I created code to approximate any RGB input in the EGA16 palette (obviously only 16 colors)
http://www.java-gaming.org/topics/tinygame-resources/22266/msg/184436/view.html#msg184436




If you add animation, you can dither in the 3rd dimension (time).
Click to Play
I remind you, these are just 16 colors, evenly spaced out colors in the RGB color space, which means I probably use only 8-12 per frame in this specific image.

Just run this JAR for yourself:
http://indiespot.net/files/ega-dithering.jar

It should be relatively easy to use this concept to match an arbitrary palette.
11  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-08-18 19:44:26
Define it as method then, you silly.
12  Discussions / General Discussions / Re: Programmer jokes on: 2016-08-18 19:38:58
Why did the developer stumble to an ATM?
 - He ran out of cache.









 Emo
13  Discussions / Community & Volunteer Projects / Re: Looking for a programming buddy on: 2016-08-15 22:12:16
Not even a link to your project? How would you find a stranger willing to finish / maintain 'this project' without even the slightest incentive.
14  Discussions / Java Gaming Wiki / Re: Quasi random number (low-discrepancy sequences) on: 2016-08-14 23:14:33





(click this page to load the PDF)
15  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Status of Riven's LibStruct? on: 2016-08-14 22:10:42
When you say structs don't get pushed into registers, do you mean that even the individual fields don't get pushed? I assumed that declaring a struct was semantically equivalent to declaring all of its fields in place. Otherwise, I have no expectations of this pushing entire structs into SIMD registers or anything. (Bytecode has no way of representing this, to my knowledge.)

Let's say  you have this code:
1  
2  
3  
thing.a = vec.x * -1;
thing.b = vec.y * 2;
thing.c = vec.x * -3;


With POJOs,
vec.x
will be stored into a register after the first read, with structs however, the memory (or L1-cache in this case) will be read twice.

As for the reordering: with POJOs, HotSpot will very likely swap line 2 and 3, whereas it won't with structs.



Both factors can result in a slowdown, depending on the bottleneck.
16  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Status of Riven's LibStruct? on: 2016-08-14 17:12:59
persecutioncomplex

LibStruct basically has these advantages:
 - zero-copy
 - zero-garbage
 - convenience (on sourcecode level)

The disadvantages are:
 - struct values are never pushed into registers by HotSpot
 - structs are not eligible for escape analysis
 - struct I/O is never reordered by HotSpot

There are quite a few pitfalls when using LibStruct:
 - a NPE or AIOOBE turns into a segfault/memory-access-violation
 - structs must never be used as objects (like adding them to a Collection, or in general: passing them to a function accepting a java.lang.Object)
 - conceptually wrong struct code but valid Java code can be rather hard to debug, as the JVM typically crashes.



As to come back to the original post: LibStruct is currently frozen, as the number of users is zero (me included).
17  Game Development / Game Play & Game Design / Re: Exaggerated Sprite Animation Sizes on: 2016-08-09 22:47:06
You could have 2 sprites, render one on top of the other.
18  Game Development / Performance Tuning / Re: Interesting talk from Cliff Click, Azul Systems on: 2016-08-09 21:38:23
They might be able to increase the speed of Java another 20% but if it means startup takes minutes nobody will want it.
I realize that the last part of that sentence is in the context of apps/games, but... in the server world, people would fling hundreds of millions of dollars at you for improving performance 20% if that means the server takes only a few more minutes to start. Java web-container initialization time usually is 5-10min anyway.
19  Discussions / Miscellaneous Topics / Re: Hello gang! Hope all is well! - Missing JGO on: 2016-08-08 20:58:43
Hi Chris! Back then, I used to wonder how one could possibly not have enough time to maintain a forum... Now I feel realife slowly creepin' in Smiley

Having said that, what have you been up to lately?
20  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JOML 1.8.0 Release on: 2016-07-31 16:18:15
... copying a Matrix4f into another Matrix4f ...

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
        final void copy(Matrix4f src, Matrix4f dest) {
            UNSAFE.putLong(dest, m00FieldOffset,    UNSAFE.getLongVolatile(src, m00FieldOffset));
            UNSAFE.putLong(dest, m00FieldOffset+8,  UNSAFE.getLongVolatile(src, m00FieldOffset+8));
            UNSAFE.putLong(dest, m00FieldOffset+16, UNSAFE.getLongVolatile(src, m00FieldOffset+16));
            UNSAFE.putLong(dest, m00FieldOffset+24, UNSAFE.getLongVolatile(src, m00FieldOffset+24));
            UNSAFE.putLong(dest, m00FieldOffset+32, UNSAFE.getLongVolatile(src, m00FieldOffset+32));
            UNSAFE.putLong(dest, m00FieldOffset+40, UNSAFE.getLongVolatile(src, m00FieldOffset+40));
            UNSAFE.putLong(dest, m00FieldOffset+48, UNSAFE.getLongVolatile(src, m00FieldOffset+48));
            UNSAFE.putLong(dest, m00FieldOffset+56, UNSAFE.getLongVolatile(src, m00FieldOffset+56));
        }


Why volatile?
21  Java Game APIs & Engines / Engines, Libraries and Tools / Re: FXGL - JavaFX 8 / Kotlin Game Library on: 2016-07-31 11:16:24
If you want to engage people, put the screenshots in your post, not behind a link.
22  Java Game APIs & Engines / Engines, Libraries and Tools / Re: LibZ - 2D Java Game Library on: 2016-07-30 21:34:31
1) Guy makes engine
2) Guy makes demo-game
3) People nitpick demo-game
23  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-07-28 06:17:40
Dude, this in WIDT? Emo
24  Game Development / Newbie & Debugging Questions / Re: LWJGL 3 glfwSetWindowIcon does not work - at all on: 2016-07-20 18:41:30
If someone with the necessary power reads this: You can close this ticket if you want to, as it solved  Wink
This is not how this forum works Smiley What if somebody wanted to add some other piece of wisdom? (Or share a good joke about... ehm... buffers!)

You can put [solved] in the subject-line though, the forum will turn it into a pretty little picture.

25  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-07-20 05:21:22
If this code is useful to anyone, I can post it, but I want to handle the license and permissions stuff correctly.

Basic usage:
1  
    float[] audioFloats = OggVorbisToPCMFloats(URL oggUrl);

How do I know how many channels the audio stream is comprised of?

Maybe you could return float[][] or an actual POJO with some meta-data like sample-rate.

Transforming all samples into floats, only to have them converted into bytes/shorts again to play it seems a bit cumbersome. It may also be disadvantageous to be forced to decompress the entire file before you can play it. For long audio files this means significant decoding time and serious memory usage (especially due to the floats).
26  Discussions / General Discussions / Re: JGO bounced back on: 2016-07-13 09:34:48
A surge in visitors (bots?) blew up apache's access.log to 20GB, taking down MySQL and crashed a few MyISAM tables beyond recovery.

Obviously the log-files should have been in rotation-mode, but it wasn't.
27  Discussions / General Discussions / JGO bounced back on: 2016-07-13 01:33:50
I found some time (3:30AM) to restore JGO from a backup just prior to the crash.

Happy posting.
28  Game Development / Newbie & Debugging Questions / Re: Temporary ObjectOutputStream wrapping InputStream on: 2016-07-06 23:04:00
1  
2  
3  
4  
5  
   public static GLSLFile deserializeFrom(InputStream input) throws IOException {
      ObjectInputStream ois = new ObjectInputStream(input);
      return (GLSLFile) ois.readObject();
      //I feel so dirty for not closing ois...
   }

Is this correct? Can this explode somehow? What am I supposed to do here?!
Yes it can explode, because ObjectInputStream is buffered, and may read beyond the boundaries of the object.
The code I provided in the previous reply doesn't explode as much, they say.
29  Game Development / Newbie & Debugging Questions / Re: Temporary ObjectOutputStream wrapping InputStream on: 2016-07-06 22:56:00
Just use what mother nature provided:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
   public void serializeTo(OutputStream output) throws IOException {
+     ByteArrayOutputStream baos = new ByteArrayOutputStream();
      try(ObjectOutputStream oos = new ObjectOutputStream(baos)) {
         oos.writeObject(this);
      }
+     new DataOutputStream(output).writeInt(baos.size());
+     baos.writeTo(output); // pump buffered data into the output
   }

   public static GLSLFile deserializeFrom(InputStream input) throws IOException {
+     DataInputStream dis = new DataInputStream(input);
+     byte[] buf = new byte[someSanityCheck(dis.readInt())];
+     dis.readFully(buf);

+     try(ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(buf))) {
         return (GLSLFile) ois.readObject();
      }
   }
30  Discussions / General Discussions / Re: Interesting proposals: Java 9 and beyond on: 2016-07-06 21:21:28
Keep in mind Java EE != Java JDK.

Obviously, Oracle will handle the fallout of all confusion in the worst possible way, and in 3 months time the story will be nuanced somewhat.
Pages: [1] 2 3 ... 307
 
xTheGamerPlayz (161 views)
2016-09-26 21:26:27

Wave Propagation (355 views)
2016-09-20 13:29:55

steveyg90 (468 views)
2016-09-15 20:41:23

steveyg90 (465 views)
2016-09-15 20:13:52

steveyg90 (507 views)
2016-09-14 14:44:42

steveyg90 (532 views)
2016-09-14 14:42:13

theagentd (512 views)
2016-09-12 16:57:14

theagentd (442 views)
2016-09-12 14:18:31

theagentd (311 views)
2016-09-12 14:14:46

Nihilhis (744 views)
2016-09-01 13:36:54
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!