Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
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 / live to learn on: 2010-03-16 16:37:36
i'm a mobile developer engineer ,and work base on j2me+eclipse/NetBeans IDE platform.
i'm from china,and nice to meet you,my friend,
my skype is ishailin
my MSN is ailin8@163.com
i'd like to have friends with you ,and we can learn together
2  Game Development / Game Play & Game Design / Re: How to update the files of my game on: 2010-03-16 16:22:59
java can not supply this function,but if you are base on c++ as mtk or symbian you can do this
three years ago i have the idea as you ...
3  Game Development / Game Play & Game Design / Re: Different scales or ZOOM effect, how ?! on: 2010-03-16 16:18:07
it's easy to do with this tools i made
my skype is  ishailin and msn is ailin8@163.com
i can send the tools to you

public class gCanvas extends Canvas{
   Image img;
   Zoom zoom = new Zoom();
   gCanvas()
   {
      try {
         img = Image.createImage("/menu160.png");
         zoom.setImage(img, W, H);
      } catch (IOException e) {
         e.printStackTrace();
      }
   }
   
   int W=50,H=70;
   protected void paint(Graphics g) {
      zoom.draw(g,this.getWidth()>>1, this.getHeight()>>1, 3);
      g.drawImage(img, this.getWidth()>>1, this.getHeight()>>1, 3);
   }
   protected void keyPressed(int key)
   {
      zoom.setSize(W+=5,H+=5);
      repaint();
   }
}

//-------------------------------------------------------------------------------------------------------------



public class Zoom {

            private AbstractImage globe;
            private AbstractImage lastRenderedImage;
            private ImageTransformationResize resizer;
            private int oldW;
            private int oldH;


            public void setImage(Image img, int w, int h) {
/*  19*/        try {
/*  19*/            Dispose();
/*  20*/            globe = new SmartImage(img);
/*  21*/            resizer = new ImageTransformationResize();
/*  22*/            setSize(w, h);
                }
/*  24*/        catch (Exception ex) {
/*  26*/            ex.printStackTrace();
                }
            }

            public void Dispose() {
/*  32*/        globe = null;
/*  33*/        lastRenderedImage = null;
/*  34*/        resizer = null;
            }

            public void setSize(int w, int h) {
/*  39*/        if (w <= 0 || h <= 0) {
/*  41*/            return;
                }
/*  43*/        if (w == oldW && h == oldH) {
/*  45*/            return;
                } else {
/*  49*/            oldW = w;
/*  50*/            oldH = h;
/*  52*/            lastRenderedImage = null;
/*  53*/            lastRenderedImage = new SmartImage(w, h);
/*  54*/            resizer.setTargetDimensions(w, h);
/*  55*/            resizer.process(globe, lastRenderedImage);
/*  56*/            return;
                }
            }

            public void draw(Graphics g, int x, int y, int anchor) {
/*  60*/        lastRenderedImage.drawOnGraphics(g, x, y, anchor);
            }
}
Pages: [1]
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (84 views)
2013-05-17 21:29:12

alaslipknot (92 views)
2013-05-16 21:24:48

gouessej (123 views)
2013-05-16 00:53:38

gouessej (117 views)
2013-05-16 00:17:58

theagentd (127 views)
2013-05-15 15:01:13

theagentd (114 views)
2013-05-15 15:00:54

StreetDoggy (158 views)
2013-05-14 15:56:26

kutucuk (180 views)
2013-05-12 17:10:36

kutucuk (180 views)
2013-05-12 15:36:09

UnluckyDevil (187 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.128 seconds with 21 queries.