Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (702)
Games in Android Showcase (203)
games submitted by our members
Games in WIP (775)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3 ... 10
 1 
 on: 2016-12-10 00:12:45 
Started by MrPork - Last post by princec
But ArrayList.clear() cannot throw CME? Only the Iterator methods actually do the throwing - the ArrayList stuff just sets it up to throw next time one of them is called.

Cas Smiley

 2 
 on: 2016-12-09 23:44:08 
Started by MrPork - Last post by cylab
No, when ArrayList.clear() (not remove, not add: clear!!) fails with ConcurrentModificationException, the current thread is not also adding/removing *during* the clear, hence another thread is, hence the proof.

I doubt, the CME was raised in clear(). We didn't see a stacktrace from OP, so I still bet it's while adding to the itemList...

 3 
 on: 2016-12-09 23:14:42 
Started by lifemakers - Last post by Abuse
IMO the large 1st-player advantage given by the rules necessitates multiple games for each level, with serve alternating between players.
Victory would then require a 2 game lead (break their serve & hold yours).
Basically Tennis tie breaker.

1st serve wouldn't matter, so decide it with a hidden coin toss.

It'd elongate each level, but it seems to me all the other alternatives are radical departures from the classic game.

 4 
 on: 2016-12-09 22:47:56 
Started by MrPork - Last post by Riven
This PROVES multiple threads are modifying the ArrayList.
No, it just proves he's trying to iterate through a list at the same time as adding or removing things to it.
The classic mistake: [snip]

No, when ArrayList.clear() (not remove, not add: clear!!) fails with ConcurrentModificationException, the current thread is not also adding/removing *during* the clear, hence another thread is, hence the proof.

Using an iterator doesn't work, using ArrayList.clear() doesn't work either. Iv'e exhausted all my options as a nub, what gives?


 5 
 on: 2016-12-09 21:26:48 
Started by steveyg90 - Last post by steveyg90
Hi,

So would be this:

vec3 final =   vColor.rgb * diffuseColor.rgb * ambient;


Thanks

 6 
 on: 2016-12-09 21:09:59 
Started by steveyg90 - Last post by Kefwar
1  
2  
3  
varying vec4 vColor;
...
vec3 final = vColor * diffuseColor.rgb * ambient;

You actually have an 'error', but the other drivers were just ignoring it. Simply take the
vColor.rgb
to get the RGB components of your vColor. This way you have only vec3 multiplication.

 7 
 on: 2016-12-09 20:50:31 
Started by steveyg90 - Last post by steveyg90
Hi,

I have the following fragment shader:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
varying vec4 vColor;
varying vec2 vTexCoord;
 
//texture samplers
uniform sampler2D u_texture; //diffuse map
 
//additional parameters for the shader
uniform vec4 ambientColor;
 
void main() {
    vec4 diffuseColor = texture2D(u_texture, vTexCoord);
    vec3 ambient = ambientColor.rgb * ambientColor.a;
 
    vec3 final = vColor * diffuseColor.rgb * ambient;
    gl_FragColor = vec4(final, diffuseColor.a);
}


Very basic, works on my gaming pc and one of my laptops, but my other laptop with an AMD Radeon R7M260 I get the following error:

Ambient Shader: Fragment shader failed to compile with the following errors:
ERROR: 0:19: error(#162) Wrong operand types: no operation "*" exists that takes a left-hand operand of type "default in highp 4-component vector of vec4" and a right operand of type "highp 3-component vector of vec3" (or there is no acceptable conversion)
ERROR: 0:19: error(#162) Wrong operand types: no operation "*" exists that takes a left-hand operand of type "default in highp 4-component vector of vec4" and a right operand of type "highp 3-component vector of vec3" (or there is no acceptable conversion)
ERROR: error(#273) 2 compilation errors.  No code generated

Any help would be appreciated.

Thanks

 8 
 on: 2016-12-09 19:22:21 
Started by Lunch - Last post by KaiHH
1. about your depth clipping problem:
The animations in your first post clearly show that when you move "up" and "down" you are moving your 3D camera along its view plane that is at an angle to the blue "floor". It is at an angle because you wanted to have this isometric projection. But even though you are using an orthographic projection, it is still just a projection, and your objects are still in 3D. So when you just move far enough down you'd end up hitting the floor with your camera. So, obviously you need to move the camera parallel to your blue floor, so that the depth bounds remain the same.

2. about your ray picking problem:
Yes, it seems that Bullet's CollisionWorld.rayTest() does not test a "ray" against the world but instead a line segment, defined between two end points. So, make sure that the second endpoint is sufficiently far away.

 9 
 on: 2016-12-09 17:49:19 
Started by lifemakers - Last post by bmanmcfly
First, looks well done so far.

If you want to keep it true to the original game, but keep a balance...

Because of the distinct advantage the first player gets, maybe have like a coin toss, or a "who can get closer to the edge without going over" takes the first move... maybe just for the first round.

Then, have the players swap first play each round.

That's what I'd be thinking at least.

 10 
 on: 2016-12-09 16:01:01 
Started by mike_bike_kite - Last post by bmanmcfly
I've approached the problem from a few angles already and pretty much dislike the approaches I've tried. My current method where it changes the resolution of the users screen for the duration of  the game is my favourite so far but it doesn't work consistently on all users screens. I shy away from using libraries because it takes me longer to work out how to use them than it does writing the games! (sad but true). Using multiple sets of graphics and code to handle the movement is ok but it leads to quite complex code and there's no real guarantee that the users screen matches the resolutions you've coded for. Keeping the game in a fixed window in the centre of the screen certainly works but you just end up with a small game in the middle of a big black screen which would bug me. It's a shame you can't just assign the graphics to an image variable and then resize the image on the fly. Better still if you could just tell java to use an 800x600 screen and make it full screen.

I like the idea of the sea mine and will try that out.



I've played games that have done just that... so, it is doable to just "stretch" graphics to fit the screen, just the result isn't always as hoped.... but it is POSSIBLE, even if I'm not sure how.

Pages: [1] 2 3 ... 10
 
Lunch (81 views)
2016-12-06 16:01:40

ral0r2 (306 views)
2016-11-23 16:08:26

ClaasJG (441 views)
2016-11-10 17:36:32

CoffeeChemist (528 views)
2016-11-05 00:46:53

jay4842 (578 views)
2016-11-01 19:04:52

theagentd (609 views)
2016-10-24 17:51:53

theagentd (584 views)
2016-10-24 17:50:08

theagentd (527 views)
2016-10-24 17:43:15

CommanderKeith (523 views)
2016-10-22 15:22:05

Roquen (474 views)
2016-10-22 01:57:43
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21
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!