Wednesday, November 30, 2011

Marte Engine Graphic Rouge Like Tutorial 02

0 commenti
Resources, Menu and Game worlds, Hero and Walls

Welcome reader to this tutorial! I'll show you how to build a rougelike with MarteEngine. For more information about MarteEngine, please see http://github.com/Gornova/MarteEngine. This tutorial is inspired from same serie from Trystan (http://trystans.blogspot.com/) and follow the same organization, so let's start!

In this second tutorial we have in mind to show you how to load and use resources, setup a menu/game worlds, show brave hero moving into dungeons and controlling it using keyboard..

Resources

Rougelike we are building is not a text rougelike. Instead I've decided to use beautiful-retro Oryx tileset, http://forums.tigsource.com/index.php?topic=8970.0 and here http://www.oryxdesignlab.com/sprites/
Why this choice?
Because I want a retro feel for this rougelike, but not so much retro! Please keep in mind that Oryx tilesets are licensed using Creative Commons non commercial means thanks Oryx, don't make money with it and no alter his work!
So let's download Oryx tileset from his site, here We need for this tutorial two tileset: lofi_char.png and lofi_enviroment.png , just copy it into your data directory.
Now open data/resource.xml and change it as follow:


 
 
  



as mentioned into tutorial 01, we will use MarteEngine resource manager to load our assets, in particular oryx tilesets. Note debug information when game runs:

DEBUG:Trying to load spritesheet file 'lofi_char.png' with width 8 and height 8 without transparent color at key 'char'... 
DEBUG:Trying to load spritesheet file 'lofi_environment.png' with width 8 and height 8 without transparent color at key 'env'...

Means that tilesets are loaded correctly!


Menu and Game worlds

It's time to setup a decent menu/game transitions, so add a new Main.java file as follow;
package merlTut;

import it.marteEngine.ResourceManager;

import java.io.IOException;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;
import org.newdawn.slick.util.Log;

public class Main extends StateBasedGame {

 private static boolean ressourcesInited;

 public Main(String title) {
  super(title);
 }

 @Override
 public void initStatesList(GameContainer container) throws SlickException {
  initResources();
  // add worlds
  addState(new MenuWorld(0, container));
  addState(new GameWorld(1, container));
 }

 public static void initResources() throws SlickException {
  if (ressourcesInited)
   return;
  try {
   ResourceManager.loadResources("data/resources.xml");
  } catch (IOException e) {
   Log.error("failed to load ressource file 'data/resources.xml': "
     + e.getMessage());
   throw new SlickException("Resource loading failed!");
  }

  ressourcesInited = true;
 }

 public static void main(String[] argv) {
  try {
   AppGameContainer container = new AppGameContainer(new Main(
     "Marte Engine Rouge Like Tutorial"));
   container.setDisplayMode(640, 480, false);
   container.setTargetFrameRate(60);
   container.start();
  } catch (SlickException e) {
   e.printStackTrace();
  }
 }

}

Keep in mind that every world MUST have and unique Id, for example MenuWorld have id 0 and GameWorld 1. Also create GameWorld and MenuWorld:

package merlTut;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

import it.marteEngine.World;

public class MenuWorld extends World {

 public MenuWorld(int id, GameContainer container) {
  super(id, container);
 }
 
 @Override
 public void render(GameContainer container, StateBasedGame game, Graphics g)
   throws SlickException {
  super.render(container, game, g);
  
  g.drawString("Menu, press space to play", 5, 5);
 }
 
 @Override
 public void update(GameContainer container, StateBasedGame game, int delta)
   throws SlickException {
  super.update(container, game, delta);

  Input input = container.getInput();
  if (input.isKeyPressed(Input.KEY_SPACE)){
   // goto game world
   game.enterState(1);
  }
 }

}


package merlTut;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

import it.marteEngine.World;

public class GameWorld extends World {

 public GameWorld(int id, GameContainer container) {
  super(id, container);
 }
 
 @Override
 public void render(GameContainer container, StateBasedGame game, Graphics g)
   throws SlickException {
  super.render(container, game, g);
  
  g.drawString("Game", 5, 5);
 } 
 
 @Override
 public void update(GameContainer container, StateBasedGame game, int delta)
   throws SlickException {
  super.update(container, game, delta);

  Input input = container.getInput();
  if (input.isKeyPressed(Input.KEY_ESCAPE)){
   // goto menu world
   game.enterState(0);
  }
 } 

}

Run Main.java and notice that you can change two worlds using space and escape from your keyboard. Having two different worlds for menu and game helps you in organize your game and separate your code logic, again a good thing!

Hero

Hero is player avatar into game: as rougelike, is the most thing in game. So let's show it! First, decide what tile you want for your brave hero:

Heroes never sleep!


Hero will be in your code as MarteEntine entity, so let's create it!

package merlTut;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;

import it.marteEngine.ResourceManager;
import it.marteEngine.entity.Entity;

public class Hero extends Entity {

 public static final String HERO = "hero";
 private static final String UP = "up";
 private static final String DOWN = "down";
 private static final String LEFT = "left";
 private static final String RIGHT = "right";

 private static final int tileSize = 8;
 private static final int scaleFactor = 4;
 private static final int step = tileSize * scaleFactor;

 public Hero(float x, float y) {
  super(x, y);

  setGraphic(ResourceManager.getSpriteSheet("char").getSubImage(1, 0).getScaledCopy(scaleFactor));

  setHitBox(0, 0, tileSize * scaleFactor, tileSize * scaleFactor);
  addType(HERO);

  defineControls();
 }

 private void defineControls() {
  define(UP, Input.KEY_W, Input.KEY_UP);
  define(DOWN, Input.KEY_S, Input.KEY_DOWN);
  define(LEFT, Input.KEY_A, Input.KEY_LEFT);
  define(RIGHT, Input.KEY_D, Input.KEY_RIGHT);
 }

 private void updateMovements() {
  if (pressed(UP)) {
   move(0, -1);
  } else if (pressed(DOWN)) {
   move(0, 1);
  } else if (pressed(RIGHT)) {
   move(1, 0);
  } else if (pressed(LEFT)) {
   move(-1, 0);
  }
 }

 private void move(int dx, int dy) {
  x += dx * step;
  y += dy * step;
 }

 @Override
 public void update(GameContainer container, int delta)
   throws SlickException {
  super.update(container, delta);

  updateMovements();
 }

}

There are some key points to understand here! First set orys's tile as graphics for your brave hero, with this code:

setGraphic(ResourceManager.getSpriteSheet("char").getSubImage(1, 0).getScaledCopy(scaleFactor));

here we are using ResouceManager to get char spriteseet and in particular one image. We scale it, to have a bigger image: for retro feel and to have something to see too.

setHitBox(0, 0, tileSize * scaleFactor, tileSize * scaleFactor); addType(HERO);

here we are defining some code for collisions: first hitbox around hero position and then adding type of this entity: HERO of course, so will be more easy to check collisions against it later.


 private void defineControls() {
  define(UP, Input.KEY_W, Input.KEY_UP);
  define(DOWN, Input.KEY_S, Input.KEY_DOWN);
  define(LEFT, Input.KEY_A, Input.KEY_LEFT);
  define(RIGHT, Input.KEY_D, Input.KEY_RIGHT);
 }
 

//then we define controls: using arrows and WASD to move brave hero!


 private void updateMovements() {
  if (pressed(UP)) {
   move(0, -1);
  } else if (pressed(DOWN)) {
   move(0, 1);
  } else if (pressed(RIGHT)) {
   move(1, 0);
  } else if (pressed(LEFT)) {
   move(-1, 0);
  }
 }

 private void move(int dx, int dy) {
  x += dx * step;
  y += dy * step;
 }

 @Override
 public void update(GameContainer container, int delta)
   throws SlickException {
  super.update(container, delta);

  updateMovements();
 }

And update logic, of course: every entities are updated from his world and for Hero we update movements, control if movements keys are pressed and move hero according to it (remember: origin of screen is on top left or your screen!).
Move itself is trivial: just change coordinates of entity using directions and step. Note that step is decided as tileset size (8 pixels) multiply for scalefactor (4): this means that every step of our hero mean 32 pixels on screen!
Just don't forget to add hero to gameWorld:

 
        public GameWorld(int id, GameContainer container) {
  super(id, container);
  
  add(new Hero(64, 64));
 }






Run Main and you can see on gameWorld a moving hero!


Hero, alone, in darkness, familiar, right?


Walls


An alone hero in an empty world is not so exciting, so let's add some static walls. First define Wall class:

package merlTut;

import it.marteEngine.ResourceManager;
import it.marteEngine.entity.Entity;

public class Wall extends Entity {

 private static final int tileSize = 8;
 private static final int scaleFactor = 4;

 public Wall(float x, float y) {
  super(x, y);

  setGraphic(ResourceManager.getSpriteSheet("env").getSubImage(0, 2).getScaledCopy(scaleFactor));

  setHitBox(0, 0, tileSize * scaleFactor, tileSize * scaleFactor);
  addType(SOLID);
 }

}

Note that Wall have a special collision type: SOLID. This means that we don't want that hero can pass it! And then adding some walls into GameWorld:

 public GameWorld(int id, GameContainer container) {
  super(id, container);
  
  add(new Hero(64, 64));
  
  add(new Wall(128,128));
  add(new Wall(96,128));
  add(new Wall(64,128));
 }

Walls are in place, but if your run game, hero can pass it without stopping it! That's not possible! You have to check collisions between walls and player and most logic place is to handle it when player moves, on Hero.updateMovements method:

 private void updateMovements() {
  if (collide(SOLID, x, y-step)==null && pressed(UP)) {
   move(0, -1);
  } else if (collide(SOLID, x, y+step)==null && pressed(DOWN)) {
   move(0, 1);
  } else if (collide(SOLID, x+step, y)==null && pressed(RIGHT)) {
   move(1, 0);
  } else if (collide(SOLID, x+step, y)==null && pressed(LEFT)) {
   move(-1, 0);
  }
 }


we use MarteEngine collide function to check if (when player move on a certain direction, making a step), there is a SOLID entity. If no SOLID entity is found, hero can move. Run example again: now player can't move inside walls, and this is good!

no, this is not a platform!


Note: if you define a debug key, using this code in Main.main method

 public static void main(String[] argv) {
  try {
   ME.keyToggleDebug = Input.KEY_1;


using key "1" on keyboard you can see as red rectangles entities hitboxes:







useful when you develop your game, no?


Conclusion

In this second tutorial we have setup menu and game worlds, learned how to have a hero moving on screen and some walls to check collision against.

You can download eclipse project from here, good coding! 

Monday, November 28, 2011

Xenosquad

0 commenti
Do you remember the old X-com games? Xenosquad is a clone with less features, but interesting ideas:
  • some enemis fires on last position of  on your team, forcing you on continue move
  • great difficulty control using spawning points for enemies
  • progression of your team, using both equipment and skills
  • good graphics with 3d
  • good performance
Go and play it, a good turn based squad based game

Wednesday, November 23, 2011

Marte Engine Graphic Rouge Like Tutorial 01

0 commenti
Project setup, HelloWorld, distribution

Welcome reader to this tutorial! I'll show you how to build a rougelike with MarteEngine. For more information about MarteEngine, please see http://github.com/Gornova/MarteEngine. This tutorial is inspired from same serie from Trystan (http://trystans.blogspot.com/) and follow the same organization, so let's start and setup the new project!

Project setup

You must install and download both Eclipse (I'll assume you will use this IDE for your development) and Java to do this tutorial and create a new Java Project. New projects are empty, but you will fill it soon! First of all, add two new folders and call them lib and data. Not so surprising in lib data we will put library and in data all game assets (graphics, sounds and so on). Create a new folder inside lib folder and call it native, I'll explain his use later.
You need now to download MarteEngine from http://github.com/Gornova/MarteEngine , in this tutorial I'll refereer to version 0.3 of MarteEngine, download this version and be sure to be name it as marteEnginev03-dev.jar But what is MarteEngine? MarteEngine is a jar (a java library) a set of useful classes help brave developers in their duties, in this case build a rouge like. MarteEngine have also some dependencies: Slick and lwjgl, you don't care for now about this libraries, so just download it from MarteEngine github site
You have also to download native libraries for lwjgl for your system: windows, mac or linux.
When you have done this, just add all three jars to your build path (select them and right click, then buil path  then add to build path). Jars are now added as references libraries into your project and you can use classes. In order to setup your project correctly, you need to set native folder for lwjgl jar, so select into rerefernced libraries, right click, properties then native location and select a workspace location, yes, lib/native folder!



It's time to add also a package for your future classes, just add it and call it merlTut
It's also time to define resource file: it's used with MarteEngine to help you in loading and managing your game's assets, sounds, images and so on. So create inside data folder a resource.xml with this content:

Hello World

Now that project is setup, it's time to test it. Add a new class file, HelloWorld.java and copy/paste this code:

package merlTut;
import it.marteEngine.ResourceManager;
import it.marteEngine.World;
import it.marteEngine.entity.TextEntity;

import java.io.IOException;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;
import org.newdawn.slick.util.Log;

public class HelloWorld extends StateBasedGame {

 private static boolean ressourcesInited;

 public HelloWorld(String title) {
  super(title);
 }

 @Override
 public void initStatesList(GameContainer container) throws SlickException {
  initResources();

  World world = new World(0, container);
  world.add(new TextEntity(100, 100, null, "Hello World!"));
  addState(world);
 }

 public static void initResources() throws SlickException {
  if (ressourcesInited)
   return;
  try {
   ResourceManager.loadResources("data/resources.xml");
  } catch (IOException e) {
   Log.error("failed to load ressource file 'data/resources.xml': "
     + e.getMessage());
   throw new SlickException("Resource loading failed!");
  }

  ressourcesInited = true;
 }

 public static void main(String[] argv) {
  try {
   AppGameContainer container = new AppGameContainer(new HelloWorld(
     "Hello World Marte Engine"));
   container.setDisplayMode(640, 480, false);
   container.setTargetFrameRate(60);
   container.start();
  } catch (SlickException e) {
   e.printStackTrace();
  }
 }
}

Running this code an empty black window will open with no content inside: boring, yes? So just add a "Hello World" message, modifing initStatesList and adding this lines:

 @Override
 public void initStatesList(GameContainer container) throws SlickException {
  initRessources();

  World world = new World(0, container);
  world.add(new TextEntity(100, 100, null, "Hello World!"));
  addState(world);
 }

Now run your code a simple "Hello World", message will be rendered into your game's window



It's time to understand this basic example and then move on. Let's start with class definition: with this code we are subclassing a classes from slick that will help us to separate your game in different states: one for menu, one for game, one for achievements, but this are examples.


public class HelloWorld extends StateBasedGame {

 public static void initResources() throws SlickException {
  if (ressourcesInited)
   return;
  try {
   ResourceManager.loadResources("data/resources.xml");
  } catch (IOException e) {
   Log.error("failed to load ressource file 'data/resources.xml': "
     + e.getMessage());
   throw new SlickException("Resource loading failed!");
  }

  ressourcesInited = true;
 }


with this code we are subclassing a classes from slick that will help us to separate your game in different states: one for menu, one for game, one for achievements, but this are examples.
initResources it's a utility method that load, using MarteEngine ResourceManager class, all your resources into memory, to be used after. For now we don't have resources, but soon we'll have something to put on screen, right?

  World world = new World(0, container);
  world.add(new TextEntity(100, 100, null, "Hello World!"));
  addState(world);

with this code we are using a powerful mechanism from MarteEngine: Worlds and Entities. Worlds: are game states remember before? Game menu or game itsefl is a world. Worlds render and update all your entities, help you to remove when they are not so useful anymore and have many utilities methods. Entities: are your game objects. TextEntity is an example, but a monster, the hero, a wall are also entities. They can recieve input, be rendered on screen and updated. In this case, we are just defining an empty, general world and adding TextEntity (an entity that just show some text on screen), later we will use them for more complex duties.

Distribution

You have different ways to distribuite your game: as jar, applet or webstart. We decide to use webstart because is easy and fast to use for user and developer. For more information about webstart, take a look here: http://en.wikipedia.org/wiki/Java_Web_Start
First you need to build a script directory and create a manifest.txt file with this content:

Manifest-Version: 1.0
Created-By: MarteEngine
Main-Class: @package@.@class@
Class-Path: lib/slick.jar lib/lwjgl.jar lib/marteEnginev03-dev.jar

and create a template.jnpl file into script directory:


    
        @title@
        Gornova
        @description@
        
        
        
            
        
    
    
        
    
    
        
        
        
        
     
    


Using webstart as distribution platform ask you some stuff to: export your project as a jar, sign it using a valid certificate and build the jnpl file. I've developed an ant script to do this stuff for you:


 
 
 

 
 
 
 
 
 

 
 
 
 
 
 
 
 


 
 
  
   
    
    
     
    
   
   
  
 

 
 
  
  
   
   
    
    
    
   
  
 

 
 
  
   
  
  
   
  
 

 
 
  
  
 

 
 
  
 

 
 
  
  
  
  
  
   
    
     
     
     
     
     
     
    
   
  
  
 

 
 
  
   
  
 

 
 
  
   
  
 

 
 
  
  
  
   
  
 

 
 
  
  

  
   
    






    






    






    






   
  
 

 
 
  
  
 

 
 
  
   
  
  
   
    
     
     
    
   
  
  
   
  
 



You can select in Eclipse build.xml file and right click on run target: ant target take care to compile and run your code.
To build a webstart for your project just launch webstart target: your project will be compiled, archived as jar and signed. To be signed you must specify some information: in this example all be signed with "testtest" when and target ask to you, so be sure to change it when you will put on internet!
A target directory will be created with a webstart subdirectory into, with this content: - HelloWorld.jar, jar with your project classes - HelloWorld.jnpl, java webstart file, to be used as local file (see above) - marteEnginev03-dev.jar, marteEngine directory double click on your HelloWorld.jnpl file and see webstart in action!
This kind of webstart must be used only offile, just for tests: to put it online, you must marteEnginev03-dev.jar file online at some http address and then change HelloWorld.jnpl here:

you must change jar href values, where your jars are placed. Then upload also your jnpl file online and your game will be ready to be used from anyone on internet! Note: you can also specify website, company information, name of jnpl file, just change variable values into build.xml file.

Conclusion

In this first tutorial we have setup our project and show a simple Hello World, prepare all for webstart distribution!

You can download eclipse project from here, good coding!

Wednesday, November 16, 2011

MarteEngine graphic rougelike tutorial summary

0 commenti
Hello to everyone wants to learn!
In this new series of tutorial my plan is to design, develop and share with anyone my experience in building a rougelike with MarteEngine,

I will use this post as summary for all the series, for now I have planned this tutorials for:

  1. Project setup, HelloWorld, distribution
  2. Resources, Menu and Game worlds, Hero and Walls
  3. Camera and random caves
  4. Creature and CreatureAi, Hero and digging
  5. Stationary monsters!
  6. Hitpoints, combat, messages
  7. More levels
  8. Concept, Line, Field of view, Fog of war
  9. Wandering monsters!
  10. Items, inventory and inventory screen
  11. Hunger and food

FAQS

Why this series?
Because I've learned so much from Trystan's series and I want to expand his work using my library, MarteEngine

Why use Java, Slick, MarteEngine and not another language or game development library?
Because I've a lot of experience with it and I think this is a great learning experience


Your english is n00b!
I know that, but most parte of this series will be code, so anyone can follow me!


I like code, where is it?
Any steps of this series will have a downloadable content

Why game development?
Because force programmer to think. Develop a game is not a easy task and in my experience you can learn a lot and adapt in another part of your professional life and .. wow, you can play a game in the end!

Why rougelike, try a 3d mmorpg instead!
I'm not a professionist in game development and I haven't so much time. You must always remembeer this: it's better use my time in develop (and learn) from a little project that starts a big project will never ends!

Monday, November 14, 2011

Blizzcon 2011 Starcraft 2 Final and esports

0 commenti


If  you like Starcraft or Starcraft 2 this video of last Blizzcon 2011 finals it's really awesome!

One consideration: I've played a lot Starcraft and a bit Starcraft 2 and it's amazing how engaging it's a finals. I don't know if this kind of game could be future of games, but enjoyed a lot watching this.
What do you think about esports? For now here (in Italy) isn't any sort of interest about this, but in Korea there are many many Starcraft esports fans.

Note: you have played Starcraft 1 or 2 at least for 1/2 match to understand this

Thursday, November 10, 2011

Kevin Glass interview

0 commenti

    1) Hi Kev and welcome on Random Tower of Games, can introduce yourself?

    Hello, I'm Kevin Glass, normally seen as kevglass or "cokeandcode". I've been developing games for a little over 25 years spanning back to the NASCOM and Sinclair Spectrum all the way to the modern era of iOS and Android. I love RPGs, I love retro games and I love pixel art.  I'm known for several games probably the most famous being Putty Puzzle and/or Legends of Yore.

    2) Why did you developed Slick?

    Slick came about because of the tutorials I wrote many years ago. I'm a big fan of Java and it's tooling and I like to encourage people to use it so I wrote some tutorials about getting 2D games working in Java and then eventually using OpenGL. I got a lot of questions about the tutorials and how to take them further and I thought the most simple way to answer them forever was to write a library that showed the basic ways of doing everything... Slick was born.

    3) What are plans for future of Slick? We can read on forum you think Slick is "done" and "complete" it's right?

    Slick is pretty much what it was intended to be. A modular toolkit for writing 2D games in Java with OpenGL. It's never tried to be the fastest, or the most elegant, just the easiest way to learn in without getting bogged down in details. I'll be doing bug runs as I always have but I don't think I'll be spending too much time on adding new features.
    However, that doesn't mean it's "dead". I get frustrated when developers seem to believe because a library isn't in a constant state of development it's no more use. Code doesn't just die like that, a useful tool is a useful tool.

    4) Talking about game development, where your inspiration comes from?


    My inspiration comes mostly from late 80s and 90s games. I loved Bullfrog, Bitmap Brothers and everything around then. When games felt like games and not "visual and audio experiences". I really enjoy puzzle games so you'll generally find a bit of puzzle in my stuff. Though my big love is for RPGs, I lived on Ultima 6 for 6 months - no joke.

    5) What games are must-play in this days?

    Must-play games these days? Well, Minecraft is great, Cave Story and anything by Niffla is worth checking out. Puppygames do some wonderful purest games. I also recommend checking out decent roguelike's like Tametick's Cardinal Quest.

    6) Your last project, Legends of Yore it's interesting can you explain it and tell us why you started a similar project with so different "end-user-tecnologies"?

    Legends of Yore was just meant to me experimenting with things that shouldn't be, oxymoron type things. Legends was meant to be a casual roguelike and a single player MMORPG. It ended up being a test at building a roguelike UI that worked on the mobile and then things just started getting out of hand. The game is pretty huge now and set to get bigger shortly. The different end user technology is just me as a geek keeping things interesting!

    7) Do you have plans to open this tecnology in the future? More platforms maybe? C64 support?

    The multi-platform technology might be available in the future, I really don't know yet. I think the Java to Flash stuff should be - I can imagine that having a huge impact on the Java Gaming world.

    8) Do you will partecipate on next Ludum Dare?

    Ludumdare was awesome last time, I'm so in next time! Can't wait.

    9) How do you organize your work? A massive todo-list or more "engeneerized"?
    I'm afraid I'm not organised at all. I just have a big TODO list that things move up and and down. That's it. I don't use tracking systems or any of that, just a text file in source control.

    10) You have a work a life, so how to hadle all this stuff with game development?

    My day job has to come first, every time. It's what pays the bills and keeps me fed. However, I'm lucky enough to work somewhere I can do my job well without being stressed out all the time. That leaves me plenty of time at lunch and at home to get all the interesting games stuff done.

    11) Three opensource or freeware games to play (not yours, of course :D)


    Cave Story
    Titan Attacks
    Cardinal Quest

    Cheers, Kev

Thanks to you Kev for this interview and for Slick!

Monday, November 7, 2011

Write one, run everywhere

0 commenti
Isn't Java a beautiful language? Free IDEs, so many frameworks a lot of books, tutorials, games and games engine (even my MarteEngine) powered by opensource and more important, you can live with it, thanks to J2EE.
But this is amazing: write with Java and create a fully working Flash games. Try it now!

Kev's idea is to write game code with Java and then, using a "script" (ant I suppose), translate it into as3 code. Idea is good and can open new ways to monetize your java game, in portals like Kongregate or Newsground and even move to most talked tecnology recently, HTML5 of course!

What do you think? Conversions of all of my games (in particulr Fuzzy) with Flash could really help me to get on more players, more feedback and more ideas