Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (616)
Games in Android Showcase (173)
games submitted by our members
Games in WIP (659)
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]
1  Game Development / Game Mechanics / Re: Accelerate and slow down a camera move on: 2011-06-10 08:44:17
Thanks for the piece of code!

After some more thought, I came out with the following idea: a "standard" sigmoïd method works, but it is not easy to control tune it. Actually I just would like to build a function that looks like a smoothed stair:

1       /-        slow stop
|   /-/
0-/      1       slow start

satisfying f(0)=0, f(0.5)=0.5 and f(1)=1, and any other constraint letting me say "at T I want the cam to have done distance D". Finally, it seems the best is to "build" the function using an interpolation (I will use bernstein, that works well), where each keypoint represent a D=f(T) constraint. One can really "model" the camera behaviour with details.

2  Game Development / Game Mechanics / Re: Accelerate and slow down a camera move on: 2011-06-08 13:26:09

Thanks for these suggestions. One thing I forgot to tell: I want to control the LENGTH of each animation. Up to now I check the frame rate before starting any animation, to determine the number of necessary key points required to have the choosen duration. Unless I misunderstood your suggestion, it seems to me that your solutions requires little thinking to determine acceleration and other parameters to control the number of steps.

I was thinking about using a function to shifts linear steps:
(1) compute the linear interpolation of the n intermediate steps. First and last point make distance D.
(2) convert each point to polar, to have a distance information from start.
(3) then each point Pi should be at distance= D*i/n from start.

(4) For this next step, the best is to normalize in [0;1], so consider distance=i/n. We will update each polar point with:
      P.radius = f(P.radius)
I thus need a function y=f(x) that gives y=0 for x=0 and y=1 for x=1, and that let me "stretch" the animation timing easily:
      f(x)=x^2 makes a simple accelerating move, x^3,4,5 will be more "sharp": slower at the beginning and faster at the end.
      f(x)=-(x-1)^2+1 makes the contrary acceleration: fast at the beginning, slow at the end. One must have an even pow value.

so I better need a normalized sigmoïd function. I will tell you if I find a good candidate for this method Smiley

It is a little mangled, but allows to customize speed variation easily! Maybe there are some other more straightforward methods.

3  Game Development / Game Mechanics / Re: Bullet Angles on: 2011-06-08 12:42:36
I have implemented the method that indicates the full polar coordinate (with angle in [0;2*PI]) of an input coordinate, which could be mouse-bob in your case.
Search for Coord2d.fullPolar() here:

I use it a lot and it works as expected.
4  Game Development / Game Mechanics / Accelerate and slow down a camera move on: 2011-06-08 00:39:34
Hi folks,
I have a 2d scene, and do camera moves between two given points by simply defining N equal intermediate steps along the line formed by the start and stop point.
I'd like to accelerate at the beginning and slow down at the end. Do you have any suggestions to do that smartly?
5  Java Game APIs & Engines / Engines, Libraries and Tools / A complete 3d API for plotting surfaces, scatters, etc on: 2011-06-08 00:21:07
Hi all,
I guess this place is better to advertise than the "shared code" section of this forum:
Jzy3d is an open source library that let you easily plot simple 3d for reviewing scientifical data:
6  Game Development / Shared Code / Re: A complete 3d API for plotting surfaces, scatters, etc on: 2011-06-08 00:16:12
jzy3d is an excellent library, it is already used in commercial products. It uses JOGL as a Java binding for OpenGL. It is quite complete and it is not very complicated to use. I hope it will go further in graph rendering and 2D/3D mixing.

Thanks for your support! Yes Jzy3d goes further with great new features still under development. Feel free to follow!/jzy3d to get notified on new features.
7  Game Development / Shared Code / Re: A complete 3d API for plotting surfaces, scatters, etc on: 2011-04-19 12:51:38
Mm, I thought it was for graphics, but you're right, we're not on Smiley
8  Game Development / Shared Code / Re: Astar Pathfinding on: 2011-04-19 12:44:16
That's what I did :/
I will tell you if I find the reason.
9  Game Development / Shared Code / A complete 3d API for plotting surfaces, scatters, etc on: 2011-04-10 14:58:36
Hi all,
First time I see this forum, and I guess it's worth sharing a project with all of you Smiley
10  Game Development / Shared Code / Re: Astar Pathfinding on: 2011-04-10 13:37:16
When running the applet from the browser, the path does not start after the two clicks.
When building and running from sources, the pathfind returns a null path at the following call Sad

GridPath aPath = pathfinding.getPath(mouse.getStart(), mouse.getEnd(), draw.getMap());

Any suggestion to have the demo running?! It seems great!
Cheers Smiley
Pages: [1]
Coldstream24 (19 views)
2015-09-03 00:41:28

Andrew_3ds (31 views)
2015-09-01 19:08:10

afikri (20 views)
2015-08-31 09:30:22

afikri (27 views)
2015-08-31 09:30:07

afikri (15 views)
2015-08-31 09:27:24

afikri (17 views)
2015-08-31 09:26:40

Roquen (32 views)
2015-08-29 11:30:54

GamerC4 (41 views)
2015-08-22 20:38:50

GamerC4 (37 views)
2015-08-22 20:37:18

GamerC4 (43 views)
2015-08-22 20:37:01
HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30 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‑
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!