Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
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 ... 19
1  Game Development / Newbie & Debugging Questions / Re: Libgdx Android Crash Interact_across_users_full! on: 2014-08-01 12:03:16
Going by the error you get, leaving out code will make no difference. The error relates to an attempt to run the app with the wrong user.
2  Game Development / Newbie & Debugging Questions / Re: Libgdx Android Crash Interact_across_users_full! on: 2014-07-31 22:39:16
Hmmm, perhaps a mismatch between eclipse and the phone? The IDE tries to start the app under one user but another user is logged in on the phone...?

I use AIDE not Eclipse however, so I am just apeculating.
3  Discussions / General Discussions / Re: Mobile Version of Forum on: 2014-07-30 23:38:05
Site works fine on my 7 inch tablet. The only problem I have is image rich threads that can overwhelm my browser. For that I would like an option to display images as links not as actual graphics. That would help with toxic sections like the WIP board.
4  Games Center / WIP games, tools & toy projects / Re: Jumproom on: 2014-07-30 23:31:57
Testing is for end-users :-)
5  Games Center / WIP games, tools & toy projects / Re: Jumproom on: 2014-07-30 20:26:12
What was wrong?
6  Games Center / WIP games, tools & toy projects / Re: [Slick2d] Retro-Pixel Castles > Now on IndieDB! < on: 2014-07-27 21:50:03
Nice lumber mill. To be honest, I would be more interested in the game if survival was possible... I get very emotionally involved with my villagers :-) Can I give them names?
7  Games Center / WIP games, tools & toy projects / Re: WIP Publication Reel on: 2014-07-25 22:42:11
 have been working on a word puzzle game...

8  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-07-25 19:38:52
Refactored my dictionary loading code.
9  Discussions / General Discussions / Re: dalvik, you suck on: 2014-07-22 22:23:17
I do too in IntelliJ, but I am using AIDE at the moment, it is not quite as richly featured.
10  Discussions / General Discussions / Re: dalvik, you suck on: 2014-07-22 22:18:08
Ah....

Dalvik, I suck  Cry
11  Discussions / General Discussions / Re: dalvik, you suck on: 2014-07-22 22:16:47
I'm not looping through the collection... Wrapping the int in an Integer fixes the issue.

Edit: replying to pandemoniumhun, but Riven has the answer.
12  Discussions / General Discussions / dalvik, you suck on: 2014-07-22 21:57:15
This will crash:

1  
2  
3  
4  
if (isBonus.contains(v)) {
   isBonus.remove(new Integer(v));
   lpb.getBackground().setColorFilter(Color.WHITE, PorterDuff.Mode.MULTIPLY);
}


Where v is an int. Contains(int) is fine, but remove(int) aint.
13  Game Development / Newbie & Debugging Questions / Re: XMLUnmarshalling attribut linebreak ? on: 2014-07-18 12:36:59
You could do it with SAX. I guess JAXB is treating whitespace differences as nonsignificant, which would be always wrong in a text node.
14  Java Game APIs & Engines / OpenGL Development / Re: Shader not rendering correctly on: 2014-07-18 12:17:53
I introduced that small difference to ensure the compiler didn't optimize out the duplicate. Since then I optimised the function like this:


vec4 float getColorWave(in vec4 wave, in vec3 coord, in vec4 vcolor) {
   vec4 newColor = vec4(0.1, 0.2, 0.4, 1.0);
   vec4 white = vec4(1, 1, 1, 1);

   float distance = distance(coord.xy, wave.xy);
   float wave1 = abs(distance - wave.z);
   wave1 = return clamp(wave1, 0.0, 25.0);  
   wave1 = (25.0 - wave1) / 35.0;
   vec4 color = mix(vcolor, white, newColor.rrra);
   color = mix(vcolor, color, wave1);
   return color;

}


So all the color processing is only done once in main()... which gets me 5fps more on my tablet, but which also means the two functions really are identical now.

I have it working now - I call the duplicate function, discard its results then call the real function and it all works ok.
15  Java Game APIs & Engines / OpenGL Development / Re: Shader not rendering correctly on: 2014-07-17 08:47:36
I changed to max() only to see if that had an effect, before that I was doing another mix(). There is no difference between the two versions, they both show the flash to edge bug.

EDIT: It is definitely a bug in my Asus Memo Pad HD GPU. simply duplicating the function changes the behavior (the copied function behaves correctly)... In this I cut it down to two ripples, with a duplicate function only one has the flash bug.

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  
44  
45  
46  
47  
48  
49  
precision mediump float;

uniform vec4 u_Wave0;
uniform vec4 u_Wave1;
uniform vec4 u_Wave2;
uniform vec4 u_Wave3;

varying vec3 v_Position;
varying vec4 v_Color;

vec4 getColor(in vec4 wave, in vec3 coord, in vec4 vcolor) {
   vec4 newColor = vec4(0.1, 0.2, 0.4, 1.0);
   vec4 white = vec4(1, 1, 1, 1);
   float distance = distance(coord.xy, wave.xy);
   float wave1 = abs(distance - wave.z);
   wave1 = clamp(wave1, 0.0, 25.0);  
   wave1 = (25.0 - wave1) / 35.0;
   vec4 color = mix(vcolor, white, newColor.rrra);
   color = mix(vcolor, color, wave1);
   return color;
}

vec4 getColorD(in vec4 wave, in vec3 coord, in vec4 vcolor) {
   vec4 newColor = vec4(0.1, 0.2, 0.4, 1.0);
   vec4 white = vec4(1, 1, 1, 1);
   float distance = distance(coord.xy, wave.xy);
   float wave1 = abs(distance - wave.z);
   wave1 = clamp(wave1, 0.0, 25.0);  
   wave1 = (25.0 - wave1) / 35.0;
   vec4 color = mix(vcolor, white, newColor.bbba);
   color = mix(vcolor, color, wave1);
   return color;
}

void main()                          
{
   vec3 coord = gl_FragCoord.xyz;
   
   vec4 color = getColor(u_Wave0, coord, v_Color);
   vec4 color1 = getColor(u_Wave1, coord, v_Color);
   //vec4 color2 = getColor(u_Wave2, coord, v_Color);
  //vec4 color3 = getColor(u_Wave3, coord, v_Color);
 
   vec4 color3 = max(color, color1);
   //color3 = max(color3, color1);
  //color3 = max(color3, color2);
 
   gl_FragColor = color3;                                  
}                              
16  Java Game APIs & Engines / OpenGL Development / Shader not rendering correctly on: 2014-07-17 07:55:51
This is driving me mad... I have a fragment shader that generates up to 4 ripples on the screen, but it doesn't render correctly. The ripples go about halfway, then flash to the edge of the screen.

I used to have all the code (repeated 4 times) in main(). In that version, only one of my waves would render incorrectly. After moving the code to a function they all do. Also, performance is much worse with the function...

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  
precision mediump float;

uniform vec4 u_Wave0;
uniform vec4 u_Wave1;
uniform vec4 u_Wave2;
uniform vec4 u_Wave3;

varying vec3 v_Position;
varying vec4 v_Color;

vec4 getColor(in vec4 wave, in vec3 coord, in vec4 vcolor) {
   vec4 newColor = vec4(0.1, 0.2, 0.4, 1.0);
   vec4 white = vec4(1, 1, 1, 1);
   float distance = distance(coord.xy, wave.xy);
   float wave1 = abs(distance - wave.z);
   wave1 = clamp(wave1, 0.0, 25.0);  
   wave1 = (25.0 - wave1) / 35.0;
   vec4 color = mix(vcolor, white, newColor.rrra);
   color = mix(vcolor, color, wave1);
   return color;
}

void main()                          
{
   vec3 coord = gl_FragCoord.xyz;
   
   vec4 color = getColor(u_Wave0, coord, v_Color);
   vec4 color1 = getColor(u_Wave1, coord, v_Color);
   vec4 color2 = getColor(u_Wave2, coord, v_Color);
   vec4 color3 = getColor(u_Wave3, coord, v_Color);
   
   color3 = max(color3, color);
   color3 = max(color3, color1);
   color3 = max(color3, color2);
   
   gl_FragColor = color3;                                  
}                                                                        
17  Discussions / Miscellaneous Topics / Re: A rant on OpenGL's future on: 2014-07-15 12:19:07
Doesn't OpenGL ES cut out most of the legacy?
18  Games Center / Showcase / Re: We Shall Wake demo (v6.0) on: 2014-07-14 20:24:50
AAA.
19  Java Game APIs & Engines / Android / Re: update opelgl background with button click...? on: 2014-07-12 23:47:37
Thanks, gl_FragCoord was what I needed!
20  Java Game APIs & Engines / OpenGL Development / Re: VBO and Shaders on: 2014-07-10 21:59:45
Shouldn't it at least render a black box if it doesn't have color?

Depends on what colour you're passing in with your shader.

Impossible. Your fragment shader must return a color.
21  Java Game APIs & Engines / Android / update opelgl background with button click...? on: 2014-07-10 21:56:15
I'm working on a game with some simple Buttons, but behind them I draw an OpenGL dynamic background. How can I feed the location of my button to the fragment shader? I know how to get the screen coordinates of a View, but how do I translate them into something a shader would understand?
22  Discussions / Miscellaneous Topics / Re: Bought myself a new smartphone! on: 2014-07-10 19:00:42
Benchmark it with my app :-)

https://play.google.com/store/apps/details?id=com.clarke.agnes.benchmark.android
23  Java Game APIs & Engines / OpenGL Development / Re: GLES20.glUseProgram(0); on: 2014-07-08 23:26:30
@Riven, I have come to my senses and used a real shader. Shader Program Zero was just a random discovery when I loaded a program with an unititialized int handle.
24  Game Development / Game Mechanics / Re: Resizing a 2D array of objects on: 2014-07-08 20:54:44
Simple: change your file format to include a header row that tells you the dimensions, and walk away from all this hackiness.
25  Game Development / Shared Code / Re: Trie-based dictionary on: 2014-07-08 20:33:55
I've thought about that... whether you need to follow the natural letter order of the word. But I think if that was the case it would make most sense to sort the words in order of least-frequent letters first. I also wondered if reversed words would go faster.

Why do you think an alphabetical sort will make things more efficient? You want more branches in the tree, not less. Also, many words would end up on the same node (e.g. dog and god), which can't happen with the current structure. Also, you would have to store the whole word at a word node, I don't like that.
26  Game Development / Shared Code / Re: Trie-based dictionary on: 2014-07-08 16:42:42
I'm not doing it that way, but I am excluding most permutations from the search - this is the great advantage of a trie. Have a look at the implementation in the first post.
27  Game Development / Shared Code / Re: Trie-based dictionary on: 2014-07-07 22:55:14
I added parent references to the nodes and used richierich's approach of fiddling with a single list object for the scrambled letters as it weaves its way through the tree. Those changes bring the unscrambling time down to 7 millis, a 50-100% improvement.

I think this is about done, so I will update the first post with the final code, after I have cleaned up the class and variable names a bit.

I never did the Riven 2-chars per node approach, but with my approach of dumbing down the app to use precalculated solutions on the SD card, I don't really need the headache it would give me.
28  Discussions / General Discussions / Re: The Wrath of Ackermann on: 2014-07-07 21:24:46
(ack(4,3))^ack(4,3)
29  Discussions / General Discussions / Re: The Wrath of Ackermann on: 2014-07-07 21:12:49
Write down the number of atoms in the universe. Put a squared next to it.
30  Discussions / General Discussions / Re: The Wrath of Ackermann on: 2014-07-07 21:02:57
You can always write down a number no matter how big it is. All you need is the right syntax.
Pages: [1] 2 3 ... 19
 

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

The first screenshot will be displayed as a thumbnail.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (27 views)
2014-07-29 18:09:19

Riven (16 views)
2014-07-29 18:08:52

Dwinin (14 views)
2014-07-29 10:59:34

E.R. Fleming (35 views)
2014-07-29 03:07:13

E.R. Fleming (13 views)
2014-07-29 03:06:25

pw (44 views)
2014-07-24 01:59:36

Riven (46 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (32 views)
2014-07-23 20:56:16
Resources for WIP games
by CogWheelz
2014-08-01 18:20:17

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

List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22
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!