Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
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 / Shared Code / Re: 2d platform game on: 2007-07-06 12:13:47
thanks for the info Smiley

by any chance could you suggest something to correct this weird gameLoop ?
i'm not good programmer at all.. this is only my 3rd project .. and it's a patchwork of tutorials i've followed on the net.
mainly kevglass and pianeta tutorials.

so if you could show me how i could correct his weird behavior (i didn't even noticed it was doing such weird stuffs Wink
any help would be more than welcome

thanks Smiley

a more "up to date" version:  archive here
and java web start: click me

now it have an option screen.. the logo "space weasel sucks Wink

the keys are: ESC to open or leave the option screen  (btw fullscreen option doesn't work yet.)
Return key to select something in the option screen.
arrow key to move
space key to fire

that's it i guess
2  Game Development / Shared Code / Re: 2d platform game on: 2007-06-29 07:41:24

Aaah... i've been trying to understand this for few days now Wink
so it's probably a bug ? thanks for telling me.. i wasn't able to understand why i couldn't get back my keylistener after switching back from the mini-swing gui to my game jframe..
i was thinking to forget about the swing -screen selector gui- and doing in from inside the game.. like it's done on most of the real games out there..
an option screen from inside the game. but then maybe i would have encountered the same problem again Wink
thanks for the hint, i'll definately try that this weekend.

btw, i was wondering, do you know a good java irc channel ?
i tryed #java on freenode.. but there's lot of ppl, not much help, and not much game related dev..
would be nice if javaGaming.org had a irc channel somewhere..

tnx
3  Game Development / Shared Code / Re: 2d platform game on: 2007-06-28 03:25:00

it's too complex for me, i don't understand it all ..
right now i'm trying to create something else ..a small gui (swing) with a JComboBox to where to choose weither to run the game fullscreen or windowed mode.
i did it, but then i lost control over the key listeners it seems..
when the game start wether in window or fullscreen mode, i have no reponse upon key presses anymore.
no matter what i do i wasn't able to get back control of the keys yet .

it seems your additions help when there's lots of sprites.. i need to investigate more.. but it will take me lot of time i'm affraid ..
yet i'm glad you taught me how to do it.. i'm using your modification.. but i'll need more time to understand them..

since it's a bit tricky to me, i delay studying it by working on some other parts.. like the screenmode selection gui or other stuffs.

thanks for your help
4  Discussions / General Discussions / Re: Fullscreen mode in Java on: 2007-06-22 10:55:28


hum, it seems i get random error output.
it doesn't comes out all the time, and the game doesn't crash or anything,
but time to time i get this output:

someone can help ?

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  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
System is [Linux]
2007/06/22 19:55:12 sun.awt.X11.XToolkit processException
警告: Exception on Toolkit thread
java.lang.NullPointerException
   at java.awt.Component$BltBufferStrategy.revalidate(Component.java:3979)
   at java.awt.Component$BltSubRegionBufferStrategy.validateAndShow(Component.java:4071)
   at javax.swing.BufferStrategyPaintManager.show(BufferStrategyPaintManager.java:249)
   at javax.swing.RepaintManager.show(RepaintManager.java:1212)
   at javax.swing.SwingPaintEventDispatcher.createPaintEvent(SwingPaintEventDispatcher.java:43)
   at sun.awt.X11.XWindow.handleExposeEvent(XWindow.java:502)
   at sun.awt.X11.XContentWindow.handleExposeEvent(XContentWindow.java:122)
   at sun.awt.X11.XWindow.handleExposeEvent(XWindow.java:497)
   at sun.awt.X11.XBaseWindow.dispatchEvent(XBaseWindow.java:1092)
   at sun.awt.X11.XBaseWindow.dispatchToWindow(XBaseWindow.java:1069)
   at sun.awt.X11.XToolkit.dispatchEvent(XToolkit.java:468)
   at sun.awt.X11.XToolkit.run(XToolkit.java:626)
   at sun.awt.X11.XToolkit.run(XToolkit.java:560)
   at java.lang.Thread.run(Thread.java:619)
2007/06/22 19:55:12 sun.awt.X11.XToolkit processException
警告: Exception on Toolkit thread
java.lang.NullPointerException
   at java.awt.Component$BltBufferStrategy.revalidate(Component.java:3979)
   at java.awt.Component$BltSubRegionBufferStrategy.validateAndShow(Component.java:4071)
   at javax.swing.BufferStrategyPaintManager.show(BufferStrategyPaintManager.java:249)
   at javax.swing.RepaintManager.show(RepaintManager.java:1212)
   at javax.swing.SwingPaintEventDispatcher.createPaintEvent(SwingPaintEventDispatcher.java:43)
   at sun.awt.X11.XWindow.handleExposeEvent(XWindow.java:502)
   at sun.awt.X11.XContentWindow.handleExposeEvent(XContentWindow.java:122)
   at sun.awt.X11.XWindow.handleExposeEvent(XWindow.java:497)
   at sun.awt.X11.XBaseWindow.dispatchEvent(XBaseWindow.java:1092)
   at sun.awt.X11.XBaseWindow.dispatchToWindow(XBaseWindow.java:1069)
   at sun.awt.X11.XToolkit.dispatchEvent(XToolkit.java:468)
   at sun.awt.X11.XToolkit.run(XToolkit.java:626)
   at sun.awt.X11.XToolkit.run(XToolkit.java:560)
   at java.lang.Thread.run(Thread.java:619)
2007/06/22 19:55:12 sun.awt.X11.XToolkit processException
警告: Exception on Toolkit thread
java.lang.NullPointerException
   at java.awt.Component$BltBufferStrategy.revalidate(Component.java:3979)
   at java.awt.Component$BltSubRegionBufferStrategy.validateAndShow(Component.java:4071)
   at javax.swing.BufferStrategyPaintManager.show(BufferStrategyPaintManager.java:249)
   at javax.swing.RepaintManager.show(RepaintManager.java:1212)
   at javax.swing.SwingPaintEventDispatcher.createPaintEvent(SwingPaintEventDispatcher.java:43)
   at sun.awt.X11.XWindow.handleExposeEvent(XWindow.java:502)
   at sun.awt.X11.XContentWindow.handleExposeEvent(XContentWindow.java:122)
   at sun.awt.X11.XWindow.handleExposeEvent(XWindow.java:497)
   at sun.awt.X11.XBaseWindow.dispatchEvent(XBaseWindow.java:1092)
   at sun.awt.X11.XBaseWindow.dispatchToWindow(XBaseWindow.java:1069)
   at sun.awt.X11.XToolkit.dispatchEvent(XToolkit.java:468)
   at sun.awt.X11.XToolkit.run(XToolkit.java:626)
   at sun.awt.X11.XToolkit.run(XToolkit.java:560)
   at java.lang.Thread.run(Thread.java:619)
2007/06/22 19:55:12 sun.awt.X11.XToolkit processException
警告: Exception on Toolkit thread
java.lang.NullPointerException
   at java.awt.Component$BltBufferStrategy.revalidate(Component.java:3979)
   at java.awt.Component$BltSubRegionBufferStrategy.validateAndShow(Component.java:4071)
   at javax.swing.BufferStrategyPaintManager.show(BufferStrategyPaintManager.java:249)
   at javax.swing.RepaintManager.show(RepaintManager.java:1212)
   at javax.swing.SwingPaintEventDispatcher.createPaintEvent(SwingPaintEventDispatcher.java:43)
   at sun.awt.X11.XWindow.handleExposeEvent(XWindow.java:502)
   at sun.awt.X11.XContentWindow.handleExposeEvent(XContentWindow.java:122)
   at sun.awt.X11.XWindow.handleExposeEvent(XWindow.java:497)
   at sun.awt.X11.XBaseWindow.dispatchEvent(XBaseWindow.java:1092)
   at sun.awt.X11.XBaseWindow.dispatchToWindow(XBaseWindow.java:1069)
   at sun.awt.X11.XToolkit.dispatchEvent(XToolkit.java:468)
   at sun.awt.X11.XToolkit.run(XToolkit.java:626)
   at sun.awt.X11.XToolkit.run(XToolkit.java:560)
   at java.lang.Thread.run(Thread.java:619)
2007/06/22 19:55:12 sun.awt.X11.XToolkit processException
警告: Exception on Toolkit thread
java.lang.NullPointerException
   at java.awt.Component$BltBufferStrategy.revalidate(Component.java:3979)
   at java.awt.Component$BltSubRegionBufferStrategy.validateAndShow(Component.java:4071)
   at javax.swing.BufferStrategyPaintManager.show(BufferStrategyPaintManager.java:249)
   at javax.swing.RepaintManager.show(RepaintManager.java:1212)
   at javax.swing.SwingPaintEventDispatcher.createPaintEvent(SwingPaintEventDispatcher.java:43)
   at sun.awt.X11.XWindow.handleExposeEvent(XWindow.java:502)
   at sun.awt.X11.XContentWindow.handleExposeEvent(XContentWindow.java:122)
   at sun.awt.X11.XWindow.handleExposeEvent(XWindow.java:497)
   at sun.awt.X11.XBaseWindow.dispatchEvent(XBaseWindow.java:1092)
   at sun.awt.X11.XBaseWindow.dispatchToWindow(XBaseWindow.java:1069)
   at sun.awt.X11.XToolkit.dispatchEvent(XToolkit.java:468)
   at sun.awt.X11.XToolkit.run(XToolkit.java:626)
   at sun.awt.X11.XToolkit.run(XToolkit.java:560)
   at java.lang.Thread.run(Thread.java:619)
5  Discussions / General Discussions / Re: Fullscreen mode in Java on: 2007-06-22 10:23:24

I got it right.
I think the problem was the color depth parameter, it cannot be set to 16 or 32, but have to be set with "-1"  for Linux ...weird...
So, since i'm speaking about linux related problem, there's also the annoying X11 key repeat problem,
that drove me mad, i was wondering why my animation routines were all shaky..
i looked at the code for hours wondering WhY O whY iT DoeSn't siMpLY WORK O_O ?!
.. well the answer was:  'cause x11key repeat is messing up, there's nothing wrong with the code itself Sad
so you can see i take care to test if OS is Linux to disable X11 key repeat.. (Runtime.getRuntime().exec("xset r off")Wink

here's a working sample, as of today using ubuntu feisty and java6:
(you can find the rest of the sourcesHere)



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  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160  
161  
162  
163  
164  
165  
166  
167  
168  
169  
170  
171  
172  
173  
174  
175  
176  
177  
178  
179  
180  
181  
import java.awt.Canvas;
import java.awt.Graphics2D;
import java.awt.event.*;
import java.awt.image.BufferStrategy;
import javax.swing.JFrame;
import java.awt.Color;
import java.io.IOException;
import java.awt.GraphicsEnvironment;
import java.awt.GraphicsDevice;
import java.awt.DisplayMode;

public class Game extends Canvas  {

   public MapLoader maper;
   public static Keyb board;
   public static boolean up,down,left,right,space;
   private static int gameWidth=800;
   private static int gameHeight=600;
   //private static DisplayMode BDM = new DisplayMode(800, 600, 16, 0);
   private BufferStrategy bufferStrategy;

   public Game()  {
      if (System.getProperty("os.name").equals("Linux")) {
         try{
            // suppress the X11 key repeat problem
            Runtime.getRuntime().exec("xset r off");
         }
         catch(IOException ex){
            ex.printStackTrace();
         }
      }
      System.out.printf("System is [%s]\n",System.getProperty("os.name"));
      JFrame mainFrame;
      mainFrame = new JFrame("bleh");      
      board = new Keyb();
      DisplayMode displayMode = new DisplayMode(gameWidth, gameHeight, -1,
            DisplayMode.REFRESH_RATE_UNKNOWN);      
      GraphicsDevice device = GraphicsEnvironment.
      getLocalGraphicsEnvironment().getDefaultScreenDevice();
      device.getDefaultConfiguration();
      mainFrame.setResizable(false);
      mainFrame.setUndecorated(true);
      mainFrame.setVisible(true);
      mainFrame.createBufferStrategy(2);
      bufferStrategy = mainFrame.getBufferStrategy();
      device.setFullScreenWindow(mainFrame);        
      if(device.isDisplayChangeSupported()) {
         try {device.setDisplayMode(displayMode);}
         catch(IllegalArgumentException exception) {}        
         mainFrame.setSize(gameWidth, gameHeight);
      } else {shutdown();}
      validate();
      mainFrame.addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent e) {
            shutdown();
         }
      });
      mainFrame.addKeyListener(board);
      requestFocus();      
      maper= new MapLoader(this);      
      init();        
   }  

   public void init(){

      maper.loadResources();
      maper.setBackground(maper.loadImage("coalescence1280.jpg"));
      maper.loader(1);
      board.up=false;
      board.down=false;
      board.left=false;
      board.right=false;
      dashboard();
   }

   public void gameLoop() {
      long startTime = System.nanoTime();
      boolean gameRunning = true;
      while (gameRunning) {
         long elapsedTime = (System.nanoTime() - startTime) / 1000000;
         startTime = System.nanoTime();
         Graphics2D g = (Graphics2D) bufferStrategy.getDrawGraphics();
         try { Thread.sleep(10); } catch (Exception e) {}  

         for (int i=0;i<elapsedTime / 5;i++) {            
            logic();              
            maper.update((long)i);
            maper.draw(g,MapLoader.newx2Map,gameWidth,536,elapsedTime);
            //dashboard();
            g.dispose();
            bufferStrategy.show();  
         }        
         /*
         if ((elapsedTime % 5) != 0) {            
            logic();              
            maper.update(elapsedTime % 5);
            maper.draw(g,MapLoader.newx2Map,wwidth,wheight,elapsedTime);
            //dashboard();
            g.dispose();
            strategy.show();  
         }  
          */

      }      
   }

   public void dashboard(){

      Player zontrox = maper.zontrox;
      Graphics2D g = (Graphics2D) bufferStrategy.getDrawGraphics();
      g.setColor(Color.black);
      g.fillRect(0,536,800,600);
      g.setColor(Color.white);
      g.drawString("Health",230,563);
      g.drawString("Laser",230,575);
      g.drawString("Booster",230,587);
      g.setPaint(Color.red);
      g.fillRect(290,556,Player.MAX_SHIELDS,5);
      g.setPaint(Color.blue);
      g.fillRect(290+Player.MAX_SHIELDS-zontrox.getShields(),556,zontrox.getShields(),5);
      g.drawImage(maper.loadImage("dashboard.png"),0,536,null);
      //g.dispose();
      //strategy.show();      
   }

   public void logic(){
      playerMover();
      creatureMover();  
   }

   public void playerMover(){
      //Creature player = (Creature)MapLoader.newx2Map.getPlayer();      
      Player zontrox = maper.zontrox;
      float velocityX = 0;
      float velocityY = 0;
     
      if (board.left) {  
         velocityX-=zontrox.getMaxSpeed();
      }
      if (board.right){
         velocityX+=zontrox.getMaxSpeed();
      }  
      if (board.up){        
         velocityY-=zontrox.getMaxSpeed()*2;
      }      
      if (board.down){
         velocityY+=zontrox.getMaxSpeed();
      }
      if (board.space){
         maper.lazer();
      }
      if (board.exit){
         shutdown();
      }
      zontrox.setVelocityX(velocityX);
      zontrox.setVelocityY(velocityY);
   }


   public void creatureMover(){      
      Creature gule = (Creature)maper.guleSprite;
      if (gule!=null){      
         if (maper.bump){
            //make creature to go the opposite direction on *BUMP*
            gule.setVelocityX(gule.getVelocityX()*-1);
         }
      }
   }  

   public static void shutdown(){
      if (System.getProperty("os.name").equals("Linux")) {
         try{Runtime.getRuntime().exec("xset r on");}
         catch(IOException ex){ex.printStackTrace();}
         System.exit(0);
      }
   }

   public static void main(String argv[]) {
      Game g =new Game();
      g.gameLoop();  
   }
}
6  Discussions / General Discussions / Re: Fullscreen mode in Java on: 2007-06-22 07:16:42
hi there, I'm using linux too..
i have exactly the same problem here.. unable get real full screen modes ..
only the frame gets resized to the size of my actual desktop resolution.

so my desktop is 1280x1024x32
and i would like my game to be 800x600x32
it works fine in window mode.. but i would like to go fullscreen..
i could "Runtime.getRuntime().exec("xrandr --size 2");
but it's not the 'nice way Wink

could you tell me how you did it please?
how can i change resolution from with my game?

tnx Smiley
7  Game Development / Shared Code / Re: 2d platform game on: 2007-06-21 02:44:26
Basically, I'd add some faster memory-heap-safe-Threads to the code
That's my point.

hi there, i got it working like this:

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  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
import java.awt.Image;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.PhantomReference;
import java.io.IOException;

public class Sprite {

    private Image anim;
     private Reference phantom;
     private ReferenceQueue<? extends Reference> refQueue = new ReferenceQueue<PhantomReference>();
    public float x;
    public float y;
    private float dx,dy;
    private float lastdx,lastdy;
    public static float zx;
    public static float zy;

    public Sprite(Image anim) {
        this(anim, new ReferenceQueue<PhantomReference>());
    }

     public Sprite(Image anim, ReferenceQueue<? extends Reference> refQueue) {
             this.anim = anim;
             this.phantom = new PhantomReference(anim, refQueue);
             this.refQueue = refQueue;
     }

      public void finalize() throws IOException {  
          anim = null;
          phantom.clear();  
             try {
                    super.finalize();
                }
                catch(Throwable e){
                    throw new IOException(e.getMessage());
                }  
         }
   
    public Image update(long elapsedTime) {
        x += dx * elapsedTime;
        y += dy * elapsedTime;  
        zx = x;
        zy = y;
      return anim;
    }
   
    public float getMaxSpeed() {
        return 0.2f;
    }

    public void wakeUp() {
    }

    public float getX() {
        return x;
    }

    public float getY() {
        return y;
    }

    public void setX(float x) {
        this.x = x;
    }


    public void setY(float y) {
        this.y = y;
    }

    public int getWidth() {
        return anim.getWidth(null);
    }

    public int getHeight() {
        return anim.getHeight(null);
    }

    public float getVelocityX() {
        return dx;
    }

    public float getVelocityY() {
        return dy;
    }

    public void setVelocityX(float dx) {
        if (getVelocityX()!=0){
        this.lastdx=this.dx;
        }
        this.dx = dx;
     
    }
    public float getlastdx() {
        return lastdx;
    }  

    public void setVelocityY(float dy) {
        this.lastdy=this.dy;
        this.dy = dy;
    }
   
    public float getlastdy() {
        return lastdy;
    }

    public Image getImage() {
        return anim;
    }
   
    public Object clone() {
        return new Sprite(anim);
    }  
}


is this the way you were speaking about ?
So basicaly what it does is, help the objects to be better garbage collected?
performance wise, it roughly the same as before.. maybe when i'll add more entities, i'll see the benefit of such methods?

tnx



8  Game Development / Shared Code / Re: 2d platform game on: 2007-06-20 12:06:30
Basically, I'd add some faster memory-heap-safe-Threads to the code, e.g. your sprite uses an Image as the data-buffer and doesn't make it softly allocated. I'd add a PhantomReference to it

snip code

That's my point.
You may try this code and test it. That might be faster with larger amount of sprites. Notice the finalize meth that explicitly clears the buffer. It also may be linked with other Sprites for animation throughout a common ReferenceQueue given as contructor arg. Roll Eyes Roll Eyes Roll Eyes



thanks for the advice Smiley
i tryed to do it, i added the 3 imports (ReferenceQueue, Reference, and PhantomReference)
but i got some error with  super.finalize();
it said something about throwable exception iirc ..
i'll try again tommorow, see if i can make this working.. i've never heard of theses classes before, and i have no idea what's their purposes and how i can use em.. i'll browse a bit more through java 6 api-docs
..i appreciate the help anyway Smiley
9  Game Development / Shared Code / Re: 2d platform game on: 2007-06-20 01:58:56
Nice game!!  Graphics are really arcadey  Cheesy, and it's cool the way you can fly/levitate.  I want to get out of work so I can try it out properly.

Keith

i would appreciate to get some comments about how messy, wrong and redundant the code appears to you folks..
it would help me improve if i could get some advices ..
if some ppl have time to have a quick look at the code, please?
can you spot big mistakes ? i surely did lots of them..
i create direct links so it's easier to see the code.. there's 11 classes:

Game.java
IOLoader.java
Sprite.java
MapHandler.java
MapLoader.java
Keyb.java
Creature.java
PowerUp.java
Player.java
Bullet.java
Grub.java

that's it..

thanks Smiley
10  Game Development / Shared Code / Re: 2d platform game on: 2007-06-19 10:28:14

Quote
Are the graphics original? :-o

no.. it's explained in the first post.
i borrowed them from other games.

there's some graphics from the nintendo "metroid" series,
and some other found on some public domain ressources on the net..

i plan to change them, but i'm not in a hurry.. i'll create home made graphx little by little..
except if i get lots of complains, i'll have to remove them immediatly..
but for now they're used. they're temporary graphics, just to test the engine ..

i don't plan to sell anything, i don't plan to deceive anyone. it's just temporary graphics.
and all my "space weasel"  sources are gpl v2 .. until gpl v3 is out.


11  Game Development / Shared Code / Re: 2d platform game on: 2007-06-19 09:17:03
thanks for the nice words Smiley

but there's nothing to do yet..
you can just kill few monsters, walk through few doors and that's it ..
i plan to add all the interesting stuffs in next version..

i have to figure how to make the bullets to not follow you when you go left and right too Wink
create dying animation for monsters, real size level, figure how to go fullscreen, create a game menu  etc etc ..

i'm slow though, next version could take 2 months or more Wink

12  Game Development / Shared Code / 2d platform game on: 2007-06-18 13:21:44
hi there,
I'm sharing some code from my project "space weasel" Wink
first the java web start link: space weasel
then the whole archive, ready to import in eclipse: sweasel2.tgz

context highlighted source: here
not much comments though..

it's still a work in progress.. but i thought it might be of some interest for some ppl willing to
get some working exemple to look at, to build their own games.

hum i don't know what step i should take to release something under gpl, someone could tell me?
ah, i forgot, graphs are "borrowed" from various games.. mainly metroid series.
if i get complains, i'll remove them quicker than planned and replace them with homebrewd ones Wink
tnx
13  Java Game APIs & Engines / Java 2D / isometric tile tutorial? on: 2006-11-08 03:24:06
hi there, i'm searching some online tutorials to show me how to program isometric tile games in java.
i'm looking from beginner level. so far all i did was a simple 2d rpgish tile based game with some scrolling abilities (see shared code forum) ..but..
i'm still pretty much newbie level..
someone knows about good places?
some tutorials like kevglass ones would be very nice .. but about isometric tiles

thanks ..
14  Discussions / General Discussions / Re: JGF now paying $25 per article on: 2006-11-08 03:08:48
err stupid question maybe but, where are located all thoses articles and tutorials ?
15  Game Development / Shared Code / java 2d rpg game on: 2006-11-07 05:09:42
hi there, i'm contributing some code from my game project "Tomb Sniffer" Wink
(i originaly created this topic in "java2d, but i feel it's more appropriate here in "Shared code,
and the game progressed a bit too since last time..)

it's my first project in java.. i learned doing this.
it's based off Kevin Glass cokeandcode tutorials.
i'm still beginner level, but i think this code might help other newbies outhere
willing to try making their first game.

so here's the java web start version: here
and the "tutorial" and sources are here
most of the sources yet need to be commented.. but i created it step by step so it's progressive difficulty.
starting with barebone 3 classes, step by step it grew into 10 classes project.

as of the current version there's:
- tile map, with collision detection and scrolling
- character animation
- sounds
- monster use random move (no pathfinding yet..)

i now need to add pathfinding and more stuff for the gameplay, like doors and keys, more enemies and traps, and make the level prettier with more graphics.
but all the basic stuff is here allready, working..

any help / comments welcome Smiley
16  Java Game APIs & Engines / Java 2D / Re: my first java game ("rpg" kind of ..) on: 2006-10-25 06:12:53
thanks for the kind words..
about the jerky player movement,
at first i tryed to simplifiate Kevin Glass tutorials,
so i removed things that looked tricky to me, so i removed the timer and the use of floats for movements.
the use of float were so you could walk across cells..by using ints instead all you do is jumping from one cell to the other.
now that i understand things a bit better i might try to enable floats for movements again.

i'm also unsatisfied with my animations,
i wanted to use animated gifs, but couldn't find any "simple and good tutorial. so i went by storing single static pics in an array and simulate the animation myself.

i would appreciate any help about how to access animated gif frames so i can put then in an array. that would prevent to have lots of separate pics..
 .. so far i have 2pics for each directions. (up1.gif, up2.gif / down1.gif,down2.gif..and so on..same for the other entities) it would really simplify to be able to put everything together like: 1pic for hero.gif, and 1another pic for monster..that would be all, or am wrong trying to do this?

but well...at least it's working.. so i'm now looking at scrolling functionalities Smiley
some one would care to review quickly the code, telling me if there's no really stupid things done in there ? Smiley
or help me with animation?

thanks
17  Java Game APIs & Engines / Java 2D / my first java game ("rpg" kind of ..) on: 2006-10-25 01:56:31
hi there, i'm new to java,
i've made my first game..it's based on Kevin Glass cokeandcode tutorials.
it's far from finished, but i wanted to share what i got so far.
the java web start version is  here
and the "tutorial" and sources are here
sources need to be yet commented..
i did what i could considering my poor skills Wink code maybe really weird at certain times ..

there are few thing i would like to implement now, like:
- pathfinding... the monter right now just move randomly.. i would like em to chase the player as soon as he comes near monsters..
- bigger level with scrolling (game area larger than displayed)
- more stuffs likes doors and keys (you would need to find first proper key to unlock some doors)
that kind of things ..

i think this little project might be useful for other newbies like me who like to learn by examples..
any comment and help welcome Smiley

(updated: webstart link with newer version)
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.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (40 views)
2014-12-09 22:41:13

BurntPizza (75 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (113 views)
2014-11-26 15:22:04

toopeicgaming1999 (100 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
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

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
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!