TiAm's Forum Posts

  • Wow, these event based engines are murder on the cpu... for R0J0hound's event based example (raycast4.capx), I get 10fps and 90% cpu on an i5 3570k.

  • I assume your game is broken into multiple layouts for different levels?

    If so, save a copy of your project somewhere (so you don't accidental go ctrl+s) and experiment with deleting layouts. The memory usage estimate is based on your most intensive layout (whichever one has the largest variety of objects, usually). You may find that a particular level is chewing a lot more memory than your others.

    Another question is this: are you targeting desktops exclusively? Because, if so, this may be less of a problem. Most modern desktops/laptops have tons of memory; 2.7GB is a lot, but there are games that use much, much more. As you said, node seems to be dividing the memory across multiple processes, so you are unlikely to hit the 32bit limit.

    However, if you were targeting mobile...well, I don't think you are anymore.

    The most memory you'll find in a mobile device is 3-4gb, and that's only for the highest end phones and tablets. With the overhead of other apps and OS processes, your game still wouldn't run. It would probably be more trouble than it's worth to strip down your art to the point where you could sandwich it into a mobile's memory.

  • TheWyrm

    Hmm, I missed that in the beta build notes. I guess if ludei's webview build is cordova compatible, then it really isn't any more work for C2 to support it. Well, hey, I'm all for someone giving Intel some healthy competition.

    It still looks like Canvas+ is going away though..."no longer supported by Construct 2".

  • It does seem like ludei is getting more involved lately, but I think the C2 ship has sailed from their port (so to speak).

    It didn't help that they went all radio silence for months and months on end. Ashley has pretty much said that CJS isn't going to be supported anymore; the way I see it, when C2 breaks compatibility w/ CJS, it's probably not going to get fixed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, with the exception of your loader layout, and any music tracks (c2 can stream those in), your entire game must load before it's playable.

    FYI, your loader layout can be anything, doesn't have to be a loading bar. You can make it a pre-scroll and main menu, or a little minigame, or some text and images that setup the game, let your imagination guide you.

  • Well, the only place you are setting the size of the object is in event sheet "E Racetrack", on event 3 and 5. Just search for ObjInvisibleSolid, it comes up.

    Anyway, in one place you are just setting the solid to a fixed size (20,326), but your other action is setting one dimension to the following value: "RoadStrtTunnelLong.Height". That's the only place I can see where something could go awry.

  • Glad that sorted things out.

    Oh, another thing messing you up: platformer has default controls enabled. If you try to control w/ the keyboard, both chars will move, despite your now corrected logic.

    Save yourself a future headache: Go to both stanley and paulina, look under their platform behaviors, and disable Default Controls.

  • Okay, think about your logic:

      on button: --If StanPaula = 0 ----set stan paula to 1 --If StanPaula = 1 ----set stan paula to 0

    Now, C2 runs events sequentially. Change a var? That goes into effect immediately. That's where your logic fails. So:

      StanPaula = 0; //this is true, so var is changed from 0 to 1 --If StanPaula = 0 ----set stan paula to 1 //this event still runs! Since you changed the var to 1 above, the cond is true. You end up back where you started: 0. --If StanPaula = 1 ----set stan paula to 0

    Instead, you want to add an 'else' to the second if statement, so it reads like this:

      //this is true, so var is changed from 0 to 1 --If StanPaula = 0 ----set stan paula to 1 //...and this event doesn't run! In the inverse scenario, the top event runs, and this one doesn't. --ELSE --If StanPaula = 1 ----set stan paula to 0
  • Yeah, debug will butcher your framerate on the inspect tab, especially if you have a lot of arrays or objects.

    One thing about cpu usage: the best thing to do is to export your project, either as html or as node-webkit. Sometimes your cpu will go down drastically on export, sometimes it won't, but it's best to see what happens. Be sure to have 'minify' checked.

    If you are still using around 30%, something is almost certainly wrong.

    Best way to figure it out: fire up debug and go to the 'profile' tab. See how much cpu is being used. If you have any groups, you can see aprox how much cpu is being used by each group. This is another reason why it's a great idea to break your logic up into groups and sub-groups; makes it easy to spot what events are lagging you down.

    Also, check for extra behaviors on objects that you don't need, or loop logic going awry.

  • That does sound like a memory leak. Are you using text objects in your game? If so, could be the same bug the Colludium spotted, which was patched for r191.

  • Most GPUs (ever since OpenGL 1.3 and Dx6!) these days do support compressed texture formats (S3TC etc) which saves a lot of memory use, but to use, game engines have to support it.

    It looks like WebGL supports compressed textures, but not on mobile (where it would be the most useful, IMO). I guess even desktop support would be good, but it looks like the desktop implementation is a bit shaky too.

  • That's kind of odd. OGG is open source, so the encoder comes with C2.

    Did you try reinstalling? Did this just start happening recently? What version are you on? Does it happen with all audio files?

  • Well, I don't know the first thing about this, but I'm interested in how you did it. Is this all event based? Or are you using the q3D plugin?

  • Thanks for the pointers, R0J0hound. My logic was indeed out of whack.

    These two threads helped (one featuring an excellent example by you, R0J0hound, and another old one by lucid which includes an exe, and is a bit more flexible):

    about-the-new-interpolations_p787879

    what-are-lerp-qarp-and-cubic-for-the-nonmath_t64198

    This what I've got so far:

    capx: https://www.dropbox.com/s/vt7frvz41a19y ... .capx?dl=0

    web preview: http://unknownenterprises.altervista.or ... index.html

    With this approach I can have an arbitrary number of paths, nodes in a path, and followers on those paths.

    Unfortunately, in the editor, it looks more like my layout sprouted warts. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    Damn, it would be nice if C2 had path objects...

  • Thanks so much for this! One of my projects is a tribute/clone of a treasure game (Bangai-o Spirits), in which there are these little enemies which have a very strange movement pattern. Pretty sure they are being driven by this algo; the example capx looks just like what they do. This will be invaluable for recreating them.

    Thanks again!