Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 915 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 915 Bytes

ogmo-3-lib

A Haxe parser for Project and Level files generated by Ogmo Editor 3.

An example of how the library can be used has been included in the sample directory, using Heaps for rendering. Run either hl.hxml or js.hxml to produce a Hashlink or Javascript build of the sample.

Getting Started

First, install the Library from haxelib.

haxelib install ogmo-3

Then in your project, simply use Project.create() and Level.create() to parse any .ogmo Projects or .json Levels!

// Get the Project and Level files you'd like to parse (as Strings)
var project_text = sys.io.File.getContent('assets/project.ogmo');
var level_text = sys.io.File.getContent('assets/levels/level_1.json');

// Create the Project and Level data from the Text Files
var project = Project.create(project_text);
var level = Level.create(level_text);

trace(project);
trace(level);