HowToEditLevels
Not logged in

Editing Newton Adventure level is a two step procedure. First you need to create the level data according to the game data structure, then rebuild the game (see BuildHowTo).

Once you have setup levels according to this structure, you can test it : HowToTestLevels

Game data structure

Surprisingly, game data reside in the game/data directory. It contains the following files:

Quests

A quest is a set of levels. Every quest has his own folder in game/data/quests.

A quest folder has the following structure:

Levels

Levels folder contains:

Level map

The level map is a *.tmx file. A tmx file contains a tileset and a tilemap.

The map and each tile have a set of properties (a property is a name and a value).

Map properties

newton_adventure.background => an png or jpg filename of the level background image.
newton_adventure.music => an ogg filename for the music played during level.
newton_adventure.rotate_gravity_possible => boolean value ("true" or "false") indicating if gravity can be rotated in this level
newton_adventure.mummy
newton_adventure.bat
newton_adventure.explosion
newton_adventure.fireball
newton_adventure.hero

=> gif or nanim filename for sprites animations
newton_adventure.axe
newton_adventure.mobilePikes				
newton_adventure.door_to_bonus_world				
newton_adventure.door_to_bonus_world_open				
newton_adventure.door
newton_adventure.door_open
newton_adventure.key
newton_adventure.apple
newton_adventure.coin
newton_adventure.compass
newton_adventure.activator1.on				
newton_adventure.activator2.on				
newton_adventure.activator3.on				
newton_adventure.activator1.off				
newton_adventure.activator2.off				
newton_adventure.activator3.off				
newton_adventure.memory_activator.hidden				
newton_adventure.blocker1
newton_adventure.blocker2
newton_adventure.blocker3

=> png, jpg, gif or nanim filename to change object image/animation

This filenames should not include path. The file is first searched in the level directory then in the default_level_data folder.

Tile properties

Each tile is an object in the game. The type of object is determined by the newton_adventure.type property. To find what types are available, check an existing level or the method initFromTile in the World.java file.

newton_adventure.gfx

Platform tiles accept this property: it indicates a png, jpg, gif or nanim filename that will be used as texture or animated texture.

newton_adventure.friction

Platform tile friction can be changed, default is 10, increase or decrease to get sliding or hard platform.

newton_adventure.zorder

Set order of drawing, lower first.