Arima's Forum Posts

  • Drat, that's frustrating. A way to speed up JavaScript, except you can't use JavaScript to use it. Argh.

    Thanks for the explanation!

  • So there's been some news lately about this thing called asm.js. I don't entirely understand what it is, but it seems to be a way to pre-compile JavaScript so that it's even faster.

    asmjs.org

    I didn't pay that much attention to it even after Mozilla showed it off by running unreal engine 3 in web browsers using HTML5 - and unreal engine 4 will apparently export to html5 as well - because I've seen new web technologies deployed before that didn't gain any traction with other browser makers, like nacl. However, Google appears to be actually planning to support it as well as Mozilla.

    cnet.com

    esterday, Mozilla held a coming-out party for ASM.js, announcing a cooperation with Epic to bring its Unreal game engine to ASM.js. The same day, Google effectively announced a plan to support it within Chrome's V8 engine that processes JavaScript.

    "Optimizations should be added to V8 to generate good code for the ASM.js subset of JavaScript," Chrome programmer Kenneth Russell said in a Chrome feature-tracking item for ASM.js. "The implementation cost should be small compared to the potential upside -- the ability to run significant existing code bases with close to the speed of C inside the JavaScript engine."

    There's no official word yet from Google, but it's sounding good.

    I don't know how it works exactly, but since it's apparently backwards compatible for non-asm.js supporting browsers it would be cool if c2 could use it.

  • Thank you for the reply. Yes I did read the section of the manual for dictionaries. But this is exactly what I am getting at in my original post. If people didn't already know what this was then they wouldn't be able to do anything with it in this software. For example it says that a dictionary is for storing strings and numbers. What kind of strings? What is a string?

    Strings are text. They and their use are described more in depth here: construct.net/en

    A basic example of use is the part about the score in the beginners tutorial: construct.net/en

    what kind of numbers would I store there? Why would I store them there? How is this function going to benefit me? What can be done with this?

    Well, it's a very open question ? it's sort of like asking what you can do with a stick. You could use it to prop something up, build something, draw something in sand? The dictionary object can similarly be used for many things, anything from simple value storage (money, points) to more advanced uses like dialogue storage for an entire RPG.

    If you're familiar with the concept of an array, it's sort of like that except instead of using numbers to retrieve a value from a grid of values, you use text (a string) to retrieve it instead. Because of this, it's very flexible and you can dynamically create keys with events in ways that would be cumbersome with an array's method of a numerical grid location. It's also easier to read, as you don't have to remember what value is stored where in the array. Compare:

    Set points to array.at(0,2)

    Set points to dictionary.get("score")

    I find the easiest way to think of it is as a dynamic variable object. You can't give a sprite new variables at run time, but you can give the dictionary new keys (keys are basically variables with a different name) at runtime.

  • Have you looked at the manual entry? It seems to cover what you want, is it not clear? construct.net/en

    There's also going to be a free live class that might interest you. construct.net/en

    I'm afraid there's going to be a learning process for any game creation tool, as game development, even simplified with a tool like this, remains a complex thing. If you get stuck on anything though, you can always ask here on the forums for any clarification you might need.

    Also, searching the forums and youtube, it seems there are some video tutorials already available:

    construct.net/en

    youtube.com/results

  • You could also use the dictionary object and store everything as keys.

    Set key npcname & conversationname & paragraph to "Hello."

    I haven't tried it though, so it might actually be cumbersome in practice, but in theory it seems like a good idea, as that way you could store it all and not have to worry about the grid of an array, and could retrieve whatever you wanted with a few variables (it would probably make branching dialogue easier as well).

  • Isn't it already? Just clicking 'add action' then typing letters works on my machine.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • There's no way a C2 project could ever be responsive, you'd have to create multiple projects and rotate your iframe depending on your parameters.

    What do you mean by responsive? Games by definition need to be responsive. Is that a term for something that I'm not aware of?

  • You can type a couple letters to quickly narrow down the results. It seems to be the fastest way.

  • Hey, I'm here at gdc. No webgl unfortunately. Performance does however look to be very good. Over 800 onscreen sprites running at 60fps. Also tested a physics demo which was running at 60fps and looked to be very complex. It's running on webkit.

    Well, at least the performance seems quite good. I'm still concerned about memory usage, though?

    Google have also hinted at native html app support on Android and Ludei have a great demo showing webgl running - estimated six weeks until we get our hands on it.

    That part about native html android apps sounds quite intriguing. Any more info that can be acquired or is it something that they're not ready to officially announce yet?

    Thanks for bringing us the info!

  • All animations within a sprite are loaded when the sprite is loaded, so it would not help with this problem.

  • How is memory management supposed to work without webgl?

  • Ashley - sometimes that doesn't work though, when a specific object is needed to be paired with another and c2 thinks otherwise. I really want the pairer object in c2, I hope you'll add it eventually, It would save a lot of storing/checking uids.

  • They're working on it.

  • Physics acceleration is coming to cocoonjs, too.

  • 1) If you create & destroy text objects every tick, it will be creating a canvas2D surface and WebGL texture every tick. The browser should garbage collect these to prevent it running out of RAM, but I guess it's not a well tested part of browsers because they don't expect anyone to be doing that! Also C2 is smart enough not to create a canvas or texture if the text object is not drawn, so you will only get bad performance if you create lots of on-screen text objects; off-screen ones should not ever create anything.

    2) If you change the content of a text object every tick, it has to keep re-rendering then copying to a texture. Note this is only required in the WebGL renderer: the canvas2D renderer can just draw the text directly. For small objects this is fine, but when debugging games some people use window-size text objects printing loads of data. This can be pretty slow on some systems. It might be better to try using lots of separate text objects. For example, if a single text object is set every tick to "Object count: " & objectcount, then C2 is smart enough to only re-render the WebGL texture when the object count changes. If that's a single line in a giant text object that's continually changing, it will include that line in the re-rendering every tick.

    Lol agh

    Not only was I destroying and creating a bunch of them every tick, they were all around 2000 x 2000 pixels, too. XD Thanks for the info, that helps a lot!