Hi everyone, I am quite new at this. Right now I managed to make Java Web Start work with JME, and all the project is completely built with maven. It was hard, but now I made maven do all the tricks :).
I have a little problem with some basic Hello World:
public static void main(String[] args) {
StandardGame game = new StandardGame("Fullbot Viewer");
game.start();
DebugGameState gameState = new DebugGameState();
GameStateManager.getInstance().attachChild(gameState);
gameState.setActive(true); // Activate it
final Box box = new Box("TestBox", new Vector3f(), 1.0f, 1.0f, 1.0f);
box.setRandomColors();
GameTaskQueueManager.getManager().update(new Callable<Object>() {
public Object call() throws Exception {
box.lock();
return null;
}
});
box.updateRenderState();
gameState.getRootNode().attachChild(box); // Attach the box to rootNode in DebugGameState
gameState.getRootNode().updateRenderState();
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
game.shutdown();
}
This basically shows a Box for 10 secs, then shuts down everything. Right now, the Box moves accordingly with either mouse or keyboard input. I DON'T WANT THAT.
I have looked and the Box has a getControllers, which it has none, the gameState.getRootNode also has a getControllers, which has no controllers.
I have read GameControl Basic tutorials, but either i don't get it, or i am completely looking in the wrong place :)
Since I am new, I am reusing the DebugGameState Class, eventually when I get in touch with JME i will try making my own.
The whole Idea is to have a Java Web Start Application with JME, and play something like an animation, the user won't be able to interact (maybe at one point it will have a play, stop, pause, backward, forward buttons, but this is a milestone for the future).
Two Questions:
1) How do I make my code to basically not listen to any input, I just want a box standing there for 10 secs.
2) More general question, since I explained the main goal (The Java Web Start basically is going to receive a file with rows, each row will have position of each object, and i want to make an application that loops through each row moving the objects, in an animation fashioned way), I am going to the right direction????? (Using StandardGame as main class, etc) Any tips welcomed!
Thanks in advance!