Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (671)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  2D football game but the ball simulate 3D by changing sprite representation  (Read 2294 times)
0 Members and 1 Guest are viewing this topic.
Offline Oss117

Junior Newbie

« Posted 2007-11-22 17:56:46 »

Here we go, first my little jar to illustrates what i am doing

I am using Golden T Game Engine (GTGE) library to develop my application

Then a little video about what I expect to reproduce

Then little history about Kick Off

And at least my question, related to the ball physics, as you see it's a 2D game, but the ball simulate 3D by changing sprite representation when it's height position changing
and you take a look in the jar file, in the res/sprites directory you have the ball.png sprites file. First five sprites are for normal bouncing but latest four one are when the ball is growing in the air, with the last one, that is only the ball's shadow, which has to be placed somewhere on the pitch.

Some parameters I can provide
[php]   /** acceleration constant (m/s^2) */
   public static final double   G = 9.81;
   /** ball mass (kg)<br>
    * <a href=""></a> says: <em>not more than 450 g in weight and not less than 410 g</em>

   public static final double   M = 0.430;
   /** air resistance term */
   public static final double   K = 0.350;
   /** bounce angle factor (must be less that 1) */
   public static final double   BOUNCE_SPEED_FACTOR = 0.8;
   /** In order to save calculation time, M/K is precalculated */
   //private static final double   M_K = M/K;
   /** In order to save calculation time, K/M is precalculated */
   private static final double   K_M = K/M;
   /** In order to save calculation time, MG/K is precalculated */
        //private static final double   MG_K = M*G/K;   [/php]

What would be the best way to handle that problem.

Just to figure out what is a sprite in the GTGE library, take a look here

Thanx for your help
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

IanParcs (38 views)
2016-04-18 14:18:53

KaiHH (38 views)
2016-04-18 08:35:41

KaiHH (69 views)
2016-04-15 12:43:58

theagentd (71 views)
2016-04-14 02:16:17

theagentd (80 views)
2016-04-14 02:15:43

IanParcs (96 views)
2016-04-12 03:51:16

IanParcs (39 views)
2016-04-12 03:50:03

IanParcs (35 views)
2016-04-12 03:49:54

IanParcs (32 views)
2016-04-12 03:49:52

IanParcs (40 views)
2016-04-12 03:49:52
Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12: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!