dovyski / flixel-studio Goto Github PK
View Code? Open in Web Editor NEWEmbeddable, in-game editor for HaxeFlixel. Turn the existing Flixel debugger into a full-featured editor!
License: MIT License
Embeddable, in-game editor for HaxeFlixel. Turn the existing Flixel debugger into a full-featured editor!
License: MIT License
DjFlixel is an awesome Flixel tool to create effects and great UI. This should definitely be integrated into Flixel Studio from day one. It is even MIT licensed, how cool!
The existing README is a ripoff of flixel-ui. It must contain at least how to install and use flixel-studio. Further documentation will be added when we reach the 1.0 milestone.
The awesome haxelib-helper by @ianharrigan is a great foundation.
First of all, let me thank you for all the time and effort you're putting into this tool. It's already useful and looks even more promising. I'm really happy someone is actually working on this :-)
Unfortunately, trying to start using flixel-studio I was slightly confused by what seems to be a contradiction between how it's supposed to behave and what it actually does.
The readme suggests you can put FlxStudio.start()
into any of your game's FlxState's. But since 15e59b5 it looks like the actual initialization in bootstrap()
function happens only when the core engine's gameStarted
signal is dispatched, which in turn happens only once on game startup (well, on resets too, but I'm not sure if they're commonly used). That makes it neccessary to call FlxStudio.start()
at least in the initial game state (one that's passed as FlxGame
's constructor argument). On the other hand, calling FlxStudio.start()
anywhere else doesn't have any effect (again, possibly except some corner cases with FlxG.resetGame()
).
And I personally find this behaviour preferable to manually placing FlxStudio.start()
everywhere you might need it. So probably that's just the docs that need to be updated. Unluckily, current implementation breaks entities inspector. Perhaps, flixel-studio needs a way to run some of its procedures (e.g. getting _entities
list for EntitiesWindow) automatically after every state switch and not in bootstrap()
? That might require introducing something like postStateCreate
signal into the core, but that should be trivial.
So, before I make any PR's, which I'd do gladly, is there anything I'm missing here?
Currently, flixel-studio does not compile with a vanilla version of Flixel because it requires access to some private elements (they need to be made public). Fixing this should be quite easy. I'm openning this issue to keep this task visible and alive.
The current logo was quickly hacked by me just to have something to show. It would be nice to create a proper logo following other tools/projects in the Haxeflixel ecosystem.
This is the way of doing it.
Thought I'd take things for a spin this morning, using this code:
package;
import flixel.FlxState;
import flixel.tile.FlxTilemap;
import flixel.addons.studio.FlxStudio;
class PlayState extends FlxState
{
public var tiles:FlxTilemap;
override public function create():Void
{
super.create();
tiles = new FlxTilemap();
tiles.loadMapFrom2DArray([for (j in 0...16) [for (i in 0...16) 1]], AssetPaths.tiles__png, 8, 8);
add(tiles);
FlxStudio.start();
}
}
When I press the Tile Editor tool in the debug menu, the game crashes with this output:
Called from sys.io.FileOutput::$statics line 1
Called from ApplicationMain::main line 32
Called from ApplicationMain::create line 244
Called from lime.app.Application::exec line 167
Called from lime._internal.backend.native.NativeApplication::exec line 163
Called from a C function
Called from lime._internal.backend.native.NativeApplication::handleMouseEvent line 413
Called from lime.app._Event_Float_Float_Int_Void::dispatch line 101
Called from openfl.display.Stage::__addWindow line 1521
Called from openfl.display.Stage::onMouseUp line 1066
Called from openfl.display.Stage::__onMouse line 2028
Called from openfl.display.Stage::__dispatchStack line 1723
Called from openfl.display.Stage::__handleError line 1835
Called from openfl.display.Stage::__dispatchStack line 1690
Called from openfl.display.DisplayObject::__dispatch line 1235
Called from a C function
Called from openfl.events.EventDispatcher::__dispatchEvent line 443
Called from flixel.system.ui.FlxSystemButton::onMouseUp line 104
Called from flixel.system.debug.interaction.tools.Tool::onButtonClicked line 94
Called from flixel.system.debug.interaction.Interaction::setActiveTool line 442
Called from flixel.addons.studio.tools.tile.Editor::activate line 50
Called from flixel.addons.studio.tools.Tile::refresh line 76
Called from flixel.FlxSprite::makeGraphic line503
Called from flixel.system.frontEnds.BitmapFrontEnd::create line 136
Called from flixel.graphics.FlxGraphic::fromRectangle line 225
Called from openfl.display.BitmapData::$init line 152
Called from a C function
Called from openfl.display.BitmapData::new line 296
Called from lime.utils.ArrayBufferView::$init line 14
Called from a C function
Called from lime.utils.ArrayBufferView::new line 42
Called from haxe.io.Bytes::alloc line 462
Uncaught exception - $smake
Tested flash and cpp builds and it's working well though! Great work ๐
I have many, many ideas for Flixel Studio. A roadmap would help spread them and foster discussion. It would also give a better glimpse into where the project currently is and where it is heading.
As mentioned in HaxeFlixel/flixel-addons#142 by its author, FlxScene was created with some kind of scene editor (perhaps similar to flixel-studio) in mind.
We'll need a saver producing compatible XML, but at least we don't have to write a parser/loader from scratch.
FlxScene demo source: https://github.com/HaxeFlixel/flixel-demos/tree/master/Features/FlxScene
It would be nice to have a tool that allows developers to zoom the camera's game in and out. It is useful when you are designing a level and want to have a better view of everything.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.