Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
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: problem with fireing in action game on: 2006-01-10 06:00:42
array would be good enough if you dont want bullet spreading around  your game screen.
do not for get to set visible false when ever it reaches end of the screen or hit your npc else bullet will be "finish"...
 Grin Grin Grin
2  Java Game APIs & Engines / J2ME / Re: moving sprite and firing sprite..help!! on: 2005-11-01 04:51:03
--------------------------------------------------------------------------------
hi all,anyone can help me to solve this problem..?
after the initialization of the walking frame sequence it doesn't work in order....
plz.....

public class Escanvas extends GameCanvas implements Runnable {
   
  private boolean  isPlay;
  private long    delay;
  private Sprite Essprite;
  private Display display;
  private static final int[] walkingseq = {0,1,2};
  private static final int[] fireseq = {3,4};
 


  public Escanvas(Display d){
        super(true);
        display = d;
        delay = 180;
        isPlay=true;   
     
        }
   
    public void start() {
        display.setCurrent(this);
        try {
        Essprite= new Sprite(Image.createImage("/res/test1.png"),17,17);
        Essprite.setFrameSequence(walkingseq);
        }catch (Exception e) {System.out.println("Error Loading Image");}

        Thread running = new Thread(this);
        running.start();
    }
   
    public void stop(){
        isPlay=false;
    }
           
   
    public void run() {
 
        Graphics g = getGraphics();
   
 
        while (isPlay==true) {
         
            input();
            drawScreen(g);
           
           
        try {
            Thread.sleep(delay);
        }
        catch (InterruptedException ie) {}
       
    }
    }
   
   
    public void input(){
       
       
       
        int keyState = getKeyStates();
       
        Essprite.setFrameSequence(walkingseq);
                     
          if ((keyState & LEFT_PRESSED) != 0) {
         
            Essprite.move(-6, 0);
            Essprite.nextFrame();
            }
       
            if ((keyState & RIGHT_PRESSED) != 0) {
         
            Essprite.move(6, 0);
            Essprite.nextFrame();
            }
       
            if ((keyState & UP_PRESSED) != 0) {
         
            Essprite.move(0, -6);
            Essprite.nextFrame();
            }
       
            if ((keyState & DOWN_PRESSED) != 0) {
       
            Essprite.move(0, 6);
            Essprite.nextFrame();
            }
       
            if ((keyState & FIRE_PRESSED) != 0) {
         
              Essprite.setFrameSequence(fireseq);
              Essprite.nextFrame();

         
            }
         
         
    }
       
      private void drawScreen(Graphics g) {
     
      g.setColor(0xffffff);
      g.fillRect(0,0,getWidth(),getHeight() );
      Essprite.paint(g);
      flushGraphics();
   
  }
   
}

after the fire button is pressed, i've tried to initialize the Essprite.setFrameSequence(walkingseq) so that it will follow the sequence of {0,1,2};. However, it only run in {0,2} after the initilization.



i've tried to initialize the setFrame to the walking sequence after the fire action but it doesn't seems working well. Sequence is out of order....

any solutionon this problem? i've so many ways but still the sequence is out of order after the  initialization of setFrame's frame sequence
3  Java Game APIs & Engines / J2ME / Re: moving sprite and firing sprite..help!! on: 2005-10-30 17:37:02
shmoove ,thanks once again.... Wink Wink Wink Wink
4  Java Game APIs & Engines / J2ME / moving sprite and firing sprite..help!! on: 2005-10-29 17:14:48
I am doing an action game currently,that i need to make the sprite looks "always moving" while user is pressing any direction keys.

hence, i set a sequence for my sprite:

private static final int[] frmSeq = { 1, 2 ,0};

if ((keyState & LEFT_PRESSED) != 0) {
Essprite.move(-6, 0);
Essprite.nextFrame();
}

if ((keyState & RIGHT_PRESSED) != 0) {
Essprite.move(6, 0);
Essprite.nextFrame();
}

if ((keyState & UP_PRESSED) != 0) {
Essprite.move(0, -6);
Essprite.nextFrame();
}

if ((keyState & DOWN_PRESSED) != 0) {
Essprite.move(0, 6);
Essprite.nextFrame();
}

and, i want to make my firing sprite abit different. when i press fire the sprite will shows it is shooting something.

if ((keyState & FIRE_PRESSED) != 0) {
Essprite.setFrameSequence(null);
Essprite.setFrame(4);
Essprite.setFrameSequence(seq);
}

however, the program just hang after i press firing button.

anyone can help..?
5  Java Game APIs & Engines / J2ME / Re: j2me bluetooth games need help on: 2005-06-27 22:29:18
thanks allan for the suggetion...but the lecturer is asking for an action game.... Cry Cry
im currently starting to draw the pixel art and writing the codes for the menu list.
but there is no clue on how to start developing a network (bluetooth gane)....

anyone else can provide me some clue,..?
6  Java Game APIs & Engines / J2ME / j2me bluetooth games need help on: 2005-06-27 21:32:45
hi all,

i m new to j2me. and my college project requirea project to develop a bluetooth multiplayer game using j2me.
it is difficult forme to get started, as there is not much references in internet.
all i found is all not for a beginner.

i study lots of j2me game codes, that gives me brief idea on how to develop a single player game.however, i need a multiplayer references. I know that some "mirror program" is needed. thats all i can get. i've been research for last 24 hours , but can;t get much. appreciate if anyone can help..Huh plz......

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.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (25 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (13 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

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

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

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

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
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!