Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (555)
Games in Android Showcase (148)
games submitted by our members
Games in WIP (601)
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 ... 23
1  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-26 11:06:40
Anyway, the point here was how the I stored the triangle ID in the first pass. I render and light the scene to a GL_RGBA16F render target, with accumulated light intensity stored in RGB and triangle ID stored in A, the alpha channel. During lighting, the shader only outputs an RGB color:
1  
out vec3 fragColor;

In this case, Nvidia's shader compiler set alpha to 0.0, and since I was using additive blending this left the triangle ID unmodified. AMD's compiler however set alpha to 1.0, which corrupted the triangle IDs completely, leaving my SRAA resolve shader utterly confused.

How about using color mask?
https://www.opengl.org/sdk/docs/man3/xhtml/glColorMask.xml
2  Game Development / Newbie & Debugging Questions / Re: shader not working on my machine on: 2015-02-23 00:06:13
Show the fragment shader code if you want some help with it?
3  Game Development / Newbie & Debugging Questions / Re: shader not working on my machine on: 2015-02-21 21:58:24
Now your shader compile fine. Rest of bugs are from render monkey.
4  Game Development / Newbie & Debugging Questions / Re: shader not working on my machine on: 2015-02-21 21:00:16
Why you are doing uniform transform matrix math manually per vertex? Build up one mat4 at cpu containing all transformations and concanate that with view projection.
5  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-21 18:52:10
I found some nice optimizations for bounds testing in shaders. Basically my motion blur was blurring over the edge of the screen, resulting in either black color if I used texelFetch() which gave a dark aura around the screen when in motion, or being clamped to the edge pixel if I used texture() which inflated the weights of the edge pixels. Neither of these looked very good, so I decided to simply remove the samples that fell outside the screen. However, detecting these scenarios was expensive.
...

Another idea. If my memory serves me right valid samples have alpha channel of 1.0 even if the texture does not have alpha channel but invalid texelFetch() results just zero to all channels. At least this is what you get with dx. https://msdn.microsoft.com/en-us/library/windows/desktop/bb509694%28v=vs.85%29.aspx

Another way to get this behavior is to use border color.

So with this behavior you can just simplify code as:
1  
samples += texel.a;
6  Java Game APIs & Engines / Java 2D / Re: 2D game engine. on: 2015-02-21 12:03:44
Suggesting noobies to use your own engine is as annoying and harmful than trying to convert people for your belief system.
7  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-19 19:58:56
Some correction in coloring and normal mapping. Currently I'm trying to figure out a rendering scheme that places the characters on top of the shadows, but still affects them with the lights. Hm...

Everything in that screenshot just screams DITHERING.
http://loopit.dk/banding_in_games.pdf
8  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-18 22:08:24
I coded a simple camera frustum to ground plane clipping algorithm. It does help a ton for calculating minimum shadow frusta.
Ground plane is calculated dynamically from minimal height of heightmap that intersect the current camera split per cascade.
Up to 2Millions triangle savings with improved effective resolution.
9  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-17 18:11:25
I found some nice optimizations for bounds testing in shaders. Basically my motion blur was blurring over the edge of the screen, resulting in either black color if I used texelFetch() which gave a dark aura around the screen when in motion, or being clamped to the edge pixel if I used texture() which inflated the weights of the edge pixels. Neither of these looked very good, so I decided to simply remove the samples that fell outside the screen. However, detecting these scenarios was expensive.
...

I have seen this kind of pattern multiple times. Its hlsl but maps well to hardware.
1  
2  
if (dot(1.0, saturate(texCoords) - texCoords) != 0.0)
  samples += 1.0;
10  Game Development / Performance Tuning / Re: Fast way to filter through data on: 2015-02-08 12:31:33
Sort is O(n log n). Which then enables O(log n) binary search method.
Check bounds is O(n).

It might also be possible to not inserting those values on list all together.


11  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-06 20:55:58
After seeing that rifleman picture I smiled happily that I live in country where every man goes to army.
12  Games Center / WIP games, tools & toy projects / Re: The Minecraft RPG on: 2015-02-06 20:52:57
I would drop the "Minecraft" from the name.
13  Game Development / Newbie & Debugging Questions / Re: How would you simplify a nested for loop? on: 2015-02-03 22:42:25
I'd argue cache trashing is much more expensive than branch mispredictions.

Sorting out the code so the biggest loop is inner loop usually also benefit the cache. But without specific use case its quite pointless to argue about it. But just like the code can be changed can be the memory layout.

14  Discussions / Miscellaneous Topics / Re: The joys of game dev in C++ on: 2015-02-03 19:55:57
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
Rectangle& rect = m_cRect;

// Somewhere in the header file
Rectangle m_cRect;

// Somewhere in the Rectangle.h file
Sprite m_Background;

// Somewhere in the Sprite.h file
Texture* m_pTexture;


The only pointer here is 'm_pTexture' as by its name Smiley

Naming conventions does not prove anything.

If this is a member function there is also [implicit this pointer]
http://www.tutorialspoint.com/cplusplus/cpp_this_pointer.htm
15  Game Development / Newbie & Debugging Questions / Re: How would you simplify a nested for loop? on: 2015-02-03 19:49:45
Without specific problem its hard to optimize anything. But in rule of thumb is to sort loops based on counts so you get big inner loop. So you get less amounts of looping start/end overhead and branch misspredictions.
16  Discussions / Miscellaneous Topics / Re: The joys of game dev in C++ on: 2015-02-03 00:11:11
In theory this could be possible but I highly doubt that this is the case now.
1  
Rectangle& rect = *ptr; // this might be null and leads to undefined behavior.
17  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-02-02 18:47:57
Computer operation started out as an extension of secretarial work, but computer science is something very different, which started out as something for maths and engineering graduates (i.e. mainly men). E.g. (Cambridge Mathematical Laboratory, 1948):

Recommended reading: http://www.npr.org/blogs/alltechconsidered/2014/10/06/345799830/the-forgotten-female-programmers-who-created-modern-tech

Even if I concede that you're right (which I'm not), I'm not sure what your point is.

Many manufacturing jobs started out as slave work. Just because "that's how it's always been" doesn't mean that's how it should continue to be.

This really raise question what was your first argument(started as feminine science) point?
18  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-30 09:32:17
Rewrote LibStruct to make it capable of addressing the full range of 64 bit address space.

Quite possibly the most complex code I've written to this day. Roll Eyes

Where we can see this as code?
19  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-01-30 09:31:09
http://www.reddit.com/r/programming/comments/2ffw1d/programming_becomes_part_of_finnish_primary/

Let see how this pans out.
20  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-01-29 20:57:35
It would be really helpful that all scientist(not just computer) could handle basic programming. They have huge data sets that they can't use for full potential.
21  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-01-29 18:32:27
Oh yea we do have cooking and martial arts clubs, but not part of the curriculum.

In Finland there are not really any culture for hobby clubs within school. That cooking class is mandatory. It's all about giving equal opportunities.
22  Discussions / General Discussions / Re: Are Game Publishers worth it? on: 2015-01-29 18:22:02
Well a publisher might advertise your game and make sure it sells better. Better exposure.
It's not really beneficial to publisher to advertise a mobile game. They would have to pay 100% of ad cost but they only get small percentage(20-30%) of profits. This is not a good deal at all. On freemium games they usually make deal that one who pay for the customers get to re-coup that money at first.

Publisher usually have solid contacts to press and platform holders which will help a bit but on other hand then your game is pretty faceless.
23  Game Development / Newbie & Debugging Questions / Re: Access violation with glDrawArrays on: 2015-01-28 21:46:25
For skinned models, I also batch up all the skeleton data into one MASSIVE VBO which is accessed as a texture buffer, which I can strongly recommend if you have data that is reused between vertices like skinning data.

Could you explain what data you refer when you say skeleton data?

In Hardland I make one big Buffer<float4> where I pack all data for all draw calls per frame. Then each instanced draw call just have to know start index and data size per instance. Then instancing work for skinned and any special meshes too.
24  Discussions / General Discussions / Re: Are Game Publishers worth it? on: 2015-01-28 21:27:35
If you have really good game just contact directly to Apple or Google. Their weekly featuring is a lot more extra visibility than any publisher can give you.
25  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-01-28 21:25:35
I would argue that this knowledge of "programming" (which is probably more accurately called "logic" and "problem solving") will actually **help** kids pick up other skills as they get older, not just programming!

thats pretty much the core question.
but that could be said for cooking or martial arts as well.
I do agree but school is pretty short and making a curriculum is tough.

In upper comprehensive school we have at Finland courses called "house keeping" which basically consist of teaching cooking and cleaning skills. It's super useful. At high school there are some amount of martial arts. Our teacher actually promised to give straight A if you can beat him at wrestling.
26  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-27 09:27:16
Got an ad for an "adult store" on JGO...

I have always thought that those ads are based on your web history.

https://support.google.com/ads/answer/1634057?hl=en
27  Java Game APIs & Engines / OpenGL Development / Re: Fill Ellipse from a fragment shader on: 2015-01-26 23:34:38
Don't use discard() directly. It's more flexible to simply output the alpha to the alpha channel and then do the rest using glEnable()s. Want fast but aliased result? Enable the alpha test. Want alpha-to-coverage? Just enable it. Want supersampling? Enable alpha test+sample shading. If you discard in the shader, you can't use it for alpha-to-coverage. Even discarding on alpha==0.0 is slower, as the if-statement is more expensive than the writing.
That would imply that gpu's still have special alpha test unit? Do they? Dx11 does not have alpha testing stage anymore which I have taken as hint that gpu's might have get rid of that too.
28  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-26 23:26:08
The red triangle is transparent (I think alpha=0.8 in that picture), but it doesn't look perfect just yet. I'm trying to figure out if it's possible to improve it a bit. I have a few tricks, but they all have their drawbacks.
Have you yet published paper from that technique. Looks absolute amazing.
29  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-01-26 20:50:05
Well, why aren't we teaching everyone plumbing, electronics, engine tuning, and astrophysics too, then?

What could the difference be between reading, writing, and 'rithmetic, and those other things, I wonder?

Cas Smiley
Only thing that we didn't have at school was plumbing. But that would had have been really useful skill for many times later on.
30  Game Development / Game Mechanics / Re: "Help" with RayCasting on: 2015-01-25 21:18:33
Can you show the updated code? How good is the performance?
Pages: [1] 2 3 ... 23
 
BurntPizza (22 views)
2015-02-27 06:09:35

BurntPizza (19 views)
2015-02-27 05:56:17

Riven (10 views)
2015-02-27 02:34:15

Riven (17 views)
2015-02-27 01:47:26

Riven (17 views)
2015-02-27 01:46:04

BurntPizza (12 views)
2015-02-27 00:52:04

BurntPizza (14 views)
2015-02-27 00:50:29

Riven (34 views)
2015-02-26 23:38:45

Riven (10 views)
2015-02-26 23:37:24

BurntPizza (29 views)
2015-02-26 21:13:04
How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

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
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!