Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
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]
 

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

The first screenshot will be displayed as a thumbnail.

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

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

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

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

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

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

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

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

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

Riven (57 views)
2014-07-14 18:02:53
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!