Hey Paul. First, love the app, hands down. I remember being able to disable river animation on the PC version. Is there a possibility to disable animation in the android app? Thanks and great job.
nice game. and good timing. you know that the movie Nymphomaniac is kind of a 'Fly Fishing-exploitation'? so hopefully everybody is in Fly Fishing Frenzy after watching the movie, and rush to the app store to download your game. or perhaps they are in different kind of frenzy after that movie, who knows.
Hi @PaulH, how are you getting on with your games?
I wanted to ask you about the line movement as I've started thinking making a fishing game myself (it's always been on my to do list). Don't worry, it wouldn't be a competing one by any stretch! Not a simulation, but it would be neat with nice line movement all the same. Mine wouldn't need to be in 3D and would mostly be there for visual effect. Any tips on how to achieve that effect for the line in 2D?
Sorry for the month-late reply. I haven't been on the forum lately.
The line movement is done with a series of points, one for every few inches of line. Call the amount of line between points L. Each point has its location and velocity, each in 3 dimensions. The point nearest the rod is continually set to match the position and motion of the rod tip. For each frame the code walks through the array of points, handling the movement for each. If any point is farther than L from the preceding one, it gets moved (pulled) towards that point such that the new distance is L. The amount it gets pulled can be used to alter the speed of the point. It's been a while since I originally coded that... about 10 years for the Windows version, but as I recall I also store the amount each point got pulled by the previous one, and also traverse the array using that as a factor for slowing down the preceding points. There's also a pass in the opposite direction to deal with forces applied further down the list, which could be from fighting a fish, or the line on or in moving water. Add a little dampening to the velocity of each point to account for friction as the line moves through the air and flexes, and add gravity to each point, and you've got a decent physics-based model for how a string or chain behaves.
Getting it sort-of-working was fairly easy. Tuning it, applying the right amount of dampening and pull effect forward and backward to make it "feel" right took a lot of experimentation. Too little momentum and the line flops to the water. Too much and it continues to writhe or oscillate after each cast, which looks really creepy.
It's also complicated somewhat by the fact that the rod flexes. Again it's in segments, each progressively stiffer as you traverse away from the tip. That acts as a spring, storing potential energy as the rod "loads", as in real life.
If you're not dealing with fly line, where the weight of the line is what carries the lure, but conventional line, it might be enough to just track the two endpoints of the line (rod and lure) and still use segments to allow the line to sag downwards based on the amount of slack in the line.
Oh, and as for dealing with it in 2D, you could still internally model everything with 3D coordinates and velocities, but just render it in profile by ignoring one axis, or you could use as similar algorithm that deals with only 2 dimensional coordinates. Even seen in 2D the 3D modeling behind the scenes would yield greater realism, but as your game won't be a simulation, just storing X & Y position and speed for each point of line should be fine.
Comments
and good timing. you know that the movie Nymphomaniac is kind of a 'Fly Fishing-exploitation'? so hopefully everybody is in Fly Fishing Frenzy after watching the movie, and rush to the app store to download your game. or perhaps they are in different kind of frenzy after that movie, who knows.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
I wanted to ask you about the line movement as I've started thinking making a fishing game myself (it's always been on my to do list). Don't worry, it wouldn't be a competing one by any stretch! Not a simulation, but it would be neat with nice line movement all the same. Mine wouldn't need to be in 3D and would mostly be there for visual effect. Any tips on how to achieve that effect for the line in 2D?
The line movement is done with a series of points, one for every few inches of line. Call the amount of line between points L. Each point has its location and velocity, each in 3 dimensions. The point nearest the rod is continually set to match the position and motion of the rod tip. For each frame the code walks through the array of points, handling the movement for each. If any point is farther than L from the preceding one, it gets moved (pulled) towards that point such that the new distance is L. The amount it gets pulled can be used to alter the speed of the point. It's been a while since I originally coded that... about 10 years for the Windows version, but as I recall I also store the amount each point got pulled by the previous one, and also traverse the array using that as a factor for slowing down the preceding points. There's also a pass in the opposite direction to deal with forces applied further down the list, which could be from fighting a fish, or the line on or in moving water. Add a little dampening to the velocity of each point to account for friction as the line moves through the air and flexes, and add gravity to each point, and you've got a decent physics-based model for how a string or chain behaves.
Getting it sort-of-working was fairly easy. Tuning it, applying the right amount of dampening and pull effect forward and backward to make it "feel" right took a lot of experimentation. Too little momentum and the line flops to the water. Too much and it continues to writhe or oscillate after each cast, which looks really creepy.
It's also complicated somewhat by the fact that the rod flexes. Again it's in segments, each progressively stiffer as you traverse away from the tip. That acts as a spring, storing potential energy as the rod "loads", as in real life.
If you're not dealing with fly line, where the weight of the line is what carries the lure, but conventional line, it might be enough to just track the two endpoints of the line (rod and lure) and still use segments to allow the line to sag downwards based on the amount of slack in the line.
Paul
Paul