Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
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  Java Game APIs & Engines / Java 2D / Re: Kick Off football game like - The ball physics questions on: 2007-11-23 10:06:23
you may find it fairly boring, but you better write a scaling operation instead of loading the sprite scaled for the time the ball is hanging in the air. This will bring a  smoother effect and all resources problem are solved within  the loading time. While you place the ball on field, make a short calculation of the height, and compute a linear transform like and take care to immediate loading too

In fact there is no problem of loading time, cause the image are loaded once for all when creating sprite, then my ball sprite is holding a BufferedImage[] array, I just need then to handle which one I draw.
An other reason is that I want to stay close as possible to the original game, all the sprites are extracted from the original game.
2  Game Development / Game Mechanics / 2D football game but the ball simulate 3D by changing sprite representation on: 2007-11-22 18:56:46
Here we go, first my little jar to illustrates what i am doing
http://www.yourfilehost.com/media.php?cat=other&file=3242kotrials.jar

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

Then a little video about what I expect to reproduce http://youtube.com/watch?v=vksEQrgjbZI

Then little history about Kick Off http://en.wikipedia.org/wiki/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="http://www.fifa.com/">FIFA.com</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 http://goldenstudios.or.id/products/GTGE/docs/com/golden/gamedev/object/Sprite.html

Thanx for your help
3  Java Game APIs & Engines / Java 2D / Kick Off football game like - The ball physics questions on: 2007-11-22 18:52:01
Here we go, first my little jar to illustrates what i am doing
http://www.yourfilehost.com/media.php?cat=other&file=3242kotrials.jar

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

Then a little video about what I expect to reproduce http://youtube.com/watch?v=vksEQrgjbZI

Then little history about Kick Off http://en.wikipedia.org/wiki/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="http://www.fifa.com/">FIFA.com</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 http://goldenstudios.or.id/products/GTGE/docs/com/golden/gamedev/object/Sprite.html

Thanx for your help
4  Java Game APIs & Engines / Java 2D / The equivalent of MIDP's game api for standard platform ? on: 2007-03-28 14:23:49
Hello,

I haven't found the same library for a standard platform, and not for a mobile platform (as the MIDP's game API). Maybe I haven't made enough researches ?
I'd like to find a simple way to develop a Java 2D game, and think that there are some libraries to simplify the developer's life.
That's why I need help to know what I have to use ? Can someone gives me hints about some libraries ?

Thanks for your help
5  Java Game APIs & Engines / Java 2D / Re: Simple 2D game engine on: 2007-03-28 13:56:16
Check out this API http://developers.sun.com/techtopics/mobility/midp/articles/game/.  It is part of J2ME, but it seems to be simple and it covers some good basic boiler plate things.  It might make sense if this were part of the Standard Edition as well does it not?

Has anyone taken a look at this before?  What do you think of it?

By the way, what is lightweight for you?  How many KB does the framework/engine JAR(s) have to be in order to meet your criteria?
On that same note, what is fast for you?  How many physics objects etc...?  What type of framerate would you expect and on what hardware?

I personally believe (or hope may be a better word here) that Stencyl (check out Eliwood's signature) will be a great solution to create 2D games.  The beta is due to be release in April this year, so not to far away!  Although, this may not be as lightweight as you desire.

Does it possible ti use MIDP classes into normal java application? and if yes, how Wink
6  Java Game APIs & Engines / Java 2D / Soccer field scroll and sprites animation on: 2007-03-20 11:32:55
I am currently writting a football game called Open Kick-Off

Unfortunately, due to lack of time, activities, work, family and so on, this project had no activities since a long time.
But recently, I decided to restart to work on this project, just because I have some programming interest about AI and java.

Open Kick-Off aims at programming a free, opensource, GPL'ed soccer game similar to the famous Dino Dini's KickOff 2

And here you can see which result I expect for the scrolling and sprites animation

I am using right now the following principle to display the football ground, and handle scrolling

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
public class FootballGround extends Panel implements KeyListener, FootballDimensions, Runnable
{
    public static Image   grassSquareImage;
    public static Image   BALL_IMG;
    public static Image   GRASS_IMG;
    ...

    public void paint (Graphics g) { update (g); }

    public void update (Graphics g)
    {
        if (_offGraphics==null)
        {
            _offImage = createImage (SCREEN_WIDTH, SCREEN_HEIGHT);
            _offGraphics = _offImage.getGraphics();
            _offGraphics.setColor (Color.black);
        }

        paintGrass (_offGraphics);
        paintLines (_offGraphics);

        if (_match.getBall().getHeight()<Player.PLAYER_HEIGHT)
        {
            paintBall(_offGraphics);
            paintPlayers (_offGraphics);
        }
        else
        {
            paintPlayers (_offGraphics);
            paintBall(_offGraphics);
        }
        paintScore (_offGraphics);
        paintRadar (_offGraphics);
        ...
       
    /** This function tiles the grass on the screen */
    private void paintGrass (Graphics g)
    {
        Dimension grassDim = new Dimension ( grassSquareImage.getWidth(this), grassSquareImage.getHeight(this));

        if(GRASS_IMG==null)
        {
            Image grassSquareImage = JARImageLoader.loadImage ("grass.gif");
            GRASS_IMG = createImage (SCREEN_WIDTH+grassDim.width, SCREEN_HEIGHT+grassDim.height);
            Graphics grassGraphics = GRASS_IMG.getGraphics();

            for (int x=0; x<SCREEN_WIDTH+grassDim.width; x+=grassDim.width)
            {
                for (int y=0; y<SCREEN_HEIGHT+grassDim.height; y+=grassDim.height)
                {
                    grassGraphics.drawImage (grassSquareImage, x, y, this);
                }
            }
        }

        g.drawImage (GRASS_IMG,
                -  new Long(Math.round((_camera.getLocation().x+SCREEN_HALF_WIDTH) * PIXELS_PER_METER)).intValue() % grassDim.width,
                -  new Long(Math.round((_camera.getLocation().y+SCREEN_HALF_HEIGHT) * PIXELS_PER_METER)).intValue() % grassDim.height,
                this);
    }    


but i am not satisfied, I aims to display the orginal pitch

Here are the pitch I want to use for the game  which is described as tiles here

So my 1st question is following

According to your experience which would be the best means to achieve the result expected, should I stay on the tiles principle, could you give me inputs, trials or concrete stuff that I can apply
For example how to build the array of tiles that describe the final football ground? Any tools for doing that ?

My 2nd question is for sprites animation

I have the original sprites in this format, what would be the best way to iterate in this image and extract the sprite I want to use.
What would be the best way to do for the sprite animation, should I keep the file like this or extract all sprites in each single file.

Thank for helping and support
Sebastien





Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (1 views)
2014-07-23 21:16:32

Riven (3 views)
2014-07-23 21:07:15

Riven (5 views)
2014-07-23 20:56:16

ctomni231 (39 views)
2014-07-18 06:55:21

Zero Volt (36 views)
2014-07-17 23:47:54

danieldean (29 views)
2014-07-17 23:41:23

MustardPeter (32 views)
2014-07-16 23:30:00

Cero (47 views)
2014-07-16 00:42:17

Riven (48 views)
2014-07-14 18:02:53

OpenGLShaders (38 views)
2014-07-14 16:23:47
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org 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‑gaming.org
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!