ome6a1717's Forum Posts

  • *UPDATE* I did a quick test of just cropping ONE frame of ONE animation, and it actually messed up every frame of every animation....something's going on here...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A long time ago when I started my project, I used an invisible sprite as my "platform" behavior and attached the arms, head, and body to the platform. Now I'm getting close to releasing my game, and I've decided to do some performance improvements.

    Long story short, my platform sprite is twice as large as I need it to be with a bunch of transparent space (don't judge, I just started!), so I wanted to consolidate the empty space by using "Crop Transparent Edges". Once I do this for every frame (I must have the platform duplicate every frame/animation of the character sprite in order to get the arms and head to move appropriately), when I load in the game, it looks as if all of my image points have changed drastically. The arms are 30+ pixels off, the head is the same, etc. I know this because the arms and head have an "Every tick, set arms and head to platformsprite.imagepointx & y" event.

    Can someone confirm this is supposed to happen, or is this a bug?

  • I'm actually curious about this, as well. I've been adding enemies to my game, and checking the debugger, even when the enemies aren't in the layout, the code still seems to grab a 0.1% or 0.2% of my CPU usage.

  • 7Soul - thanks for the help!

  • I was afraid of that :X

    Thanks!

  • DoCai - Originally I thought it would be easier to search for certain things. I suppose I could make an event sheet for each layout, but I have over 60 layouts; it might be a bit of pain at this point. I wouldn't count it out if I couldn't find a solution, however.

  • 7Soul - I had no idea triggers were played first regardless of hierarchy.

    Do I need an else for the collision checks? (I'm going to have a bunch of them for various objects)

  • I've been developing my game for a while using a single event sheet and setting every parameter as "if LayoutName = "Whateverthelayoutnameis", and then having all of my events under those for each layout. While everything works fine this way, I loaded up the debugger just to play around with, and it looks like stuff that should NOT be utilizing CPU actually is (very minimal, 0.1% here or there, but it adds up rather quickly).

    Is the way I'm going about this wrong? Should I have an event sheet for each layout? Or is there a better way to do a one event sheet game?

  • 7Soul - okay let me ask you this. Is that the same as putting a "if object is on-screen" collision check?

  • If you have a ton of 1 object that has collision checks with it, is there a way to "disable" the checks when other instances are off screen so it doesn't use up resources?

  • DUTOIT - So true. I still haven't figured out For Each. I just try putting it in every event until it works

  • DUTOIT, R0j0hound, lennaert - thanks for the replies. I've tried For Each, removing the else, and a magnitude of other stuff before I posted. I did, however figure it out in case you guys were curious.

    For some reason I had to switch the "Timer > 0" with the "Timer = 0". Apparently due to the "Timer = 0" event having an "Else" attached to it, it wasn't able to pick the instance, like you stated. I was, however, able to keep my Else Strange, but at least it's solved. Thanks again!

  • I have a very simple line of code:

    [EVENT]                                     [ACTION]
    
    Sprite1.TimerVar > 0
    

    Every 0.1 Seconds .... Subtract 1 from Sprite1.TimerVar

    Else

    Sprite1.TimerVar = 0

    Trigger Once .... Set Platform Enabled

    >>> On Platform Landed .... Set Sprite1.TimerVar to Sprite1.TimerMax, Set position to Sprite1.DefaultPosX & PosY

    [/code:1qs3cr7o]

    What this could SHOULD do, is for each sprite1 that reaches a timer of 0, the platform should become enabled. I've done some tests, and the Timer is getting set to the TimerMax variable for each individual sprites, each sprite is being reset to their respective locations, but it waits until only ONE of the sprites reaches a timer of 0 and then they all fall together instead of individually like they're supposed to.

    I don't understand why it's picking the instances for the "On Platform Landed" event, but not for the Sprite1.Timer instance variable.....can anyone shed some light on this?

  • Ok I LITERALLY just figured out a way after posting this (of course). If you press down arrow, it goes to the event below and resets your viewport.

    *EDIT* nevermind - that only works if you don't click another event

  • Does it bother anyone else that after searching for a specific event (Ctrl+F), once clearing the find window it puts your viewport to the top of your event sheet? Normally it's not a huge idea, but I have over 4000 events so far in my game with tons of folders, and it takes quite a bit of time to go back to my selected event.

    Unless there's already a way to do this...?