A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
{
"version": "1.0",
"name": "Hud",
"nodes": [
{
"id": "upd",
"kind": "event.update",
"x": 0,
"y": 60
},
{
"id": "score",
"kind": "call",
"x": 68,
"y": 440,
"ref": "property.get",
"literals": {
"path": "GameState.score"
}
},
{
"id": "gate",
"kind": "flow.branch",
"x": 250,
"y": 60
},
{
"id": "label",
"kind": "call",
"x": 284,
"y": 250,
"ref": "string.concat",
"literals": {
"a": "SCORE "
}
},
{
"id": "live",
"kind": "call",
"x": 500,
"y": 60,
"ref": "property.set",
"literals": {
"path": "Text.content"
}
},
{
"id": "over",
"kind": "call",
"x": 500,
"y": 60,
"ref": "property.set",
"literals": {
"path": "Text.content",
"value": "GAME OVER - SPACE"
}
},
{
"id": "space",
"kind": "call",
"x": 534,
"y": 250,
"ref": "input.pressed",
"literals": {
"key": "Space"
}
},
{
"id": "again",
"kind": "flow.branch",
"x": 750,
"y": 60
},
{
"id": "reset",
"kind": "call",
"x": 1000,
"y": 60,
"ref": "property.set",
"literals": {
"path": "GameState.alive",
"value": "true"
}
},
{
"id": "zero",
"kind": "call",
"x": 1250,
"y": 60,
"ref": "property.set",
"literals": {
"path": "GameState.score",
"value": "0"
}
},
{
"id": "game_1",
"kind": "call",
"x": -148,
"y": 630,
"ref": "entity.byName",
"literals": {
"name": "Game"
}
},
{
"id": "game_2",
"kind": "call",
"x": 784,
"y": 250,
"ref": "entity.byName",
"literals": {
"name": "Game"
}
},
{
"id": "game_3",
"kind": "call",
"x": 1034,
"y": 250,
"ref": "entity.byName",
"literals": {
"name": "Game"
}
},
{
"id": "askAlive",
"kind": "graph.call",
"literals": {
"graph": "assets/logic/alive.esgraph"
},
"x": -250,
"y": 60
}
],
"edges": [
{
"id": "game_1.entity->score.entity",
"from": "game_1",
"fromPort": "entity",
"to": "score",
"toPort": "entity"
},
{
"id": "gate.true->live.",
"from": "gate",
"fromPort": "true",
"to": "live",
"toPort": ""
},
{
"id": "score.text->label.b",
"from": "score",
"fromPort": "text",
"to": "label",
"toPort": "b"
},
{
"id": "label.result->live.value",
"from": "label",
"fromPort": "result",
"to": "live",
"toPort": "value"
},
{
"id": "gate.false->over.",
"from": "gate",
"fromPort": "false",
"to": "over",
"toPort": ""
},
{
"id": "over.then->again.",
"from": "over",
"fromPort": "then",
"to": "again",
"toPort": ""
},
{
"id": "space.result->again.cond",
"from": "space",
"fromPort": "result",
"to": "again",
"toPort": "cond"
},
{
"id": "again.true->reset.",
"from": "again",
"fromPort": "true",
"to": "reset",
"toPort": ""
},
{
"id": "game_2.entity->reset.entity",
"from": "game_2",
"fromPort": "entity",
"to": "reset",
"toPort": "entity"
},
{
"id": "reset.then->zero.",
"from": "reset",
"fromPort": "then",
"to": "zero",
"toPort": ""
},
{
"id": "game_3.entity->zero.entity",
"from": "game_3",
"fromPort": "entity",
"to": "zero",
"toPort": "entity"
},
{
"id": "upd.then->askAlive",
"from": "upd",
"fromPort": "then",
"to": "askAlive",
"toPort": ""
},
{
"id": "askAlive.then->gate",
"from": "askAlive",
"fromPort": "then",
"to": "gate",
"toPort": ""
},
{
"id": "askAlive.alive->cond",
"from": "askAlive",
"fromPort": "alive",
"to": "gate",
"toPort": "cond"
}
]
}