Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (739)
Games in Android Showcase (224)
games submitted by our members
Games in WIP (820)
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 / J2ME / Re: Animation on MIDP 1 on: 2004-04-21 23:07:27
like in my initial post, I am modified the Helicopter sample code that comes with nokia development suite. I just removed the lines that would draw the background. That leaves me with the helicopter itself then i changed the image that was called and just increased the number of frames.

Here is the whole robot class.

import javax.microedition.lcdui.*;

public class Robot
 private static Image[] myImage;
 private static int x, y;
 private static int frame=4;

 private static int imageWidth, imageHeight;

 private final String CHARACTER_NAME="proto01";
 private final String imgFiller="/filler.png";
 private Image imgFill;
 private Image[] imgCharacterStrip;
 private final int CHARACTER_FRAMES=14;
 private Image[] imgCharacter=new Image[CHARACTER_FRAMES];
 private int clipAreas[][];

 public Robot()
   // load the images from the .jar
   try {
     imgFill = Image.createImage(imgFiller);
   catch (IOException ex) {
   // all character frame images are assumed
   // to be the same height and width

   // set the intial position of the character.



 public void setFrame()

 public void draw(Graphics g)
     //g.drawImage(imgFill,0,y,g.LEFT |g.TOP );
     g.drawImage(imgCharacterStrip[0],x-(imageWidth*frame),y,g.LEFT | g.TOP);
 public void draw2(Graphics g){
   g.drawImage(imgFill,0,y,g.LEFT |g.TOP );
 private Image[] getImages(String imgName, int frames)
   return Try1.getImages(imgName, frames);

hope you can help a newbie ...
2  Java Game APIs & Engines / J2ME / Re: Animation on MIDP 1 on: 2004-04-19 22:36:17

They probably are a different size from the helicopter images.
That's not exactly a question.


The images are of the sames size, the difference is that my image is a robot.

yah, your right its not a question, i'll just edit it...thanks
3  Java Game APIs & Engines / J2ME / Animation on MIDP 1 on: 2004-04-19 22:09:06
I'm tried to animate a PNG image using sample code that comes with the Nokia Development Suite(Helicopter). The PNG image I used consists of 7 frames of different actions the image will do. I understand the idea of the sample code to animate an image, I used my PNG image on it. It did animate but the problem is the animation is not what i expected, the frames seems to overlap each other. Can anyone suggest another sample code for animation and can you direct me to a resource about threading in J2ME? I also want to create a custom UI for a game I'm trying to do.
Pages: [1]
Ecumene (47 views)
2017-09-30 02:57:34

theagentd (71 views)
2017-09-26 18:23:31

cybrmynd (181 views)
2017-08-02 12:28:51

cybrmynd (180 views)
2017-08-02 12:19:43

cybrmynd (187 views)
2017-08-02 12:18:09

Sralse (192 views)
2017-07-25 17:13:48

Archive (744 views)
2017-04-27 17:45:51

buddyBro (870 views)
2017-04-05 03:38:00

CopyableCougar4 (1419 views)
2017-03-24 15:39:42

theagentd (1315 views)
2017-03-24 15:32:08
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51 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!