substandardgaussian

Drawing directly to world

Recommended Posts

Hey guys.

 

I just started using MightyEditor, and it seems like a great tool.

 

One glaring weakness it seems to possess, though, is that it has no support for rendering to canvas/with webGL directly. It seems concerned entirely with preloaded textures.

 

If I wanted to make, say, a hollow rectangle out of 4 lines, I'd either need to preload the "line" asset and do various manipulations on the instances, or ignore MightyEditor altogether and just draw it in code.

 

I could emulate all of this by using a "pixel" texture and stretching it, rotating it, etc:, but that would still make things like circles or ellipses hard-to-impossible to create visually, and is a lot of manual work otherwise.

 

Has any thought been given to supporting making textures on-the-fly with bitmapData? Maybe being able to define a texture asset as a function that returns a texture, or a mini-canvas you can draw to, rather than needing to choose a texture from the preloaded list? A little flexibility in the level editor would go a long way.

 

One thing I appreciated with the now dead(?) PhaserLE was the fact that you could draw invisible collision objects directly onto the map (link goes directly to demo). Just hold ctrl and drag a rectangle, and BOOM, instant objects. It makes hand-crafting arbitrary-sized map elements really easy. I think a similar sort of feature would do quite well in MightyEditor.

 

Many thanks,

SG

Share this post


Link to post
Share on other sites

hi,

 

yes we are aware that it is not possible to draw directly on the editor canvas and / or create custom debug objects.

 

In a matter of fact - this is what I'm working at right now. Besides with a pretty advanced user plugin system (vector drawing tool is a part of the first custom plugin).

 

We are planning to release changes in the middle of the next weak.

Share this post


Link to post
Share on other sites

That's great to hear, thanks stauzs! I'm making a game that uses only canvas drawing and particle emitters, so that kind of feature would be awesome to use.

 

I'm currently using the "pixel" method, which works pretty well except for one particular bug. When I use a base "kernel" of exactly 1x1 and then stretch it to *any* size, the editor can't select it without dragging a selection rectangle, and it can't be moved using the mouse for that same reason. Any larger, eg. 2x2 or 16x16, everything works fine regardless of what size they get stretched to.

 

I'll stay away from the 1x1 base texture, just wanted to inform you that the editor is bugged with it. I don't think importing single pixel images was expected behavior.

Share this post


Link to post
Share on other sites

You are right, just tested this and added to github issues. You can move rectangle with arrow keys or specifying x,y values in settings tab. Sure it is not as convenient and we'll fix this bug most probably by next update.

Share this post


Link to post
Share on other sites

actually this issue has been resolved - you need to turn off pixel perfect picking ( click on the free spot on the map -> Settings panel -> pixelPerfectPicking )

Probably better way to fix this: check vs bounds again - if we fail to pick any object

Share this post


Link to post
Share on other sites

Yep, turning off pixel perfect picking does remove the problem.

 

stausz, is there any word on that update you mentioned?

 

hi,

 

yes we are aware that it is not possible to draw directly on the editor canvas and / or create custom debug objects.

 

In a matter of fact - this is what I'm working at right now. Besides with a pretty advanced user plugin system (vector drawing tool is a part of the first custom plugin).

 

We are planning to release changes in the middle of the next weak.

Share this post


Link to post
Share on other sites

I'm still working on it - got myselft in to pretty big refactoring - while trying to maintain compatibility with the old projects.
Update should be ready in the next week, if I won't break something more.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.