Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
0
Members

How do I view the code output of the GUI Scene Editor?

A topic by Tiesto created Jun 06, 2016 Views: 507 Replies: 2
Viewing posts 1 to 3

I think it would be helpful to learn from / easily reference if we could view the code generated by the GUI Scene editor. Anywhere I can see it?

Also I'm really liking the dev environment of this project! Great job so far!

Moderator (1 edit)

The scene editor doesn't generate code, it generates a JSON description which is then used to build the actors.

Basically, each actor does:

const myActor = new Sup.Actor("My Actor", parentActor);

Then if you have a sprite renderer for instance, it'll do:

new Sup.SpriteRenderer(myActor, "Path to sprite asset");

etc.

You can find the whole code for setting up an actor component from its scene configuration in its runtime folder. For the SpriteRenderer for instance: https://github.com/superpowers/superpowers-game/blob/master/plugins/default/sprite/runtime/SpriteRenderer.ts

Thanks!