Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (555)
Games in Android Showcase (148)
games submitted by our members
Games in WIP (601)
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]
BurntPizza (27 views)
2015-02-27 06:09:35

BurntPizza (21 views)
2015-02-27 05:56:17

Riven (14 views)
2015-02-27 02:34:15

Riven (20 views)
2015-02-27 01:47:26

Riven (19 views)
2015-02-27 01:46:04

BurntPizza (15 views)
2015-02-27 00:52:04

BurntPizza (16 views)
2015-02-27 00:50:29

Riven (36 views)
2015-02-26 23:38:45

Riven (13 views)
2015-02-26 23:37:24

BurntPizza (31 views)
2015-02-26 21:13:04
How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27 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!