SandboxCode

This is the code at the moment.



Due to university and holidays the development isn't as far improved as I hoped.

Therefore I am still working at the code and not everything inside is needed or usefull.



Sandbox doesn't support any kind of terraforming at the moment.

The good thing, the userinterface is fine working and there should be no problem to add more functions.



Try it out or use the code for your own project (the interface is really usefull^^)





If you find any errors or small bug, report it please.

If you have fixes or anything else, your are also welcome.





Maybe next release I have more to share, but one step after the other^^





LINK:

http://code.google.com/p/jme-sandbox-worldeditor/

Lots of missing stuff when checking out from your svn…

Yeah, that's right



Don't forget, that Sandbox is my hobby project, therefore it has a lower priority than studying for university.

At the moment I don't get any benefit from the project. It would be an other case, if I could use it as work for the university or if I don't work alone.



And don't forget how long it takes to develop a working program. I'm working on it for 2 months, that's a really short period of time.

umm, no I mean lots of classes missing; cant compile, cant see any SandBox coolness  :expressionless:



I tried twice, am I just being a silly dilly yo?

Classes are missing? Strange…



Everything should be inside Sandbox, maybe I have some unnecessary imports, but the important code is inside sanbox.



Important classes:





Sandbox.java (starts sandbox)

GraphicWindowGL.java (application thats shows the 3D)

Sandbox_Tool.java (GUI Interface)





And for the first tries with Terraforming



Window_Create_Area.java

Window_Create_World.java

Area.java

World.java





AH! I found the problem:



Sandbox.class



Remove this:

import com.scenemonitor.SceneMonitor;

init:
deps-clean:
Deleting directory /Volumes/MAC/Users/Josh/Desktop/sandbox/Sandbox/build
clean:
init:
deps-jar:
Created dir: /Volumes/MAC/Users/Josh/Desktop/sandbox/Sandbox/build/classes
Compiling 25 source files to /Volumes/MAC/Users/Josh/Desktop/sandbox/Sandbox/build/classes
/Users/Josh/Desktop/sandbox/trunk/src/com/Sandbox.java:3: package game.bin.app does not exist
import game.bin.app.MasterApp;
/Users/Josh/Desktop/sandbox/trunk/src/com/Sandbox.java:4: package game.bin.app does not exist
import game.bin.app.MasterClass;
/Users/Josh/Desktop/sandbox/trunk/src/com/Sandbox.java:5: package game.bin.app does not exist
import game.bin.app.MasterGameApp;
/Users/Josh/Desktop/sandbox/trunk/src/com/Sandbox.java:6: package game.bin.gui does not exist
import game.bin.gui.FG_Interface;
/Users/Josh/Desktop/sandbox/trunk/src/com/Sandbox.java:25: package com.scenemonitor does not exist
import com.scenemonitor.SceneMonitor;
/Users/Josh/Desktop/sandbox/trunk/src/com/loader/Mesh.java:3: package game.bin.effects does not exist
import game.bin.effects.Effect_Fire;
/Users/Josh/Desktop/sandbox/trunk/src/com/loader/Mesh.java:20: cannot find symbol
symbol  : class AlphaState
location: package com.jme.scene.state
import com.jme.scene.state.AlphaState;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:3: package com.gibbon.tools.world does not exist
import com.gibbon.tools.world.BrushType;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:4: package com.gibbon.tools.world does not exist
import com.gibbon.tools.world.EditType;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:5: package com.gibbon.tools.world does not exist
import com.gibbon.tools.world.World;
/Users/Josh/Desktop/sandbox/trunk/src/com/loader/Mesh.java:105: cannot find symbol
symbol  : class AlphaState
location: class game.bin.loader.Mesh
                AlphaState as = display.getRenderer().createAlphaState();
/Users/Josh/Desktop/sandbox/trunk/src/com/loader/Mesh.java:105: cannot find symbol
symbol  : method createAlphaState()
location: class com.jme.renderer.Renderer
                AlphaState as = display.getRenderer().createAlphaState();
/Users/Josh/Desktop/sandbox/trunk/src/com/loader/Mesh.java:140: cannot find symbol
symbol  : variable MM_LINEAR
location: class com.jme.image.Texture
        ts.setTexture(TextureManager.loadTexture(texture_path ,Texture.MM_LINEAR,Texture.FM_LINEAR));
/Users/Josh/Desktop/sandbox/trunk/src/com/loader/Mesh.java:140: cannot find symbol
symbol  : variable FM_LINEAR
location: class com.jme.image.Texture
        ts.setTexture(TextureManager.loadTexture(texture_path ,Texture.MM_LINEAR,Texture.FM_LINEAR));
/Users/Josh/Desktop/sandbox/trunk/src/com/loader/Mesh.java:152: cannot find symbol
symbol  : class Effect_Fire
location: class game.bin.loader.Mesh
                        Node fire = new Effect_Fire(loadedModel);
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:9: cannot find symbol
symbol  : variable tab
location: class com.sandbox.world.Cut
                switch (tab.getSelectedIndex()) {
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:11: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                                state.editType = EditType.TILE;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:11: cannot find symbol
symbol  : variable EditType
location: class com.sandbox.world.Cut
                                state.editType = EditType.TILE;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:12: cannot find symbol
symbol  : variable menuEditWorld
location: class com.sandbox.world.Cut
                                editTypeGroup.setSelected(menuEditWorld.getModel(), true);
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:12: cannot find symbol
symbol  : variable editTypeGroup
location: class com.sandbox.world.Cut
                                editTypeGroup.setSelected(menuEditWorld.getModel(), true);
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:15: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                                state.editType = EditType.TERRAIN;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:15: cannot find symbol
symbol  : variable EditType
location: class com.sandbox.world.Cut
                                state.editType = EditType.TERRAIN;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:16: cannot find symbol
symbol  : variable menuEditTerrain
location: class com.sandbox.world.Cut
                                editTypeGroup.setSelected(menuEditTerrain.getModel(), true);
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:16: cannot find symbol
symbol  : variable editTypeGroup
location: class com.sandbox.world.Cut
                                editTypeGroup.setSelected(menuEditTerrain.getModel(), true);
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:19: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                                state.editType = EditType.TEXTURE;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:19: cannot find symbol
symbol  : variable EditType
location: class com.sandbox.world.Cut
                                state.editType = EditType.TEXTURE;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:20: cannot find symbol
symbol  : variable menuEditTexture
location: class com.sandbox.world.Cut
                                editTypeGroup.setSelected(menuEditTexture.getModel(), true);
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:20: cannot find symbol
symbol  : variable editTypeGroup
location: class com.sandbox.world.Cut
                                editTypeGroup.setSelected(menuEditTexture.getModel(), true);
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:23: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                                state.editType = EditType.ENTITY;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:23: cannot find symbol
symbol  : variable EditType
location: class com.sandbox.world.Cut
                                state.editType = EditType.ENTITY;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:24: cannot find symbol
symbol  : variable menuEditEntity
location: class com.sandbox.world.Cut
                                editTypeGroup.setSelected(menuEditEntity.getModel(), true);
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:24: cannot find symbol
symbol  : variable editTypeGroup
location: class com.sandbox.world.Cut
                                editTypeGroup.setSelected(menuEditEntity.getModel(), true);
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:30: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                if (state.editType == EditType.TERRAIN) {
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:30: cannot find symbol
symbol  : variable EditType
location: class com.sandbox.world.Cut
                if (state.editType == EditType.TERRAIN) {
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:31: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                        state.brushSize = sldBrushSize.getValue();
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:31: cannot find symbol
symbol  : variable sldBrushSize
location: class com.sandbox.world.Cut
                        state.brushSize = sldBrushSize.getValue();
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:32: cannot find symbol
symbol  : variable radRaise
location: class com.sandbox.world.Cut
                        if (radRaise.isSelected()) {
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:33: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                                state.brushType = BrushType.RAISE;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:33: cannot find symbol
symbol  : variable BrushType
location: class com.sandbox.world.Cut
                                state.brushType = BrushType.RAISE;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:34: cannot find symbol
symbol  : variable radLower
location: class com.sandbox.world.Cut
                        } else if (radLower.isSelected()) {
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:35: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                                state.brushType = BrushType.LOWER;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:35: cannot find symbol
symbol  : variable BrushType
location: class com.sandbox.world.Cut
                                state.brushType = BrushType.LOWER;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:36: cannot find symbol
symbol  : variable radSmooth
location: class com.sandbox.world.Cut
                        } else if (radSmooth.isSelected()) {
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:37: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                                state.brushType = BrushType.SMOOTH;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:37: cannot find symbol
symbol  : variable BrushType
location: class com.sandbox.world.Cut
                                state.brushType = BrushType.SMOOTH;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:38: cannot find symbol
symbol  : variable radPlatau
location: class com.sandbox.world.Cut
                        } else if (radPlatau.isSelected()) {
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:39: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                                state.brushType = BrushType.PLATAU;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:39: cannot find symbol
symbol  : variable BrushType
location: class com.sandbox.world.Cut
                                state.brushType = BrushType.PLATAU;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:40: cannot find symbol
symbol  : variable radNoise
location: class com.sandbox.world.Cut
                        } else if (radNoise.isSelected()) {
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:41: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                                state.brushType = BrushType.NOISE;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:41: cannot find symbol
symbol  : variable BrushType
location: class com.sandbox.world.Cut
                                state.brushType = BrushType.NOISE;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:43: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                        state.brushStrength = sldBrushStr.getValue() / 10f;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:43: cannot find symbol
symbol  : variable sldBrushStr
location: class com.sandbox.world.Cut
                        state.brushStrength = sldBrushStr.getValue() / 10f;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:46: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                if (state.editType == EditType.TEXTURE) {
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:46: cannot find symbol
symbol  : variable EditType
location: class com.sandbox.world.Cut
                if (state.editType == EditType.TEXTURE) {
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:47: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                        state.brushSize = sldBrushSize1.getValue();
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:47: cannot find symbol
symbol  : variable sldBrushSize1
location: class com.sandbox.world.Cut
                        state.brushSize = sldBrushSize1.getValue();
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:48: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                        if (state.texSet != texturesets.getSelectedItem()) {
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:48: cannot find symbol
symbol  : variable texturesets
location: class com.sandbox.world.Cut
                        if (state.texSet != texturesets.getSelectedItem()) {
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:49: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                                state.texSet = (TextureSet) texturesets.getSelectedItem();
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:49: cannot find symbol
symbol  : class TextureSet
location: class com.sandbox.world.Cut
                                state.texSet = (TextureSet) texturesets.getSelectedItem();
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:49: cannot find symbol
symbol  : variable texturesets
location: class com.sandbox.world.Cut
                                state.texSet = (TextureSet) texturesets.getSelectedItem();
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:50: cannot find symbol
symbol  : variable World
location: class com.sandbox.world.Cut
                                if (World.getWorld() != null) {
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:51: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                                        World.getWorld().setTextureSet(state.texSet);
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:51: cannot find symbol
symbol  : variable World
location: class com.sandbox.world.Cut
                                        World.getWorld().setTextureSet(state.texSet);
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:55: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                        state.textureIndex = lstTex.getSelectedIndex();
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:55: cannot find symbol
symbol  : variable lstTex
location: class com.sandbox.world.Cut
                        state.textureIndex = lstTex.getSelectedIndex();
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:56: cannot find symbol
symbol  : variable state
location: class com.sandbox.world.Cut
                        state.brushStrength = sldTStr.getValue() / 10f;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:56: cannot find symbol
symbol  : variable sldTStr
location: class com.sandbox.world.Cut
                        state.brushStrength = sldTStr.getValue() / 10f;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:59: cannot find symbol
symbol  : variable World
location: class com.sandbox.world.Cut
                if (World.getWorld() != null) {
/Users/Josh/Desktop/sandbox/trunk/src/com/world/Cut.java:60: cannot find symbol
symbol  : variable World
location: class com.sandbox.world.Cut
                        World.getWorld().updateFromState();
/Users/Josh/Desktop/sandbox/trunk/src/com/world/WorldCameraHandler.java:33: cannot find symbol
symbol  : variable EditorState
location: class com.sandbox.world.WorldCameraHandler
        EditorState.lastMouseEvent = arg0;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/WorldCameraHandler.java:38: cannot find symbol
symbol  : variable WorldTool
location: class com.sandbox.world.WorldCameraHandler
            WorldTool.setNotDoingMouseAction();
/Users/Josh/Desktop/sandbox/trunk/src/com/world/WorldCameraHandler.java:40: cannot find symbol
symbol  : variable EditorState
location: class com.sandbox.world.WorldCameraHandler
        EditorState.lastMouseEvent = arg0;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/WorldCameraHandler.java:44: cannot find symbol
symbol  : variable EditorState
location: class com.sandbox.world.WorldCameraHandler
        EditorState.lastMouseEvent = arg0;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/WorldCameraHandler.java:48: cannot find symbol
symbol  : variable EditorState
location: class com.sandbox.world.WorldCameraHandler
        EditorState.lastMouseEvent = arg0;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/WorldCameraHandler.java:52: cannot find symbol
symbol  : variable WorldTool
location: class com.sandbox.world.WorldCameraHandler
        WorldTool.setMouseXY(arg0.getX(), arg0.getY());
/Users/Josh/Desktop/sandbox/trunk/src/com/world/WorldCameraHandler.java:53: cannot find symbol
symbol  : variable EditorState
location: class com.sandbox.world.WorldCameraHandler
        EditorState.lastMouseEvent = arg0;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/WorldCameraHandler.java:77: cannot find symbol
symbol  : variable JmeContext
location: class com.sandbox.world.WorldCameraHandler
        JmeContext.get().executeLater(exe);
/Users/Josh/Desktop/sandbox/trunk/src/com/world/WorldCameraHandler.java:81: cannot find symbol
symbol  : variable EditorState
location: class com.sandbox.world.WorldCameraHandler
        EditorState.lastMouseEvent = arg0;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/WorldCameraHandler.java:88: cannot find symbol
symbol  : variable WorldTool
location: class com.sandbox.world.WorldCameraHandler
            WorldTool.setDoingMouseAction(arg0.getX(), arg0.getY());
/Users/Josh/Desktop/sandbox/trunk/src/com/world/WorldCameraHandler.java:90: cannot find symbol
symbol  : variable EditorState
location: class com.sandbox.world.WorldCameraHandler
        EditorState.lastMouseEvent = arg0;
/Users/Josh/Desktop/sandbox/trunk/src/com/world/WorldCameraHandler.java:101: cannot find symbol
symbol  : variable JmeContext
location: class com.sandbox.world.WorldCameraHandler
        JmeContext.get().executeLater(exe);
/Users/Josh/Desktop/sandbox/trunk/src/com/world/WorldCameraHandler.java:115: cannot find symbol
symbol  : variable JmeContext
location: class com.sandbox.world.WorldCameraHandler
        JmeContext.get().executeLater(exe);
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
84 errors
BUILD FAILED (total time: 1 second)


I get all those errors but let someone else give a shot before you do anything rash, the problem may well be here ;)

Okay, thats really weird.  Did you know you have both 2.0 and 1.0 code in there…





package game.bin.loader;

...
import com.jme.scene.Geometry;
import com.jme.scene.Node;
import com.jme.scene.state.AlphaState;
import com.jme.scene.state.LightState;
import com.jme.scene.state.TextureState;
...
...
public class Mesh extends Node{

AlphaState is from 1.0



package com.sandbox.app;

...
...
import com.jme.util.TextureManager;
import com.jme.util.stat.StatCollector;
import com.jmex.terrain.TerrainBlock;
import com.jmex.terrain.TerrainPage;
...

public class GraphicWindowGL extends SimpleCanvasImpl {

StatCollector is from 2.0...

Yes I know.



Normally I work with jME 2.0, but I couldn't manage to create a GLWindow with jME 2.0, so I used 1.0, but it shouldn't make any problems, because it's only the window, the methods are 2.0, or that's the theory!





What I see, when I read this code:



class game.bin.loader.Mesh



Is not inside, because it's the game directory, where Sandbox import and export data files, but this function isn't implied at the moment.



I will create a new test environment and clean the version.

Should be fixed tonight.

Ok code is fixed now!


can't find:

import game.bin.effects.Effect_Fire;



also this package is strange :slight_smile:

Delete it!

It's not necessary.

Later in development, the fire effect can be used to create torches or anything else you need on fire^^



At the moment I don't have the necessary time, but I will try to finish sandbox.

Hello,



Sandbox looks great!!



I download Sandbox code but there are some details in Mesh.java



package game.bin.loader;

import com.jme.scene.state.AlphaState;



The AlphaState class and the package don't exist. I'm using jme 2.

When I did click in some buttons of toolbox or option's menu don't works. Just on the console appear "Pressed Import".

Can you help me please??

Thanks
Regards

Hi Himura



Everything is fine, since Sandbox is not more than an interface at the moment.

I haven't developed it any further, because at the Moment I'm working on Project Fairytale.

After I finished the game, I will try to develop it further.

And yes, Sandbox use jME1, but it shouldn't be a problem to use jME2



AlphaState(jME1) --> BlenderState(jME2)



Hope this help!

Hi DarkPhoenixX ,



Thank you for your answer.



In the project Fairtale, what tool are you using for create/edit the world??



Thanks

Regards

I use maya.





At the moment a Editor is developed called IR Editor inside jME. Maybe there will be a release soon.