Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (549)
Games in Android Showcase (139)
games submitted by our members
Games in WIP (594)
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 ... 22
1  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.
2  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.
3  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.
4  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
5  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.
6  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.
7  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.
8  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?
9  Game Development / Newbie & Debugging Questions / Re: java.awt.Point class in Android on: 2015-01-25 20:54:56
1  
2  
3  
4  
class Point
{
  int x, y;
}
10  Game Development / Game Mechanics / Re: "Help" with RayCasting on: 2015-01-25 19:53:36
Keep it simple and minimal. Box2dLights does not need collision normal so don't pretend that its needed. Also maybe whole call back business can be streamlined to more convenient style. Also lot of redudancy in code which usually tend to cause more bugs.

Like this one is just calculating these values second time.
1  
point.dst(start)/end.dst(start)


Also you need to calculate this outside of entity loop  float maxDst = end.dst(start); and only call  ray.reportRayFixture(entity, point, normal, point.dst(start)/end.dst(start)) if calculated fraction is smaller than previous ones. This is box2d behavior and box2dLights expect that kind caller logic.

Edit:
Also if you need masking you need to take callback return values(negative fraction value implies that that entity should't collide with the ray.

1  
2  
         if ((filterA != null) && !contactFilter(fixture))
            return -1;
11  Game Development / Game Mechanics / Re: "Help" with RayCasting on: 2015-01-25 17:50:21
Can those boxes rotate? Are they in uniform grid or can they move freely?
Easiest way is to just use bruteforce ray vs all objects test and choose always the collision that is nearest. Libgdx probably has segment vs box test that you can use.

1  
2  
3  
4  
5  
6  
7  
8  
public static void rayCast(Vector2 start, Vector2 tmpEnd)
{
  hitFraction = 1.0f
  for all boxes
    hitFraction = min(hitFraction, raySegmentVsBoxTest())

 tmpEnd = startPos + fraction * (tmpEnd - startPos)
}
12  Game Development / Newbie & Debugging Questions / Re: GLSL Tinting not working on: 2015-01-25 00:06:50
Break it down. If you output pure tint color does that work? Does only texture work?.
13  Java Game APIs & Engines / OpenGL Development / Re: Fill Ellipse from a fragment shader on: 2015-01-25 00:04:29
The shader version is beautiful at it simplicity.
14  Game Development / Newbie & Debugging Questions / Re: GLSL Tinting not working on: 2015-01-24 22:29:16
to fix what pitbuller said, you should either use
noperspective out tint
(VS) and
noperspective in tint
(FS) or just put
uniform vec4 in_Tint
into the FS directly. either way, the compiler out-smarts you anyway and does something thats even better. o/

It's not matter of performance but creating minimal test case so bugs can be tracked more easily because there are less parts that can go wrong. So tint color uniform should be read on pixel shader any other way is just adding unneeded bloat.
15  Game Development / Newbie & Debugging Questions / Re: GLSL Tinting not working on: 2015-01-24 20:28:45
Why do you read uniform value at vertex shader and then interpolate it to fragment shader? This is totally redudant use of code and ALU.
16  Game Development / Shared Code / Re: antialiased texels for nearest-filter type textures. on: 2015-01-19 00:45:52
How does it look with moving content?
17  Java Game APIs & Engines / OpenGL Development / Re: Fill Ellipse from a fragment shader on: 2015-01-18 19:42:59
With modern GPU's I doubt that nothing beats pixel shader variant in speed for dynamics ellipses. If you try to use a lot of triangles you end up with badly shaped thin/small triangles that are not efficient to rasterize. Baking shape to texture does not work well for small or really big shapes.(you also need special distance texture instead of pure shape. With alpha test like shader.). Also nothing can beat analytical anti-aliasing.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
void checkFragment() {
   /**
    * Ellipse equation =  (x/a)2 + (y/b)2 = 1
    *     a = horizontal radius
    *     b = vertical   radius
    */

   
    vec2 e =  ( v_texCoord - 0.5 ) * u_invRadius.xy; // can be moved to vert shader.
   
    float d  = dot(e, e);
    if( d > 1.0 ) {
       outputColor = vec4(1.0 , 0.0 , 0.0 , 1.0 ); // discard;
    }    
}


So optimized code is just one vec2 dot operation and logic for handling what to do with the result.
18  Java Game APIs & Engines / OpenGL Development / Re: Fill Ellipse from a fragment shader on: 2015-01-18 18:21:33
The easiest way to do this in a fragment shader is to NOT rely on gl_FragCoord. If you rotate the coordinates, the result stays the same. A better idea is to assign "texture" coordinates to each corner and have the shader rely on those instead, since those coordinates will be and interpolated correctly after rotation.

Another way would be to use rotated ellipse equation but that would be just nuts. http://www.maa.org/external_archive/joma/Volume8/Kalman/General.html
19  Games Center / WIP games, tools & toy projects / Re: Bit Siege - 2D Competitive Multiplayer PvP Game. (Patch v1.3.1 out now!) on: 2015-01-17 21:16:46
Question:
Why would the fps increase cpu usage? unless its not hardware accelerated.

Even with hardware acceleration it would increase cpu usage by big margin.
20  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-17 14:45:34
Current in Game Screen:


I'm not good with Shaders (SSAO and Point Light per Pixel would be nice) so for now the ingame screen looks a bit crappy and for now i'm working on the server stuff so it won't change much, but after that i guess i'll try improve the graphics Smiley

Bake voxel ao to vertices. Its easy and cheap. Try to add some color/density variation to fog based on altitude, sun/view angle, distance. Some easy ideas there. http://www.iquilezles.org/www/articles/fog/fog.htm
21  Java Game APIs & Engines / OpenGL Development / Re: OpenGL multiple shaders nonsense! on: 2015-01-14 21:08:31
Wow, if register allocation is not completely wrongly and suboptimally implemented, then I would say no, as that register is likely to be reused by code later (or earlier) if the same register was also allocated for other variables.
But this is an assumption that I make about the LLVM register allocator!
So, unless you only have a single value in your code, which is your condition, that needs a register, then yes.
But then your simple shader will also not be a performance issue. Smiley

Registers are reused but the max amount matter. If you don't have the knowledge why you do that kind of guessing?  You can actually see the register usage(and lot of other things) with this tool http://developer.amd.com/tools-and-sdks/graphics-development/gpu-shaderanalyzer/

Just tested this with skinning shader. Uniform brach over skinning still used all 27GPR but without the skinning code its used only 3GPR. This is real and documented issue.

http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2013/05/GCNPerformanceTweets.pdf
http://bartwronski.files.wordpress.com/2014/03/ac4_gdc_notes.pdf (from page 59.)
22  Java Game APIs & Engines / OpenGL Development / Re: OpenGL multiple shaders nonsense! on: 2015-01-14 19:17:03
SHC's solution is actually the easiest option and will be just as fast, as that conditional will not be any issue thanks to useTexture being a bool/int (SHC.... it should not be a float).

Uniform branchin is not free. Conditional is usually not a problem but the register pressure. Compiler has to allocate registers for worst case scenario and this will reduce how many wavefronts can be run parallel. On current gen consoles this is the main bottleneck. On nvidia this isn't that big issue thought.
23  Java Game APIs & Engines / OpenGL Development / Re: OpenGL multiple shaders nonsense! on: 2015-01-13 00:22:07
Actual well performing solution to use uber shaders with #if and defs. Transform feedback is definitely not for this. Also no one is actually using subroutines either for performance reasons.
24  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-10 20:39:18
Yes it is inspired on mini ninjas but you can see its diferent Cheesy
Adding one yellow button to chest does not make it your own art. Shame.
25  Discussions / General Discussions / Re: 3D model search engine on: 2015-01-09 23:20:48
Now you are just are complaining for sake of it.
Maybe my explanation wasn't clear. I was thinking about Ed_RockStarGuy's comment. Those numerous models are very useful for a blueprint or even for a real game if they exactly fit into the need of the developer but imagine that you create a first person shooter and you start using lots of models from Open Arena. If you want to tell your own story with your own characters, the models of Open Arena are a nice source of inspiration but the skills required to edit them are close to the skills required to make your own models from scratch. I admit that my sentence that you quoted might sound silly as it is obvious that you can't find the models that you would have created if you could do so. I think that I made a mistake in 2009, I didn't imagine that I would have to learn to use Blender because I thought that I would be satisfied with slightly modified models but the only well animated model that I use looks like a ripoff of Quake 2.

As a conclusion, I mean that those models are a lot better than simple placeholders, they are helpful but at some point you'll have to learn to use a modeler or to ask for help. You can find some models that can be used as is but I'm skeptical about making a game exclusively with them.

Agree. I would only use those models as placeholders. But actual models are lot better than abstract shapes. At work we have been using crude "voxel" models for prototyping made with Cubicle Constructor. These models can be made in minutes. http://www.qubicle-constructor.com/

Year old screenshot to demonstrate the usage.
https://twitter.com/minigore/status/553278388065296384
26  Java Game APIs & Engines / OpenGL Development / Re: Cube-Map Shadow Mapping on: 2015-01-09 19:22:48
For shadow mapping you don't need any pixel shader. You just render to hardware depth buffer and use that as depth texture. You do not want distance to camera but the unmodified depth.
27  Discussions / General Discussions / Re: 3D model search engine on: 2015-01-09 19:18:30
    • If you want to have original models, you'll have to modify existing ones if you can't make them from scratch, it requires some modeling skills.

    Now you are just are complaining for sake of it.
    28  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-06 20:34:57
    I started recording videos instead of GIFs so that I can show off better  Roll Eyes

    Note: This is my PERSONAL game dev suite for a game that I will be starting soon.

    Details about it will be shared soonish.

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

    Have you tried using some image editor with height map hotloading to engine? It's quite daunting task to do all nice and usefull features with all ui candy that photoshop/gimp have for image editing.
    29  Discussions / General Discussions / Re: New rules regarding Game Engine topics on: 2015-01-05 23:34:33
    Forum should not be devblog for something that is never going to end up anywhere.
    30  Game Development / Game Mechanics / Re: Concurrency problem in entity updates on: 2015-01-05 21:14:48
    Simple solution is not do do mmorpg's.
    Pages: [1] 2 3 ... 22
     

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

    The first screenshot will be displayed as a thumbnail.

    Archive (12 views)
    2015-01-29 04:26:08

    theagentd (16 views)
    2015-01-28 15:33:52

    GamerIDGoesHere (25 views)
    2015-01-27 01:23:23

    GamerIDGoesHere (24 views)
    2015-01-27 01:22:15

    CopyableCougar4 (33 views)
    2015-01-27 00:34:41

    CopyableCougar4 (20 views)
    2015-01-26 04:47:56

    Olo (15 views)
    2015-01-25 21:26:00

    Olo (18 views)
    2015-01-25 18:44:22

    Robo11 (36 views)
    2015-01-25 06:14:26

    basil_ (30 views)
    2015-01-17 22:29:32
    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

    Resources for WIP games
    by CogWheelz
    2014-08-01 16:20:17
    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!