Help coderanch get a
new server
by contributing to the fundraiser

Joshua Waring

Greenhorn
+ Follow
since Sep 04, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Joshua Waring

Okay we'll that was a tiny fail
It's a scenario error where it doesn't appear tr way expected although has no returned errors.
The plane has a constant lighting (ambient) and if unaffected my the actual light. Basically it's dark grey all the time even if I place it dead on with the light or at least I think I am.
11 years ago
Recently I've moved into a more advance part of OpenGL which is lighting, but as what follows is an error which I keep hitting, I don't know if it's light positioning or what, but I've tried playing with positions and I can't seem to get it working correctly. There's just a plane which is positioned on the screen and I've created a moving triangle which moved horizontal to the light and the same problem occurs. simple enough said no one ever(apart from everyone who's not me:) Help is greatly appreciated.

11 years ago
I'm a beginner but more than willing to continue learning and able to dedicate large amount of time.
Though If you want my assistance than I'm more than willing to join you in your journey to complete your games idea.
11 years ago
9 months later
11 years ago
I've changed my direction of programming, guess having a working system is better than having a fast system without function.
So for particle collision, I guess the way to go would be split the area into sections and test for collision of particles in those positions instead of all with all.
I've rearranged some names and joined Linked List's with my arrays, which is faster than a object.

Though using the iteration it's giving me an error, which doesn't make sense, since the condition is interation.hasNext but gives an error on the .next(), not right away but after a few hundred cycles.
11 years ago
Okay So I've created a very basic version of the above (no gravity or cull, no cull since I don't test the performance difference Yet at a point where they would be cullable)
so I've gone from about 4ms renders to 80ms, and increasing with more particles.
I think making too many objects has become a problem, since my other method was fast, as in really fast.
I thought it would be nice, because this IS my first time using another class and object in such way.

11 years ago
Guess that's what I get for being a beginner, I've never heard of a LinkedList but after a quick look the principle is easily understood.
11 years ago
I've created a particle system in java (OBVIOUSLY -facepalm) and the code should be explanatory since I put a lot of comments inside, but I was wondering if the opproach was rather efficient in memory use and calculations ect


11 years ago
I'm trying to create my first particle system, when you click it creates a particle with addParticle at the position of the mouse click (LWJGL) and if the location of the particle (X,Y) fallse out of the range the index will be added to a stack which marks unused index's in the particles array so I can save space and reuse
but the problem is the cull, or maybe it's the add Particle, because the position is always being set to 0.0, EVEN THOUGH I've used a system.out.println to see the values given by Mouse.getX and it is working perfectly. That's the mind((()
Can someone please help.

11 years ago
My silly mistake an array of 10 index's starts at 0 and ends at 9
I was going from 0 to one higher than the arrays length.

And the error was a arrayoutofbound
12 years ago


I have no idea what the problem is, I'm trying to read an image and place the colour inside an array which I'll use as a height map later, but right now... How to get pixel colour into a two dimensional array.
12 years ago
I thought it would be nice to explain the problem..
Firstly, the shape seemed REALLY weird due to it being in a perspective view and the values being a bit weird. So that was changed by using glOrtho which gives a straight view.
Secondly during rotation the near clipping was being hit so a simple glTranslate on the view solved that problem (I moved it back 5)

The solution was.

12 years ago
I've got no idea why, I'm new to the 3D area, though I've made a nice pong in 2D.
I've compaired my code to working samples and I can't see the difference, but when I import their code it works normally, but as I said I can't see the difference.

So here it is
Before the loop is

and then
12 years ago