Skip to main content

just_game_engine_formats 0.2.0 copy "just_game_engine_formats: ^0.2.0" to clipboard
just_game_engine_formats: ^0.2.0 copied to clipboard

The Just Game Engine's saved file formats in pure Dart: scenes and timelines with their migrations, animator graphs, tags and physics layers.

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.

1
likes
160
points
169
downloads

Documentation

API reference

Publisher

verified publisherjustunknown.com

Weekly Downloads

The Just Game Engine's saved file formats in pure Dart: scenes and timelines with their migrations, animator graphs, tags and physics layers.

Repository (GitHub)
View/report issues
Contributing

Topics

#gamedev #game-engine #serialization #migration

License

BSD-3-Clause (license)

More

Packages that depend on just_game_engine_formats