Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (636)
Games in Android Showcase (178)
games submitted by our members
Games in WIP (687)
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 ... 105
1  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-11-27 18:41:51

I live by the sea. I wake up everyday, and I can see the ocean. I frequently sail. I love the sea.
But every time I play a game set near an ocean, I get frustrated that whomever developed said ocean seems to live in a totally landlocked country because its always just some big blue slightly-transparent wobbly thing, not a large nautical mass.

Ant then there's your screenshots.
Well.. damn son.

Next time I wake up and see the sun hitting the waves, I'm going to be thinking of your game Smiley
Wow, thank you so much! I'm really happy with the preliminary results too! Grin Hopefully I can make this run well even on toasters with the same quality while also adding better sky reflections, and that'll hopefully improve it even more. =3
2  Discussions / Miscellaneous Topics / Re: How to disable the DOTA game on my LAN? on: 2015-11-27 18:39:26
While I can agree that trying to understand what he's doing more by playing with him could be a good idea, that may not be easy when it comes to Dota. Games like Dota, LoL and HoN all have relatively steep learning curves and rather toxic communities (in the sense that people often flame each other). There's a reason why MOBAs are said to destroy lots of friendships. xd That being said, they can still be wonderful if played with the right people. I have some very fond memories of playing with friends, both IRL and those that I've met online, and I even met my girlfriend through people I have gotten to know through LoL.

What I want to say is that it's a difficult situation. A compromise could be looking up some streams/commentators on various DotA tournament games and possibly asking your brother to watch them with you. That way you may be able to understand the game more and reconnect with him without having to spend half your life getting to his DotA playing level. If your brother is into watching those games then that could be a better way to start.
3  Game Development / Game Mechanics / Re: LWJGL 2D Lighting & Shadows on: 2015-11-27 18:28:54
A simple improvement is to render the shadow map at a reduced resolution and then blur it. That'll have higher quality while also being faster as you'll get a higher blur radius for the same blur kernel. If however you have no experience with shaders or framebuffer objects, this will probably be a bit tricky to implement. Still, a blurring shader is quite easy to write, especially a fullscreen one.

Hmm, it might be easier for you to just try to follow this tutorial instead: I think they have the effect you're looking for:

Click to Play

The trick here is to only have convex polygon objects and extruding the faces facing away from the light, which leaves the occluder lit while occluding everything behind it.
4  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-11-27 04:57:50
I coded an ocean today based on this: Okay, I lied, it took me like 4 days.

I came up with a really nice seamless LOD transition system. Here you can see the wireframe which shows the smooth transitions, very similar to how hardware tessellation "fades in" more triangles.

Here's a picture showing the seamless LOD transitions enabled only on the right side of the screen. The left side shows the raw mesh drawn using glDrawElementsInstanced().

I still have to tweak the colors a bit, and the sky box reflections at high view angles are currently faked with a single color. I plan on using a low-res real-time generated cube map of the dynamic sky to properly reflect the sky (even the stars!). A cool thing is that the lighting is completely automatic and simply appeared automatically when I enabled a light. I really like the specular reflections. The biggest problem right now is performance. I simply copy-pasted the procedural noise the ShaderToy shader used, which is inefficient as hell. The fragment shader is almost 5000 instructions right now, completely crazy. The next step will be optimizing it by precomputing the noise into a 2D lookup texture, which will replace ~4600 instructions with 12 texture lookups, possibly less.
5  Game Development / Game Mechanics / Re: LWJGL 2D Lighting & Shadows on: 2015-11-26 23:57:39
You could blur the generated "shadow map" a lot. That'd cause the light to bleed over edges and light the shadow casters as well. I think that's what the image you showed as an example does.
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-11-26 22:01:03
We won the Taco Bell thing too with We Shall Wake.
7  Discussions / Miscellaneous Topics / Re: How to disable the DOTA game on my LAN? on: 2015-11-26 15:34:29
He won't stop playing Dota unless he wants to stop. It's the same with any addiction. You don't hide the alcohol to stop an alcoholic from drinking because they will just get it in some other way. If you technically block the game he will just see you as an enemy making it even harder to reach him.
8  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-11-20 15:31:51
After 400 years of death robots roaming around and not giving a f*ck, I doubt those flood defences will hold. =P
9  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-11-18 16:25:10
There should only be 12 pentagons. 2 at the poles and 5 around each tropical line. =P
10  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-11-15 02:53:32
I beat Dungeon Crawl: Stone Soup for the first time................... after something like 3 years and hundreds of characters.
11  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-11-11 15:26:58
Protip: use GL_R11F_G11F_B10F as texture format for bloom. The precision is almost the same, you just lose the sign bit and a small amount of precision while halving the bandwidth cost and memory usage. GL_RGB16F is padded to GL_RGBA16F, i.e. 64 bits while GL_R11F_G11F_B10F is 32 bits.

EDIT: I see no horizontal streak in the video you posted. I'm also not entirely sure how the "ring" works from the video...
12  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-11-11 10:32:51
uploaded yet another random youtube. figured, i could just reuse the bloom mask for lens flares. turns out it's very cheap.

good enough when used subtle Smiley
Hmm, you wouldn't have some shader source code for that? =P
13  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-11-08 05:25:39
Kept working on my distance field font generation. I ended up using the same packing algorithm as for my shadow map packing, where I use it to pack small shadow maps into one big shadow map to avoid FBO switches for every shadow map and allow better batching. It worked really well for fonts too!

Some sample output:
Total area: 170083
New best: 2048x96 (196608, 13.491315% wasted space)
New best: 2044x96 (196224, 13.32202% wasted space)
New best: 2040x96 (195840, 13.152063% wasted space)
New best: 2036x96 (195456, 12.981439% wasted space)
New best: 2032x96 (195072, 12.810141% wasted space)
New best: 2028x96 (194688, 12.638169% wasted space)
New best: 2024x96 (194304, 12.465519% wasted space)
New best: 1940x100 (194000, 12.32835% wasted space)
New best: 1936x100 (193600, 12.147212% wasted space)
New best: 1932x100 (193200, 11.9653225% wasted space)
New best: 1928x100 (192800, 11.782676% wasted space)
New best: 1924x100 (192400, 11.599273% wasted space)
New best: 1920x100 (192000, 11.415106% wasted space)
New best: 1916x100 (191600, 11.230165% wasted space)
New best: 1912x100 (191200, 11.044455% wasted space)
New best: 1908x100 (190800, 10.857964% wasted space)
New best: 1904x100 (190400, 10.6706915% wasted space)
New best: 1900x100 (190000, 10.482634% wasted space)
New best: 1896x100 (189600, 10.293776% wasted space)
New best: 1892x100 (189200, 10.10412% wasted space)
New best: 1888x100 (188800, 9.913665% wasted space)
New best: 1240x152 (188480, 9.760719% wasted space)
New best: 1120x168 (188160, 9.607249% wasted space)
New best: 1116x168 (187488, 9.283262% wasted space)
New best: 732x256 (187392, 9.236789% wasted space)
New best: 656x284 (186304, 8.706737% wasted space)
New best: 652x284 (185168, 8.146656% wasted space)
New best: 436x424 (184864, 7.9956055% wasted space)
New best: 420x440 (184800, 7.963747% wasted space)
New best: 416x440 (183040, 7.0787787% wasted space)
New best: 392x464 (181888, 6.49026% wasted space)
New best: 380x476 (180880, 5.9691486% wasted space)
New best: 356x508 (180848, 5.952513% wasted space)
New best: 352x508 (178816, 4.88379% wasted space)
New best: 292x612 (178704, 4.8241796% wasted space)
New best: 284x628 (178352, 4.6363354% wasted space)
New best: 268x664 (177952, 4.421979% wasted space)
New best: 260x680 (176800, 3.799206% wasted space)
New best: 240x736 (176640, 3.71207% wasted space)
New best: 104x1696 (176384, 3.572321% wasted space)
Packing results: 104x1696 (176384, 3.572321% wasted space)

The cool thing is that I've had to optimize my packer so much for use every frame on hundreds of shadow maps that packing a few fonts together repeatedly is no problem. Finding the best resolution to pack in takes less than a second.
14  Java Game APIs & Engines / OpenGL Development / Re: Vulkan release imminent?! on: 2015-11-08 04:03:14
Just signed up for LunarG announcements. Must've missed those, thanks for the info!
15  Java Game APIs & Engines / OpenGL Development / Vulkan release imminent?! on: 2015-11-07 18:25:55
Looks like Nvidia accidentally released a buggy Vulkan branch of their driver to Windows Update and quickly pulled it again. It contained a file called nv-vk32.dll which seems to contain (some?) Vulkan functions, hinting at an imminent release of Vulkan. Since they promised it before the end of the year, it's pretty exciting! It's happening!!! *flashing lights*

16  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-11-06 17:46:53
Hmm, the "Insert Quote" buttons aren't working on Chrome...


I'm not treating sharp edges any different... Each pixel is classified as either "inside" or "outside" based on its color (threshold 0.5). I then do a brute force search for the closest pixel that is on the other side and calculate the distance. To improve quality, I've implemented a smart supersampling system. It doesn't just compute the distance field at a higher resolution and downsamples it; it simply takes more bilinear samples from the input image. If I want, I can reduce the sample step size so that each pixel is sampled 4x4 times to more accurately detect the antialiased edge in the image. The thing is that the algorithm only processes once per pixel, so there's no actual downsampling at the end. It's possible that this increases the corner quality a lot.

Here's an album with different step sizes:
The sizes are 1.0, 0.5, 0.25 and 0.125, or equivalent in quality to 1x1, 2x2, 4x4 and 8x8 supersampling.

EDIT: Hmm, looks like my input image isn't perfect. It has a subtle grayness to the font. I'll be making a font texture generator soon, so hopefully it'll work perfectly on that at least. Stay tuned (or not =P).

17  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-11-06 03:49:36
Wrote a brute force distance field generator for use on fonts.



18  Java Game APIs & Engines / OpenGL Development / Re: Confused about glActiveTexture(). on: 2015-10-30 23:03:09
It is valid. You may have an incomplete texture (mipmap filtering enabled but no mipmaps) for example which would result in black.
19  Game Development / Game Play & Game Design / Re: Anti Aimbot?? on: 2015-10-23 20:44:13
Not without extensive and intrusive checking of the computer. If you inject your own OpenGL .dll into the game you can figure out the XYZ positions of each player from their draw calls. It's then just a matter of sending mouse input to aim at the enemy players. None of this is easily detectable.
20  Games Center / Cube World Projects / Re: Need ways to optimize rendering - Beginner here on: 2015-10-22 22:11:17
Where are your vertex attributes uploaded? I don't see you actually uploading position data for the cube faces?
21  Game Development / Artificial Intelligence / Re: Hidden Markov Models, how to train using Baum-Welch? on: 2015-10-19 19:44:53
I think I managed to figure it out. My calculation of the next emission probability was most definitely faulty, and I managed to work around the NaN problem.

The overfitting (?) problem I solved by adding a small amount of noise to all the matrices before retraining after a new emission comes in to make sure that it can adapt to the new information. The problem seemed to occur when some matrix elements turned up to 0, at which point one of the values which wasn't checked for a division by 0 ended up being infinity, etc. The random noise helped avoid this 100%.

It turns out that the correct way of calculating the next emission is not as I described it in my previous post. You're supposed to calculate the state probabilities and multiply that by the emission (B) matrix to get the probability of each emission. The state probabilities is calculated in Baum-Welch (the forward pass) so I adapted the code for that. I now get around ~60% accuracy, which at least makes it worth using.

The score I'm getting should be more than enough for a pass at least.
22  Discussions / General Discussions / Re: Making Games for Nobody on: 2015-10-19 13:28:42
Roquen makes a good point. Being based with a good idea in the first place is the best solution.
23  Game Development / Artificial Intelligence / Hidden Markov Models, how to train using Baum-Welch? on: 2015-10-18 05:08:15
TL;DR: My uni is messing up my life with a horribly disorganized AI class with unhelpful teachers. Just want some confirmation that I'm on the right track. See my questions at the end.

I've been really busy with school lately due to my AI class wrapping up. The class is a clusterf*ck. The online resources are lacking at best and some of the teachers are the worst kind. One of them was asked a question about a project assignment and responded with "I wrote that project description and frankly I'm offended by that question." and then ignored the student. The same teacher forced me to come in to school on a day I had no classes on just so he would believe that I didn't get a mail with some instructions.

Our final assignment is to write a automatic player for a small game they designed. In addition to being vastly undocumented and using very confusing concepts (objects move in directions but don't have positions, what?), the entire assignment reeks of "use this screwdriver to hammer in this nail", as the assignment can be solved much more easily using Markov chains, but no, we have to use Hidden Markov Models. So here I am sitting with a completely undocumented HMM implementation they've supplied, a half described game concept and a VERY high-level explanation of HMMs and the Baum-Welch algorithm. It's not entirely about game development, but since this is technically a game AI and I REALLY just want this class to be over I'm asking here anyway.

The entire problem is taking in a stream of emissions/observations and predicting the next emission. The underlying states are irrelevant. A correct guest ends the game and gives you 1 point, while every wrong guess makes you lose 1 point (you don't have to guess if you're not certain). So I basically have a stream of emissions that I want to train my HMM with and calculate a probability distribution for the next emission. In addition, the code skeleton we're forced to use is not compatible with a debugger, hell, with a frigging IDE, so debugging is a huge mess. I have two questions:

 - Baum-Welch seems to suck. If I repeatedly train my HMM with the entire sequence of emissions/observations, it eventually explodes into a HMM filled with 0s. The scarce information I've found says that this is due to overfitting. The Baum-Welch implementation was supplied by them, and despite other people complaining about the same problem, the teachers insist that we're "using it wrong" (again, completely undocumented). What is the optimal way of training an HMM given a stream of data?

 - Given the sequence of emissions [a, b, c], to calculate the probability of each possible next emission I compute the probability of the emission [a, b, c] occurring given the current HMM state and then the probabilities of [a, b, c, <X>] occurring, where X is each possible emission. The conditional probability of each emission is then
p([a, b, c, <X>]) / p([a, b, c])
Is this the correct way of calculating the probability of the next emission?

24  Game Development / Shared Code / Re: Extremely Fast sine/cosine on: 2015-10-08 03:00:11
Aha, that explains it! Yes, this is more in line with what I expected. Thank you.

I found a bug in my implementation. To floor the index, I simply do (int)index. This produces wrong results for negative angles. A correct implementation should use (float)Math.floor(index) instead.

I also found an optimization:
sin1 + (sin2 - sin1) * alpha
is faster than the original
alpha * sin1 + (1 - alpha) * sin2
by a solid 10-15%.

My full code:

   private static final int SIN_BITS, SIN_MASK, SIN_COUNT;
   private static final float radToIndex, cosOffset;
   public static final float[] sin;
   static {
      SIN_BITS = 9;
      SIN_MASK = ~(-1 << SIN_BITS);
      SIN_COUNT = SIN_MASK + 1;
      float radFull = (float) (Math.PI * 2.0);
      radToIndex = SIN_COUNT / radFull;
      cosOffset = (float)(Math.PI / 2);
      sin = new float[SIN_COUNT+1];
      for (int i = 0; i <= SIN_COUNT; i++) {
         sin[i] = (float) Math.sin(Math.PI * 2 * i / SIN_COUNT);
   public static final float sin(float rad) {
      float index = rad * radToIndex;
      //float floor = (float)Math.floor(index); //Correct
      float floor = (int)index;                 //Fast, only for positive angles
      float alpha = index - floor;
      int i = (int)(index) & SIN_MASK;
      float sin1 = sin[i+0];
      float sin2 = sin[i+1];
      return sin1 + (sin2 - sin1) * alpha;
   public static final float cos(float rad) {
      return sin(rad + cosOffset);
25  Game Development / Shared Code / Re: Extremely Fast sine/cosine on: 2015-10-08 01:42:07
Interesting. I wasn't expecting mine to beat the SOA. Are you sure you're not getting an unrealistic amount of compound error?
26  Game Development / Shared Code / Re: Extremely Fast sine/cosine on: 2015-10-08 01:31:12
Right. What about precision? What's the accuracy of those methods? It'd be interesting to see the performance/quality tradeoffs they make.
27  Game Development / Shared Code / Re: Extremely Fast sine/cosine on: 2015-10-08 01:27:59
What does "Score error" mean?
28  Game Development / Shared Code / Re: Extremely Fast sine/cosine on: 2015-10-07 22:15:51
Disclaimer: I saw high variance between runs, which I attribute to CPU thermal throttling. Had to let the laptop cool down a bit before getting consistent results. This might be affecting you too.

Use ThrottleStop. It saved me when my computer was throttling during games. You can even underclock your computer with it to get consistent results.
29  Game Development / Shared Code / Re: Extremely Fast sine/cosine on: 2015-10-06 12:10:14
..the worst possible professors at my uni...
They're paid to help you.  Any time I type in information here I'm putting my hand in my pocket and throwing cash out the window the entire time I'm typing.  Seems pretty understandable that my willingness to do so is rather limited.
Wow, I didn't even see this until now. Is that a joke? I'm being serious. What do you even think the purpose of this forum is?

I use and enjoy this forum for a number of reasons. People make interesting things that inspire me. I can post about think I've coded that I'm proud of and get feedback and acknowledgement from people who actually understand and appreciate what I'm doing, which is a rarity IRL for me. I learn new things about math, HotSpot, LWJGL and uncountable other things all the time here. I can follow and discuss the development of things I admire or personally care about. Even just explaining things to others helps me get a better grasp of those concepts myself.

That being said, how do your posts fit into that? Although you seem to want to help, your answers are too brief and unexplained to help much without a direct neural link to your brain. Your explanations are like a summary of your knowledge that only someone with similar knowledge already would understand. What annoys me the most is that you just literally told me that your time is extremely valuable, yet you expect every single person who read (and actually want to understand) your comments to spend a significant amount of time Googling to decode your posts.

I think it's sad, because if you're half as knowledgeable as you claim seem to be then I have lots to learn from you. I may not be interested in learning everything (AKA advanced quaternion math), but we often comment in the same threads which means our interests do overlap. IMO the main point of this forum is sharing knowledge. Maybe you don't think that you're "receiving" as much as you're "giving" to this forum since you already know a lot, but there are lots of other points that even it out IMO. It's not a zero-sum game.

Sorry for the off-topic post...

EDIT: claim ---> seem
30  Java Game APIs & Engines / OpenGL Development / Re: Global Illumination via Voxel Cone Tracing in LWJGL on: 2015-10-06 11:35:37
No update? =<
Pages: [1] 2 3 ... 105
Dwinin (71 views)
2015-11-07 13:29:08

Rems19 (80 views)
2015-10-31 01:36:56

Rems19 (74 views)
2015-10-31 01:32:37

williamwoles (106 views)
2015-10-23 10:42:59

williamwoles (92 views)
2015-10-23 10:42:45

Jervac_ (106 views)
2015-10-18 23:29:12

DarkCart (134 views)
2015-10-16 00:58:11

KaiHH (116 views)
2015-10-11 14:10:14

KaiHH (156 views)
2015-10-11 13:26:18

BurntPizza (171 views)
2015-10-08 03:11:46
Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30

Rendering resources
by Roquen
2015-10-15 07:40:48

Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11 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!