ome6a1717's Forum Posts

  • Luna - I came across something interesting you might like to know today. I implemented some new enemies to my game, and quickly found that my collisions per tick sky rocketed to ~400 on idle. This was a stage with just as many enemies and platforms as other stages (in fact, this was the only stage to have all enemies with the platform behavior OFF due to their in-game behaviors). I scoured through event sheet after event sheet disabling events, deleting objects, trying to find what I did to cause this, but EVERY other stage idled at ~20 collisions per tick except this one (and used all the same event sheets).

    So I did the only thing I could think of - created a new layout and copied every object and repasted them in the new layout, and to my very big surprise....my idle is now ~40 collisions per tick. I'm not saying this might be what's happening to you, but I find it incredibly strange. Between the two comparisons, not ONE line of code or sprite was moved or changed. I'm wondering if somehow my layout was just "corrupt" and needed a fresh coat of paint? I still have no idea, but hopefully you'll find the information somewhat helpful?

  • ome6a1717 i get 60 fps smooth with the old nodewebkit (the new one sucks and i think im stuck with it forever) but my pcs is powerful too, but that practice you are doing is very bad, why?? becuase your benchmark is your pc, and that means your game will be intended for pc as powerful as yours only, just becuase in my pc i get 60 fps, that does not mean that all people will have a pc like mine, so i need to understimate my game so it will work in less powerful pc's, you should try your game in less powerful pc's and you will notice that it does not run like you want.

    dont take your pc performance as the only benchmark to see if your game i well optimize.

    This is very true, which is why I have friends that don't have my machine test my game. However, if MY machine can't obtain 60 fps, something is certainly wrong.

  • What fps do you get outside of the debugger? (ie text object set text to fps) The debugger can't really be trusted to that regard sometimes.

    In my game, most of my layouts have over 2k objects with ~130mbs of memory used. Every enemy and play have the platform behavior and have over 50 events per enemy towards their behavior and I can keep an even 60 fps (+/- 5 for the very awful node-webkit jankiness). Granted, I have a high end i7 with a high end nvidia card, so not much can make this machine chug.

    Regarding the collision cells, the events should be layered with the overlapping on TOP, and then everything else as a subevent. I had that issue, too, for a while and then realized that switching it cut the collision checks down by a 1/4.

    Also, it's actually not C2's fault, it's the fact that C2 uses HTML5. It's HTML5 is creating all the limitations, not C2.

  • Just updated to check it out - no longer can obtain 60 fps; max obtainable is 59. Janks are still in for me.

  • newt - I've already tried render cells when it was first introduced and it did nothing for me. I believe to see a difference from that, you'd need 10s of thousands of objects. Also, I'm not quite sure what you mean the canvas is already an array?

    - the problem isn't that they're all on screen simultaneously, it's that they're all in the same layout. And yes, we have over 5000 objects in some layouts and of course it runs 60 fps (I play games, so I have a decent computer), but a lot of "gamers" out there don't have such computers, but still expect to be able to play it as they can play other 2d games with ease.

    corlenbelspar - it does indeed kill cpu due to destroying and creating massive amounts of objects, but as long as it's not done every tick, it seems to be okay (I've found picking 3 sprites per stage and cascading them on an every 1 second event does the trick)

  • - correct me if I'm wrong, but pasting everything on the canvas would add to the image memory, and a file that size (~40,000 x 20,000) would load near gigs worth of memory. Of course I have no idea how this is done or if thats even how it works

  • It recreates everything with a specific binding. I just set it to create it based on the ViewportLeft-500 to ViewportRight+500, and ViewportTop-500 to ViewportBottom+500. The only key thing you need to do every time is right before it creates it, you have to destroy every object you're recreating, otherwise it will create duplicates.

    It doesn't seem to keep the Zorder when created, though. Something to keep in mind.

  • - So I spent some time, creating arrays, pushing back each X for each sprite on the layout, setting a local number and increasing it to set the x, y, angle, layername, size, etc, deleting every object if the distance is far enough and recreating it based on the x and y position in the array.

    Then I accidentally saw a new system event : Recreate Initial Objects.

    -_-

    So I deleted everything and added 2 events

    Bottom line, we still need to test on bad computers (since it made no difference to mine). We know one thing - it's not something you can do every tick (obviously), so we check every 1 second. We destroy every object and recreate initial objects based on the viewport +/- a few hundred pixels. It drastically changed the object count (as expected), to where I was able to get a stage which had 2300 objects down to 400 without noticing a difference. I'll know more once I get my friend to test it on a lesser machine, but things are looking up for large layouts

  • I think I've come up with a possible solution to having "too many objects" in a layout, but I wanted to see what people much smarter than me thinks.

    My idea is simple: create a blank array, and at the start of a layout set the x, y, angle, frame, etc. of every single static scenery object (you'd have to make an array for each sprite since you can't create sprites by name) to the array. Delete everything that is further than x amounts of pixels from your character (ideally 1.5x the screen width for safety) and then do a check every couple ticks :

    For Each X Element (array)

    if distance(Player.X, Player.Y, Array.At(Array.CurValue, 0), Array.At(Array.CurValue, 1) < Screenwidth * 1.5 (< this might be the wrong code - I haven't tested it yet, but you get the idea)

    ACTION: create object and set x y angle etc. to the array amount.

    Else: destroy object.

    So my question is this - it would heavily help the object count, but would it not be worth it due to the cpu increase of creating and destroying objects so often?

  • I have to agree with the originator of this post. C3 is HTML5, 2D, basically the same as C2 with possible newer features. If it's money they're after (and they should be, because they deserve it), I'd much rather them release "Construct 2.5" expansion that you have to pay for. It seems silly to try and build a whole new editor from the ground up that functions the same as the current editor they already have. Don't mess with perfection!

  • I have a stupid question - what is Construct 3? How is different from 2, exactly? (other then, you know, not existing) Is it still HTML5? Or has none of this been disclosed yet?

  • Hi All,

    We figured we'd post a thread here in hopes to see if any of you artists was willing to work on a project with us. We have one title on steam already (http://store.steampowered.com/app/296730/), and are finishing up another title as we speak. We're getting ready to start our next title, and are looking for someone with a different art style.

    Requirements:

    • MUST know how to animate
    • MUST have an understanding and/or experience in producing art for games (ie tiles, spritesheets, etc.)
    • Bonus if you know Construct 2, but not required at all!
    • Also a bonus if you're decent (and willing) at level design!

    Please contact us through PM here with some links to your work, price, and a little about you. This is a paid position. We prefer a project based fee, but we're also willing to scrap the fee if you're more interesting in profit sharing, as well. More information will be disclosed in PMs.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Compare X of the character - if Character.X < 4000 (or whatever X you want him to stop at), simulate control : right. Then have an else (meaning it's over or = to 4000) > go to next event.

  • Done and +1

  • I think this was asked for before. Around the time the room region thing was implemented.

    I thought the answer was basically no. Value wasn't seen in it. Which is absurd. Open world and single layout games would greatly benifit among other things. But I believe the answer was along the lines of use multiple layouts.

    I believe the main concern was such a feature would likely be misused. And many people would complain about objects popping in as they load etc.

    Anyways, I would love to see this implemented.

    I think it's not that there's no value in it - I think it's just too difficult to implement into C2. And there's no reason to make it something the user should be able to control; in theory all that should happen is when an object is destroyed, it does a check to see if that object still exists in the layout. If it doesn't, then it unloads the object from memory.