Just Game Engine Formats
The saved file formats of the Just Game Engine, in pure Dart: no Flutter, no dart:ui, no dart:io.
The engine, the editor and the just command-line tool all use this package, so a scene migrated by just upgrade is byte for byte the scene the engine would have migrated on load.
| Format | What | Current |
|---|---|---|
SceneFormat |
*.scene.json, with SceneMigrations and MigrationHooks |
10 |
TimelineFormat |
*.timeline.json |
2 |
AnimatorGraph |
*.animator.json |
2 |
PrefabFile |
*.prefab.json, with PrefabExpander, PrefabCollapse and PrefabApply |
1 |
MaterialFile |
*.material.json |
1 |
import 'dart:convert';
import 'package:just_game_engine_formats/just_game_engine_formats.dart';
void main() {
const text = '{"name": "level_01", "entities": []}';
final scene = jsonDecode(text) as Map<String, dynamic>;
final result = SceneFormat.migrateWithReport(scene);
print('v${result.fromVersion} -> v${SceneFormat.current}');
for (final note in result.notes) {
print(note);
}
}
A file newer than this package reads throws UnsupportedFormatVersionException. A broken one throws a plain FormatException: a version that is not a whole number, or a value of the wrong type. Both are FormatExceptions, so one on FormatException catches either.
Games don't depend on this package directly: just_game_engine re-exports it.
Libraries
- just_game_engine_formats
- The Just Game Engine's saved file formats, in pure Dart.