In-game particle editor?

All things HTML5 or text based engines, or really any web based engines.
Post Reply
foolmoron
Posts: 25
Joined: Wed Sep 11, 2013 3:34 pm

In-game particle editor?

Post by foolmoron »

I've been looking at the IgeParticleEmitter class and it's got a bunch of cool features, but it's a pain to tweak values to get things to look right. I was thinking of making a component that you could attach to an emitter that shows a popup screen with a bunch of sliding controls for you to tweak values at runtime. Does anything like this already exist? Don't want to waste my time if someone has already made something better.
signature
User avatar
coolbloke1324
Posts: 181
Joined: Mon Jan 23, 2012 5:20 pm

Re: In-game particle editor?

Post by coolbloke1324 »

Hey ya,

I have been working on an internal editor that will handle everything.

Since you wanted to use something right now I've merged my branch into dev which now gives you access to the new built-in engine editor system.

Just so you know the long-term goal of this system is to be able to allow basic WYSIWYG editing of IGE scenes and objects as well as a powerful customisation system for your own user-defined classes.

The customisation system is already in place and works quite well. Using it I have only enabled:

IgeEntity:
|-- Transform
|-- Set Texture

IgeParticleEmitter:
|-- All properties
|-- Still missing the particle class selector - easy to do but not added yet.

Basically when you select an object from the scenegraph the engine builds a list of all the classes that it is derived from and then loads and shows panels for all of those classes, so for instance, the IgeParticleEmitter is derived from an IgeEntity so both the panels (properties and options) for the particle emitter AND the entity are displayed.

I've updated the particles example so that when you click the "Scene" button (bottom left) you will have access to the editor. Select an object from the scenegraph (select the IgeParticleEmitter instance to see all the particle emitter options - you might need to scroll for a while since there are bound to be lots of particles in the graph too :)).

Once you select an object the object's panels will load on the right. Currently they load async without any order so sometimes panels appear in illogical orders - a minor issue really.

The editor does not currently check for invalid input either so will crash if you enter text for a number, or no number at all when there should be one etc.

If you take a look in ige/engine/components/editor/panels you'll see the panels class which defines the various properties for a class, as well as a bunch of HTML templates using the jsRender templating system. These definitions and templates build up the panels that are displayed when an object is selected.

Let me know how you get on.
editorScreeny.png
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
foolmoron
Posts: 25
Joined: Wed Sep 11, 2013 3:34 pm

Re: In-game particle editor?

Post by foolmoron »

Alright, I expected you to have something on the backburner for this, but wow this is godlike. I never even thought about making an on-screen editor for all entities in general, that's an excellent idea. And I'm sure you've thought of this already, but there should be a way to save a stringified version of the entity that we can put into our JS code.

But as it stands now, it's still extremely convenient. I love it.

Also, here are some common bugs I ran into:
undeclared distY being used when using the Rotate button control on an entity

Code: Select all

Uncaught ReferenceError: distY is not defined IgeEditorRotateComponent.js:141
IgeEventingClass.extend._mouseMove IgeEditorRotateComponent.js:141
jsviews randomly not being found when loading the panels (async loading issue prob?)

Code: Select all

Uncaught ReferenceError: jsviews is not defined IgeEditorPanelsComponent.js:1219
$.ajax.complete IgeEditorPanelsComponent.js:1219
l jquery.js:2913
c.fireWith jquery.js:3025
k jquery.js:7415
(anonymous function) jquery.js:7822
signature
Post Reply

Return to “HTML5/Web Engines”