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 (593)
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 ... 97
1  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-30 09:35:16
Quote
I have 50 bars in the bar diagram. I simulate 50 coin flips and if for example 27 of those are heads, I count +1 for bar number 27. That I repeat 1 million times (that takes about 2 secs, inefficient code, sorry).

Binomial Distribution p=.5, t=50

bitCount(gen.nextLong() >>> 14);
2  Discussions / General Discussions / Re: Anyone with knowledge on Cygwin? (+Shogun) on: 2015-01-30 09:23:33
Roquen, im not sure, it may be...

Riven, what are my options? MinGw instead?
If you were using GCC 3.x this problem wouldn't occur.  MinGw will have the same issue.  Depending on your perspective you could place the blame about anywhere.  Cygwin for using NewLib, GCC for changing behavior, the devs for their cmake script or option choices or for the fact that their using stdio in C++.  Undefining __STRICT_ANSI__ is a really ugly hack...but hey...if it works!
3  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-01-30 08:53:46
assignment in programming use the same = symbol but are quite different ideas, consider 'y = y+2', which makes no sense in maths but is perfectly acceptable in programming.
Depends on what field you're taking about.  It's obviously an invalid algebraic equality, but it's a perfectly valid map.  Sqrt[-1] is invalid for reals but perfectly valid in some other fields.

Quote
Pretty sure that's similar with all of STEM though. Maybe marginally worse in computer science.
CS has a problem WRT women.  Percentages peak in the late 80s and early 90s then rapidly dropped.  Don't believe that holds for other STEMs.  (saw a graph somewhere...trying to remember where).
4  Java Game APIs & Engines / OpenGL Development / Re: Rounded rectangles on: 2015-01-30 08:38:21
If you want to brute-force shade, then:

length(max(abs(p)-e, 0.0));          // square or box (3d)
length(max(abs(p)-e, 0.0)) - r;     // rounded square or box

where 'p' is the logical sampling position, 'e' is the bound (positive extent) and 'r' the radius for rounding.  p & b are vec2 and r is float.  Logically these are axe aligned and centered around the origin.  Vertex shader handles making it arbitrary...see that ellipse thread.  And really the 'length' can be dropped and you can use dot instead since you really care about the sign of the distance.

5  Discussions / General Discussions / Re: Anyone with knowledge on Cygwin? (+Shogun) on: 2015-01-29 19:30:21
The description sounds like a GCC (version) issue.
6  Game Development / Articles & tutorials / Re: Infographic: how to make interesting backgrounds with tiles on: 2015-01-27 08:49:53
This sub-board is for articles & tutorials and not links to them.

On topic:  for future reference - corner based wang tiling is much more interesting than edge based.
7  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-01-26 15:02:53
Somebody (Norway maybe) is going to stop teaching writing...only typing.
8  Java Game APIs & Engines / OpenGL Development / Re: Fill Ellipse from a fragment shader on: 2015-01-26 15:01:39
I'm not talking about fwidth squared:  (|dx|+|dy|)2  And like I said...the invisible pixels don't matter...you render behind and it's broken.  If the argument becomes performance then you have Pi ab vs. 4ab.  So ~79% of the time you're inside (and the compare and not taking discard hurts you) and the rest you've already performed all the work you're going to do and are only skipping on some writes.

NOTE: I said LInf when I meant L1 above.
9  Java Game APIs & Engines / OpenGL Development / Re: Fill Ellipse from a fragment shader on: 2015-01-26 08:39:29
In this case it's perfect fine.  The only problem would be if smoothstep didn't fullfill its contract.  To cover that hypothetical situation the compare really should be <= 0 rather than some ad-hoc constant.

But again, the discard doesn't buy you any quality.  In either case (with or without) if you render anything behind...it will be wrong.  The advantage of the bounding rectangle wrong is that it will be immediately obvious what the problem is.  The "jaggy" depth buffer wrong could take awhile to figure out...esp if it pops up at a much later date.  (aliased looking thing behind with a strangely colored edge of the forward).

On fwidth:  The problem is that it's a misleading function name.  You expect it to be L2 when it's in fact Linf.  Want you really want is some approximation of pixel coverage, for cheapish I'd go for (L2)2: dFdx2+dFdy2
10  Java Game APIs & Engines / OpenGL Development / Re: Fill Ellipse from a fragment shader on: 2015-01-25 19:42:38
fwidth was a bad idea for a function...we should all pretend like it doesn't exist.

discard on this type of AA isn't useful...has to be back to front anyway.
11  Java Game APIs & Engines / OpenGL Development / Re: Fill Ellipse from a fragment shader on: 2015-01-18 20:29:48
All the information is in the rectangle....didn't I say that already.  Wink
12  Java Game APIs & Engines / OpenGL Development / Re: Fill Ellipse from a fragment shader on: 2015-01-18 14:02:12
Sticking with brute force rendering...the orientation of the bounding rectangle gives you the rotation information.
13  Games Center / WIP games, tools & toy projects / Re: Synthclipse - GLSL demo development environment based on Eclipse IDE. on: 2015-01-17 11:44:55
Let me repeat that I'd be a good idea to package a JVM with the program.  Kills the previous issue and opens the program up to a much wider audience.  I'll leave to others to suggest the easiest route to do this.
14  Discussions / Miscellaneous Topics / Re: If OS==linux && isInstalled(Steam) --> ABORT! ABORT! on: 2015-01-16 18:05:10
user rookie mistake: script has permission to run
15  Discussions / Miscellaneous Topics / If OS==linux && isInstalled(Steam) --> ABORT! ABORT! on: 2015-01-16 13:03:48
https://github.com/ValveSoftware/steam-for-linux/issues/3671
16  Game Development / Newbie & Debugging Questions / Re: Up Vector calculation for matrices on: 2015-01-14 19:53:48
Use the dot product as the test value vs. some threshold instead.  The problem is in all approaching values.
17  Game Development / Game Mechanics / Re: Player cannot look straight up or down on: 2015-01-13 21:37:44
Didn't I just say the resources suck?  Wikipedia math pages tend to be too formal.  If you understand complex number then you can understand vectors and quaternions.  Quaternions are just complex numbers extended into 3 spatial dimensions. 
18  Game Development / Newbie & Debugging Questions / Re: Up Vector calculation for matrices on: 2015-01-13 19:24:54
Like I said.  There's an infinite number of solutions.  Until OP says what he wants...toss some out isn't really useful.  Or I'm not reading too good.
19  Game Development / Game Mechanics / Re: Player cannot look straight up or down on: 2015-01-13 19:22:38
Quaternions are straight forward.  It just the resources suck.
20  Game Development / Newbie & Debugging Questions / Re: Up Vector calculation for matrices on: 2015-01-13 15:10:42
Okay you have a direction and a point.  You don't need to think about the point since that's just the translation part.  So the question becomes what do you want?  You have a logically infinite number of choices to complete your basis so what's important?
21  Game Development / Newbie & Debugging Questions / Re: Procedural Generation on: 2015-01-13 10:00:33
Quote
... which is impossible ...
Not if you generate directly in 3D.
22  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-13 09:40:44
Still reading research papers:  http://cg.tuwien.ac.at/~zsolnai/gfx/separable-subsurface-scattering-with-activision-blizzard/

<a href="http://www.youtube.com/v/P0Tkr4HaIVk?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/P0Tkr4HaIVk?version=3&amp;hl=en_US&amp;start=</a>
23  Game Development / Newbie & Debugging Questions / Re: Up Vector calculation for matrices on: 2015-01-13 09:34:22
You'll have to clarify the question.  If a matrix represents simply rotation+translation, then the columns (or rows depending on your chosen convention) represent how this transformation is related to its parent. So like the pictured matrix you can direct extract the "directions" of that local coordinate frame.  (The dot product is a parallel projection operator).  So if the parent is "world" and then this matrix's x,y,z match some forward, up and right or left, again depending on the chosen convention.  Say right handed and Z  is up, X is right and Y is forward, then 0=right, 1=forward and 2=up...where the numbers are the row or column.  Is this your question?
24  Game Development / Game Mechanics / Re: Player cannot look straight up or down on: 2015-01-12 14:48:42
Since the OP isn't familiar with basic concepts of vectors...saying use quaternions isn't going to be very helpful.
25  Game Development / Game Mechanics / Re: Player cannot look straight up or down on: 2015-01-12 08:39:55
Visualize a line in the direction of up and a line in the direction of look, as those two lines approach one another there isn't enough information to compute a matrix from them.
26  Game Development / Game Mechanics / Re: Rotation around point other than origin on: 2015-01-12 06:35:20
This comes up very often. Translate to the point then rotate then translate back
This is stated backwards.  Translate the center of the rotation to the origin, rotate and then translate back to original:  p' = rot(p-c)+c.
27  Game Development / Game Mechanics / Re: Player cannot look straight up or down on: 2015-01-12 06:31:33
Haven't even glanced at your code.  But if you're generating a look direction then using a fixed up direction then attempting to generate a matrix via lookat is degenerate when look approaches up or -up since the cross product approaches zero. 
28  Game Development / Newbie & Debugging Questions / Re: 2D Perlin Noise Algorithm not working correctly on: 2015-01-09 22:16:37
The ranges you'll see depend on your choice of random vector generation.  And actually going all the way to [-1,1] isn't such a great idea as you're likely to get values that go outside of range due to compounding of errors if you combine samples.  You just want to know that the range actually is and deal with scaling outside of the core routine if you want to not hamper you're speed.
29  Game Development / Newbie & Debugging Questions / Re: 2D Perlin Noise Algorithm not working correctly on: 2015-01-07 09:36:15
From a quick glance...the lerp order isn't consistent.

EDIT: I suppose I should say more:  a left egde bottom-to-top, b = right edge top-to-bottom.  b = lerp(sy, w3, w2);
30  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-07 09:32:29
Thought:  stackable as an integer instead of a boolean.
Pages: [1] 2 3 ... 97
 

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 (21 views)
2015-01-29 04:26:08

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

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

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

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

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

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

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

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

basil_ (33 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!