Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (604)
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 ... 90
1  Game Development / Newbie & Debugging Questions / Re: LibGDX List of Disposable objects on: 2014-12-22 00:44:41
When your app exits, everything is disposed. You only need to dispose things explicitly if you need them to be disposed without exiting the app. Eg, maybe you have separate screens and want to unload all the stuff from one screen before you show another. This could make sense if the screens each had a huge map with screen specific textures, etc.

Does this mean disposing all things Disposable when the app exits is unnecessary?
Definitely, yes. Don't do stuff you don't have to do.
2  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-12-21 00:47:15
Can anyone guess how I do it? =P

Anisotropic filtering? It's look really good. Maybe give use video/gif.
Yup! By modifying the gradients based on the motion vector, I can trick the texturing hardware into thinking that the particle's surface is sloped, so it uses anisotropic filtering to do up to 16 trilinear samples in a row to compensate for that.
3  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-12-20 23:15:26
Someone forgot a call to glClear()...
4  Discussions / General Discussions / Re: Lockable variables on: 2014-12-20 00:24:16
Uh, the final keyword? o_O
5  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-12-19 23:58:13
To be fair, I had to sacrifice half my sanity to get it right...
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-12-19 23:53:57
Mostly fixed my particle motion blur!



Pretty good motion blur for the ground, almost PERFECT motion blur for particles. The coolest thing is that I compute that motion blur with only a single texture sample. Can anyone guess how I do it? =P
7  Game Development / Newbie & Debugging Questions / Re: [LWJGL] Sending multiple textures to sampler uniforms in openGL on: 2014-12-18 09:14:54
It used to be a hardware limitation. GPUs were limited by the number of texture units they had, as they had their own caches and stuff like that. When compute became more important, they started with more generic shared caches, so texture units no longer exist in hardware. What you're after is bindless textures.
8  Game Development / Shared Code / [GLSL] Simple, fast bicubic filtering shader function on: 2014-12-17 21:05:33
Hello.

I ended up implementing a very simple bicubic texture filtering shader and thought I might as well share it here.



Screenshot comparison of bilinear and bicubic filtering (mouse over to switch to bicubic)
 - Fire particle
 - Noise texture


Code
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
vec4 cubic(float v){
    vec4 n = vec4(1.0, 2.0, 3.0, 4.0) - v;
    vec4 s = n * n * n;
    float x = s.x;
    float y = s.y - 4.0 * s.x;
    float z = s.z - 4.0 * s.y + 6.0 * s.x;
    float w = 6.0 - x - y - z;
    return vec4(x, y, z, w) * (1.0/6.0);
}

vec4 textureBicubic(sampler2D sampler, vec2 texCoords){

   vec2 texSize = textureSize(tex, 0);
   vec2 invTexSize = 1.0 / texSize;
   
   texCoords = texCoords * texSize - 0.5;

   
    vec2 fxy = fract(texCoords);
    texCoords -= fxy;

    vec4 xcubic = cubic(fxy.x);
    vec4 ycubic = cubic(fxy.y);

    vec4 c = texCoords.xxyy + vec2(-0.5, +1.5).xyxy;
   
    vec4 s = vec4(xcubic.xz + xcubic.yw, ycubic.xz + ycubic.yw);
    vec4 offset = c + vec4(xcubic.yw, ycubic.yw) / s;
   
    offset *= invTexSize.xxyy;
   
    vec4 sample0 = texture(sampler, offset.xz);
    vec4 sample1 = texture(sampler, offset.yz);
    vec4 sample2 = texture(sampler, offset.xw);
    vec4 sample3 = texture(sampler, offset.yw);

    float sx = s.x / (s.x + s.y);
    float sy = s.z / (s.z + s.w);

    return mix(
       mix(sample3, sample2, sx), mix(sample1, sample0, sx)
    , sy);
}


Usage
1.
Simply add the above code into your GLSL shader source code just before your main() function. Alternatively, you can add
#version 130
above it and put it in its own file. Then you attach both that shader and your shader program that contains main() to your shader program. To be able to use the function in your other shader, you need to define it by adding
vec4 textureBicubic(sampler2D texture, vec2 texCoords);
. Note that the code uses textureSize() to retrieve the size of the texture for convenience, which requires GLSL version 130 (OGL 3.0). It's possible to replace this with a uniform variable through which you manually pass in the texture's size which would make the shader work on OGL2 hardware as well.

2.
In your shader, simply replace your calls to
texture(mySampler, myTexCoords)
with
textureBicubic(mySampler, myTexCoords)
. Yep, it's that simple.

3.
Make sure your texture has bilinear filtering enabled (GL_LINEAR or the mipmapped versions of it)! The shader abuses bilinearly filtered samples to improve performance (4 taps instead of 16).


Notes
Because the shader uses texture() calls instead of texelFetch(), the shader obeys any and all texture parameters you set. The shader works with texture coordinate wrapping and clamping as it should and even works with mipmaps, trilinear filtering and even anisotropic filtering, although when using mipmaps the texture size will not be correct when the texture is minified, which if I understand the code correct means that the shader essentially falls back to bilinear filtering, which hopefully should be a bit sharper when you have a large resolution texture.


Technical details
Bicubic filtering is done by basing the result on the 4x4 area of texels around the sample point. This should require 16 texture samples and then some rather complex blending math between them, which would have a noticeable performance cost. This shader is inspired by this post and relies on the fact that bilinear filtering gives us a weighted average of texels in a 2x2 area. By sampling 4 bilinear samples with carefully modified offsets and how we combine these 4 samples, we can get the correct weights for all 16 texels we need. The result is an extremely fast bicubic filtering function that only requires 4 texture samples.
9  Game Development / Newbie & Debugging Questions / Re: ENUM Memory usage in Java on: 2014-12-17 16:37:46
To minimize memory usage and improve cache coherency, you could use a single short[width*height] instead of an array of arrays (short[height][width]).
10  Game Development / Newbie & Debugging Questions / Re: Losing pixels in 2D game. on: 2014-12-13 17:12:15
Rubber duck debugging in action, people.
11  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-12-13 07:24:45
Alright, let's have a healthy competition!  Pointing  Cool
Breaking news! SHC has sued matanui159 for 200 million dollars over patent infringement!
12  Game Development / Newbie & Debugging Questions / Re: Kryonet sendToTCP/UDP Optimization? on: 2014-12-09 18:09:39
I think with the delays inherent in networking, this kind of optimization will make no difference.
For a game server, it is relevant. The server may also be running other CPU intensive tasks, like game logic, physics, etc. It's a simple optimization with a noticeable improvement for larger game servers.

How many loop iterations is enough to make one array lookup and one int comparison in each iteration slow enough to warrant using a map? Is that number greater than the number of connections your server might ever have?

Quick and dirty JMH bench says about 20 assuming the average is that the item is found in the middle of the array:

size = 8
Benchmark              Mode  Samples    Score  Score error   Units
o.s.LoopBench.loop    thrpt       10  238.392        4.639  ops/us
o.s.LoopBench.map     thrpt       10  171.006        3.299  ops/us

size = 16
Benchmark              Mode  Samples    Score  Score error   Units
o.s.LoopBench.loop    thrpt       10  180.809        2.018  ops/us
o.s.LoopBench.map     thrpt       10  171.538        2.048  ops/us

size = 64
Benchmark              Mode  Samples    Score  Score error   Units
o.s.LoopBench.loop    thrpt       10   56.051        1.301  ops/us
o.s.LoopBench.map     thrpt       10  171.549        3.525  ops/us

size = 1024
Benchmark              Mode  Samples    Score  Score error   Units
o.s.LoopBench.loop    thrpt       10    4.067        0.088  ops/us
o.s.LoopBench.map     thrpt       10  170.738        2.863  ops/us

Again, why does the send method take in an ID instead of a raw Connection object? Connection doesn't seem to be some kind of internal object, as its returned by the listener and there's a getter to get all connections. If the only way to get a connection ID is to get it from a Connection object, what's the point? Just add an overloaded version of all those functions that take in a Connection object instead. The sender probably holds its Connection object anyway.
13  Game Development / Newbie & Debugging Questions / Re: Kryonet sendToTCP/UDP Optimization? on: 2014-12-09 16:34:54
Is there a reason why send***() takes in the connection ID instead of a Connection object?
14  Java Game APIs & Engines / OpenGL Development / Re: Slick2D Shader Crash on: 2014-12-04 08:32:42
It could be either
1. a driver bug or
2. a bug in some code causing glUniform4f() to somehow read outside of the program's memory, causing an access violation error.

Could you show us the entire crash dump file?
15  Discussions / Business and Project Management Discussions / Re: [PAID] BTCDraft.com is Looking for Games on: 2014-12-02 23:17:25
Usually you don't make a game first (unless it's a simple gameplay prototype) and THEN move everything to the server side. It's usually kept in mind from the beginning, unless you're begging for hacks to add it in later and a bigger risk for security issues. I'm probably not very knowledgeable on this topic though, and if the game is simple enough, then obviously it's not that difficult to move the most critical parts to the server.
16  Discussions / Business and Project Management Discussions / Re: [PAID] BTCDraft.com is Looking for Games on: 2014-12-02 23:08:48
Proof: I've teleported around myself in my own games by simply using Cheat Engine to modify my position. Took me less than 5 minutes once I knew what I was doing. It's even easier to modify a numerical score that's clearly visible in the game.
17  Discussions / Business and Project Management Discussions / Re: [PAID] BTCDraft.com is Looking for Games on: 2014-12-02 22:52:35
Unless everything runs on a server you control, you cannot trust the client, even if you've reviewed your code. It's easy to manipulate a game running on your local PC, which is why we have all these aimbots and wallhacks in shooter games, and that's just scratching the surface. Unless you have a huge amount of anti-cheating software and/or run everything on the server, there's actually nothing preventing a player in an FPS game to simply send packages to the server that he just headshotted every single enemy on the whole map simultaneously.
18  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-12-01 16:43:12
I'd play that.
19  Discussions / Miscellaneous Topics / Re: Is drinking half a bottle of vodka safe? on: 2014-11-21 21:02:32
Like I've said, I'm not really here to talk anybody into anything. I seem to have been sucked into a "debate" that I don't really have any interest in- I thought you were asking a general question out of genuine curiosity, so I thought I'd chime in, but I think what you really want to do is complain about your friends- and that's cool too, I just don't have much to say about that other than "yeah, that happens, and it sucks."
No, I don't want to complain about them. >___> That was 4 years ago and I have barely seen them since. I'm sorry if it came out that way, but from my perspective you're just acting defensive now. Since this is a topic I rarely get any serious answers for and you were kind enough to answer my questions I wanted to continue the debate...

Anyway, to make this clear... I really don't hold a grudge against people who drink. Some of the most enjoyable times I've ever had have been going out with my friends to drink. I don't look down on them (or anyone else) for drinking, but I also don't understand WHY people choose to drink. THAT's what I want to find out, and you've given me a lot of answers. I'm not trying to convince you to stop drinking! I want YOU pretend you're going to convince ME to start! If that makes sense...

I do think it's a fair comparison: your original question was "why do people eat ice cream?" and I said "here is why some people eat a couple ice creams a week" and you came back with "but my friends eat 25 ice creams every weekend, so people who eat 2 ice creams are stupid." That's an oversimplification, but do you see how we might be having two different conversations?

Too much of anything is bad for you. Too much *water* can kill you. Too much ice cream is bad for you. Too much beer is bad for you. But a little ice cream, like you've said, can be beneficial. So can a little beer.

Other than that, I've given you a few reasons, so I don't think you're necessarily trying to figure it out, as much as you are trying to prove it wrong- and with something as subjective as this, I don't think that's going to happen.
There are lots of things that you shouldn't eat or drink at all, like fast food and candy in general. Moderation implies that the action has some sort of benefit when done in small controlled amounts. Something inherently dangerous and possibly damaging shouldn't be done at all, especially since from my perspective it doesn't really hold any advantage.

And yes, I most likely am overestimating the risks of getting drunk, or rather the potential dangers that follow, like accidentally hurting yourself or others, embarrassment forever immortalized on social networks, or simply being a generic nuisance to everyone around.
Those are all things that scare me a lot, probably more than other people (?).  On top of that, it's also really expensive, so for me it wasn't a very difficult choice.


It endangers both you and your friends and also waste the most valuable resource you have in life: time.

Sorry, but how did that single beer I drank last night endanger anybody? And if I deem that as time well spent, who is to say I'm wasting it? That's the kind of over-dramatization that made me chime in in the first place.
I'm not accusing you of endangering anybody by having a beer, but as far as I know there isn't a threshold for when alcohol starts affecting you negatively. As an example of what I mean, I did some quick Googling and came to the conclusion that I can drink up to 3 beers and still legally be allowed to drive, but after drinking 3 beers the same chart classifies me as "impaired". For me (and probably 99% of everyone out there) it isn't about being "legally" drunk; it's the fact that if I've drunk any amount and end up causing an accident I would not be able rule out that it was because I was "impaired" by whatever tiny amount of alcohol I had had, and that I could've done something different to avoid that outcome. I realize that I'm again exaggerating with a rather extreme example, but that's still how I feel even if we take the driving out of the equation. For the record, I do enjoy having a cider every now and then but that's solely because I think they taste good and that they're more socially accepted than Coca Cola. If I had to say that I'm against anything at all, it'd be drinking at bars and other places that with random people you don't trust when you're in a state where your judgement and ability to protect yourself is (possibly ever so little) impaired.




I don't know... It feels like whenever I try to ask people what they enjoy about drinking they usually get all defensive and just respond with some variation of "I don't drink so much that it's dangerous so why do you care?" which doesn't answer my question, so it was a pleasant surprise that you guys took my question seriously. I'm not sure if continuing the discussion will yield anything good, but if anyone wants to I'll be glad to continue it. I guess that some part of me is a bit jealous of people who seem to be able to enjoy themselves without a worry in the world...

Anyway, thanks for all the answers!
20  Discussions / Miscellaneous Topics / Re: Is drinking half a bottle of vodka safe? on: 2014-11-21 16:55:23
Like I said, if you don't want to drink, don't do it! I'm just trying to answer the question and balance out some of OP's "woo alcoholic beverages" nonsense. I'm not here to convince anybody of anything, so if you don't want to- just don't!
You couldn't force me drink even if my life depended on it. I don't surround myself with people who'd force me to drink. I'm not writing this in some attempt to get confirmation by random people online; I know what I want and don't want to do. =P

Well, I don't drink coffee or energy drinks either, so... =P

Ha, I knew somebody would come along with that response.

I guess the closest I can come then is: have you ever had ice cream? Ice cream is just sorta fun to eat, and can put you in a better mood. But it is also really bad for you, so why do you do it? I've seen lots of people go from skinny to fat, so I don't really like ice cream, so why do you?

(See what I'm trying to do?)
I don't think this is valid comparison. Eating ice cream does have clear benefits. It's sweet and tasty and can cool you down on a warm summer day. Alcohol on the other hand doesn't taste good (God, it tastes like cough medicine...) or improve anything. In my opinion there's no clear advantage in drinking, but a majority of people I know still enjoy it. That's what I'm trying to figure out.

I know, but there is no threshold where it starts affecting your judgement, coordination, motor skills, balance, humor, etc. Any amount of alcohol affects your mind and body.

And any amount of ice cream will affect your body. You asked why people drink, and I'm just trying to give you the responsible reasonings instead of the cliches in this thread.
Everything we consume is a trade-off. If you're accepting the risks of eating ice cream and think the benefits outweigh the cost, then you eat ice cream. I don't think that this comparison is completely fair, since the body does have use for sugar to some extent, and the drawbacks of eating lots of sugar are bad teeth, which can be prevented and treated in other ways. The other obvious risk is diabetes, which is far from a guaranteed outcome from a single ice cream. I accept these risks when I have my ice cream. On the other hand, alcohol has much more severe guaranteed consequences in my opinion. It endangers both you and your friends and also waste the most valuable resource you have in life: time.

I've seen a lot of people do stupid stuff that for some reason was fun. I used to have a lot of friends in middle school, and we hung out a lot long after we all went to different high schools. We had so much fun doing pretty much nothing. We just walked around and talked about stuff during the whole summer vacations and stuff like that. Then everyone turned 18 and just hanging out wasn't good enough anymore.... What really bothered me was how much everyone had changed...

That happens to everybody. I've seen that happen too, and I don't think it's as simple as "people who drink change". I've seen people get lost to WoW, or smoking, or to TV. Everybody is figuring out what their interests are. And sadly, for a lot of people, that answer seems to be "nothing", and that's when they drift down a road of becoming, well, boring. That doesn't mean that it's all because they started drinking though.

And that's not even touching on the existential fact that these people probably say that *we* were the ones who changed and became boring.

My point is that blaming it all on drinking is an oversimplification- your friends probably would have drifted apart no matter what. It's just that drinking is the most obvious change, but at 18 it's nowhere near the biggest thing that's changing.
You're completely right. The fact that those people valued drinking so highly that they wanted to get drunk all the time as soon as they turned 18 was a difference that was there from the start. I'm not blaming the fact that we split up on drinking specifically.

What bothers me is how people that are normally very cautious and careful think it's completely safe to drug themselves in a public location. It's scary to see people you care about being so vulnerable, and in many cases you are relied upon as the person who doesn't drink. As I don't see what the point is of alcohol, it just needlessly worries people who care about you and in general is really inconsiderate as it thrusts a lot of responsibility on me. People are supposed to be able to take care of themselves. There's other stuff like people spewing out all their long-kept secrets or even exaggerating or making up stuff just to seem cool ("I'm more messed up than you, haha!"). Again, it's inconsiderate to other people. It's like wearing a seat belt. Half the reason to wear them is to protect yourself. The other half is not to make people who care about you worry, and to not hit the person sitting in front of you if you crash.

It honestly sounds like the problem is, you need to find better friends. :p
I'm no longer hanging out with them. Speaking of which, I met one of them at my uni a few weeks ago. He asked me for help with defining variables in Java. He's on his 4th year and he's had 4 classes on Java.
PS: We're both studying compute science but he's on his 4th year and I'm on my 3rd.
21  Discussions / Miscellaneous Topics / Re: Is drinking half a bottle of vodka safe? on: 2014-11-21 04:33:44
Have you ever had just a little too much coffee or soda, and the caffeine made you really energetic, but in a focused way? Like in a way that you find yourself coding for a couple hours, becoming sorta "in the zone", listening to music and getting work done? That's really fun, isn't it?
Well, I don't drink coffee or energy drinks either, so... =P

I know what you mean though, but I don't connect that with any of the stuff I take in. It's just a positive circe: things are going well ---> confidence boost ---> focus boost ---> things go even better.

On a serious note, isn't life all about memories?
Actually it's quite the opposite - life is about concentrating on the current moment and not thinking about the past and pondering about the future, because it only happens in the present...
Your memories define you and make up your personality. You don't walk into the same trap over and over again or make the same mistakes over and over again because you learn, and you have no idea when you might get an opportunity to learn something new.

... that doesn't mean everybody who drinks a beer is going to have permanent brain damage like some people are making it sound.
I know, but there is no threshold where it starts affecting your judgement, coordination, motor skills, balance, humor, etc. Any amount of alcohol affects your mind and body.

I've seen a lot of people do stupid stuff that for some reason was fun. I used to have a lot of friends in middle school, and we hung out a lot long after we all went to different high schools. We had so much fun doing pretty much nothing. We just walked around and talked about stuff during the whole summer vacations and stuff like that. Then everyone turned 18 and just hanging out wasn't good enough anymore. It always ended up with us going to either a bar or (more often than not) going home to someone to drink get drunk. They'd all (well, except me and one other guy) just rather turn their brains into slime, and that's not an overstatement in this case. It wasn't possible to have any kind of conversation lasting more than two sentences. Well, I guess the point when I gave up and stopped hanging out with them was when one of the guys banged my crush in their intoxicated state as we're all trying to sleep upstairs. Myeh, it's not like they wouldn't have gotten together anyway. What really bothered me was how much everyone had changed...

So well, I guess drinking together with your friends is fine. I do really enjoy going out with my close friends to a bar or to someone's house or so, and most people I know drink responsibly. I can get pretty high on sugar myself, so I usually don't have much problem blending in anyway, but I still don't get what the point of the alcohol is in the first place. If we're watching a movie, then for me half the fun is hearing everyone's opinions on it, but I digress. My point is that if you're in the company of people you trust, then at least it's not that bad.

What bothers me is how people that are normally very cautious and careful think it's completely safe to drug themselves in a public location. It's scary to see people you care about being so vulnerable, and in many cases you are relied upon as the person who doesn't drink. As I don't see what the point is of alcohol, it just needlessly worries people who care about you and in general is really inconsiderate as it thrusts a lot of responsibility on me. People are supposed to be able to take care of themselves. There's other stuff like people spewing out all their long-kept secrets or even exaggerating or making up stuff just to seem cool ("I'm more messed up than you, haha!"). Again, it's inconsiderate to other people. It's like wearing a seat belt. Half the reason to wear them is to protect yourself. The other half is not to make people who care about you worry, and to not hit the person sitting in front of you if you crash.

I guess this turned out more into a vent than a discussion, but meh...

PS: I'm 22 now, so it's not like I'm new to alcohol.
22  Discussions / Miscellaneous Topics / Re: Is drinking half a bottle of vodka safe? on: 2014-11-20 02:14:31
Believe it or not, I ended up doing the challenge on halloween. Woke up with bruises and cuts all along my arms and neck. Turns out I fell over in the bush while smashing glass bottles on rocks. I barely remember anything.
As someone who's never drunk more than a cider or two... Why do you guys do it? I seriously don't get why people drink alcohol at all. You barely remember anything at the end. What's the point of temporarily impairing your brain? To get the courage to speak to girls/guys? Group pressure? Reality escaping? Seriously, why do you guys drink?

I don't wanna start a circlejerk here, so serious answers only. I actually want to know.
23  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 3; how's it getting along? on: 2014-11-19 17:19:57
Considering that 90%+ of OpenGL drivers out there have a version of OpenGL 2.0+ or greater, best thing would be to just update those two bits of the tutorial to use the following two calls instead.
More like 99%, but yeah.
24  Game Development / Game Mechanics / Re: SMD skeleton problems on: 2014-11-14 18:41:27
This is what I do convert the Euler angles (stored in a Vector3) to a quaternion:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
   private Quaternion convertOrientation(Vector3 o) {
     
      float x = o.x * 0.5f;
      float y = -o.y * 0.5f; //NOTE
      float z = o.z * 0.5f;
     
      float c1 = (float)Math.cos(z);
      float c2 = (float)Math.cos(y);
      float c3 = (float)Math.cos(x);
     
      float s1 = (float)Math.sin(z);
      float s2 = (float)Math.sin(y);
      float s3 = (float)Math.sin(x);
     
      Quaternion q = new Quaternion(
            s1*s2*c3 + c1*c2*s3,
            s1*c2*c3 + c1*s2*s3,
            c1*s2*c3 - s1*c2*s3,
            c1*c2*c3 - s1*s2*s3);

      if(q.w < 0){
         q.x = -q.x;
         q.y = -q.y;
         q.z = -q.z;
         q.w = -q.w;
      }
      return q;
   }
25  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-11-14 17:01:54
Yesterday I had a meeting with a professor at my school, who seemed quite impressed by my order-independent transparency technique. Of course, it turns out that it's already been implemented by someone else who mentioned it in a paper -___-, but at least no one has written a proper paper which focuses on this technique specifically. (It's like the time when I "invented" depth peeling all over again...) In any case, this looks like it'll make a quite good subject for my bachelor's thesis, and with some luck I might be able to get a short paper published to a conference or so.

Yay! Grin
26  Discussions / General Discussions / Re: what's up ? on: 2014-11-13 20:35:22
1  
2  
3  
vec4 up = projectionMatrix * (viewMatrix * vec4(0, 1, 0, 1));
//Don't forget your W-divide!
up /= up.w;
27  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-11-13 12:52:04
@Agent Here's the latest real crazy stuff in photo manipulation:

<a href="http://www.youtube.com/v/bMeBvrG9Uyo?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/bMeBvrG9Uyo?version=3&amp;hl=en_US&amp;start=</a>

Wow that's nuts.. how did they even do the ao and shadows plus fill in the background?
As far as I can tell, they didn't. They do estimate global illumination by analysing the lighting in the image, and depth or, more likely, they simply draw a depth map for the image manually. The chair, the origami and the car was never in the picture in the first place. It's just a more modern version of the graphics in the PS1 Final Fantasy games.
28  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-11-13 00:24:19
Crude, horizontal-only single-threaded version is working!

Click to Play



Version showing the pixels being removed: https://gfycat.com/GrouchySpryIriomotecat
For some reason this is really disturbing for me. I don't know, it's like it's magically doing stuff to the picture and just corrupting images and I feel like my eyes should be able to catch it but they can't... ;_;
29  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-11-11 20:38:29
What you plan to do with the algorithm? Write a paper from it? Keep it as secret? Share it? Its sounds very interesting and I can't wait to see how well its work on different use scenarios.
Since the algorithm has matured a lot and is now faster, has higher quality, uses less memory and is easier to implement than what I currently use in Insomnia (a layered version of WBOIT), I intend to implement into our engine to make sure that it looks as good as it does in my test program and to provide a more real-world example. Then I intend to write a proper paper on it, possibly with the help of someone from my university.
30  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-11-11 16:11:27
Update on my order-independent transparency algorithm.

I've been working on improving the quality and optimizing the algorithm. Today I found an opportunity to optimize the performance by almost 300%, making the algorithm an extremely good alternative to Weighted Blended Order-Independent Transparency. This performance optimization can also be applied dynamically, reducing quality when there is a massive amount of overdraw due to particles covering the whole screen, in which case the quality drop isn't noticeable.

Here's some numbers for full resolution 1080p rendering with 500 000 static particles. All these algorithms are GPU limited unless otherwise noted.

AlgorithmMemory usagePerformanceNotes
CPU sorted15.8 MB6 - 56 FPS (heavily CPU limited)Good quality, but too sharp depth ordering, causing popping when the order of two intersecting particles suddenly changes
Weighted Blended Order-Independent Transparency35.6 MB155 FPSVery bad. Either weak depth ordering (looks like an even blend regardless of depth), or heavy color bleeding when overlapping particles have a high depth difference. No perfect depth weight function.
Weighted Blended Order-Independent Transparency with 8 layers174.0 MB~69 FPS (estimate)Bad. Better depth ordering, but complex to implement and artifacts are only suppressed slightly. Not stable under translation. Used in Insomnia at the moment.
My OIT algorithm at low quality (2x)39.1 MB110 FPSBetter depth ordering compared to WBOIT, noticeably less color bleeding on overlapping particles. No popping when depth order changes.
My OIT algorithm at medium quality (4x)42.6 MB75 FPSSignificantly better depth ordering, significantly reduced color bleeding. No popping when depth order changes. Superior to CPU sorted particles.
My OIT algorithm at high quality (8x)49.7 MB44 FPSExtremely high quality depth ordering. No noticeable color bleeding. No popping when depth order changes. Superior to CPU sorted particles.

In Insomnia, I render all transparent geometry at half resolution (= 1/4th the pixel area), so expect performance to improve by 3-4x these values in a real game which renders at a half resolution. This test was also extremely stressful, with an average pixel overdraw of around 15-16. In other words, around 33 million pixels were filled. A large number of pixels were also overdrawn over 200 times, meaning that per-pixel linked lists and depth peeling would not be able to handle this scene correctly/with good performance.

How does that cube shot look when you have actually translucent and additive particles in mix? There must be something that you are not telling or yet discovered.
I did notice that the technique does require more memory/performance to be able to handle certain situations (hence the low-medium-high quality listing above), so that turned out to be false. Though, an advantage of this is that I can make a performance/quality trade-off if I want to, making the algorithm more adaptable. All my other claims still stand. Additive particles require a different shader to be rendered, but are also noticeably cheaper to draw when it comes to fill rate. I have yet to implement them, but the shader is essentially written in my head already.

EDIT: Oh, another unmentioned limitation: It cannot handle 100% opaque geometry. I currently have it limited to 99% opaque (= alpha 0.99).

EDIT2: It turns out that the optimization I wrote about not only quadruples my FPS, it also eliminates all remaining color bleeding, which I did not expect at all...
Pages: [1] 2 3 ... 90
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (36 views)
2014-12-15 09:26:44

Mr.CodeIt (29 views)
2014-12-14 19:50:38

BurntPizza (61 views)
2014-12-09 22:41:13

BurntPizza (98 views)
2014-12-08 04:46:31

JscottyBieshaar (58 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (76 views)
2014-11-29 21:32:03

toopeicgaming1999 (136 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36

toopeicgaming1999 (37 views)
2014-11-26 15:20:08
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

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
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!