Note that there are some explanatory texts on larger screens.

plurals
  1. POEvent based editor like in StarCraft 2 Editor (algorithm)
    primarykey
    data
    text
    <p><strong>I'm trying to create an algorithm for an <code>event based editor</code> like in StarCraft 2 Editor that can support:</strong></p> <ul> <li>Create UI</li> <li>Play sounds</li> <li>Handle keyboard/mouse inputs</li> <li>Display messages</li> <li>Button(or some referenced UI object) is pressed etc.</li> </ul> <p><strong>Pretty much the same thing as in StarCraft 2 Editor (of course not the 3D stuff too)</strong></p> <hr> <p>So far I'm thinking to use <code>JSON</code> , add every event in an object and then loop through them and create an event using the <code>addEventListener()</code> method.</p> <p><strong>The JSON Events Object</strong>(of course it will be created by the user in the editor with no programming):</p> <pre><code>var Events={ //your event's names here onReady:{ //on page ready to manipulate displayMessage:{//just a simple popup text:"Hello user!", title:"Welcome!", type:"normal", }, createButton:{ //creates a buton on the screen text:"Click me!", id:"myButton" } }, onClick:{ id:"myButton" ,//the id of the button we just created actions:{ //the actions applied after we click the button displayMessage:{//just a simple popup text:"You pressed me!", title:"Button", type:"error",//show the message as an error } } } } </code></pre> <p>I found some softwares <strong>(<a href="http://www.yoyogames.com/gamemaker/studio" rel="nofollow">GameMaker</a>,<a href="https://www.scirra.com/construct2" rel="nofollow">Construct 2</a>,<a href="http://www.compilgames.net/" rel="nofollow">GameDevelop</a>)</strong> that have an <strong><code>event based editor</code></strong> if you would like to get an idea about what I'm talking about (if you don't already know about StarCraft 2 Editor)</p> <p>My question is: <strong>What is the best algorithm that I can use to achieve this?</strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload