Loading monkey world

hi guys,

i'm pretty new to this stuff so forgive me my beginnerness…

but can someone give me an example of how to

load a level built with the monkey world?



Hmm, I think in one of those threads - MonkeyWorld3D or MonkeyWorld3D 2.0 - it was mentioned that it still is a missing feature to load MW3D levels in your own application…

But I think the authors of the editor will comment here soon anyway :slight_smile:

You are correct.  The current version doesn't have the functionality for playing a created level.  However, with that being said, if you look in the context directory (the same location as the level's workspace) you will find an XML file for each level designed.  It is possible to extend the Monkey World 3D code to parse the XML file and load the level.  The XML file lists all the entities and options set for each level.

Playing a designed level is in development for the future release.

Well i guess that will explain why i could not find anything.

Can't wait for them to release it…

It seems though that a lot of the necessary code already exists in the world editor jars. You can, after all, "walk" through your level.

I don't want to reinvent the wheel

Hi drevil,

It seems though that a lot of the necessary code already exists in the world editor jars. You can, after all, "walk" through your level.

As irroser and digitalntburn mentioned, its not their yet.  ://
Well those plenty of jars are just to run the SWT stuff, and they are not needed for you to test drive you level, with the stand alone SimpleGame implementation that we are working on, you will just need bsh.jar, also we will give a guide on how you can use the core package.

Its a work in progress, and its going to be their soon, we promiss.

You're using BeanShell for it?  In my experience BeanShell is extremely slow.  I actually started using it for the JavaGameNetworking project but abandoned it because of the overhead and switched to Eclipse's JDT and dynamically generated source and class files on the fly which increased the start-up time, but makes it extremely fast over the long-haul.


Hey there people.

Okay, here is a quick fix for loading a MonkeyWorld3D level. Please read the comments as well:

package com.mw3d.game.test;

import java.util.Properties;

import com.jme.app.SimpleGame;
import com.jmex.physics.PhysicsWorld;
import com.jmex.sound.openAL.SoundSystem;
import com.jmex.sound.openAL.scene.SoundNode;
import com.mw3d.core.util.LevelManager;
import com.mw3d.core.util.Runtime;

public class SimpleMonkeyGame extends SimpleGame {
   protected SoundNode soundNode ;
   protected int sNode;
   protected void simpleInitGame() {

Thank you, i'm going to try this out.

You're a freakin' genius.