Snalec's Forum Posts

  • Rod2292 Try checking out some tutorials online. I've been working on a platformer and tutorials have been really helpful.

  • A few days ago I made a thread talking about lag that I was getting during the boss fight I was working on. I didn't really understand too much about what was going on, so the thread is kind of confusing and I deleted a bunch of my own confusing replies and it was getting a bit messy. But I did more research and did some more rigorous testing and now have a clearer idea of what's going on and what to ask.

    The problem seems to be that every time my boss' attack pattern loops, the CPU usage increases. It won't be noticeable during the first loop, but every loop it gets worse until I eventually observed that CPU usage spikes to 100% and the frames drop to less than 20.

    But there's kind of just some oddities with it all. For instance, if I disable all of my event groups besides the ones that keep the player and boss moving, the CPU usage remains constant and low and there is no perceivable lag. I figured I could solve the issue then by just disabling unused groups during the boss fight. However, when I enabled some groups that are essential to the player losing lives and receiving game overs, the lag is back and is just as worse as all the groups being enabled.

    Additionally, no matter what event groups are enabled or disabled, if I take the boss' "dashattack" out of his attack cycle, there is not lag or significant CPU usage increase. I've tried temporarily disabling parts of that attack, such as a timer and events that cause him to play a skidding animation, but neither of those prevent that lag from happening. So to me it would seem like that attack is what is responsible for the lag, but like I said before, if I disable a bunch of event groups that attack doesn't cause lag which is puzzling.

    I've been going at it for a few days now trying to figure out what the primary cause is, but haven't been successful.

    Thanks in advance for the help. This is the first time I've run into a problem like this. It's definitely been a learning experience!

  • I've been disabling parts of the game and running the boss. If I disable enough stuff the boss fight works fine. I'm guessing it's just poor optimization all around and the boss fight just puts it all over the edge. I probably just need to go through and clean up code.

  • Awesome! Thanks I appreciate it!

  • I've divided the attacks up but am still getting lag. I've posted a few replies but keep deleting them because I think I fix it but I haven't.

    Here's the capx. Once you get into the room with the boss, you have to hit "Q" to start it. From there his attacks will loop after the second pounding attack. But every time it loops there's more lag. I've been puzzling over this one all day and I just can't figure it out.

    https://drive.google.com/file/d/1nr3L3UP6HE_nS8QWk0_GdSG2zijvnHSS/view?usp=sharing

  • Hello,

    I'm starting to work on a level boss which has been exciting and really educational. I have the first phase done. It's kind of a mess. It's all one event that uses signals to loop. It's got lots of wait commands and it was so big I couldn't take a picture of it. The first time the event plays out it's fine, but each time it loops the lag gets worse. It doesn't make new objects or anything. It kind of just changes animations and simulates different platform controls. Is there any way to reduce the lag on it? Or do I just need to redo it so that there's less stress on one event? Thanks in advance.

  • You do not have permission to view this post

  • Okay. Thanks. I'll take a look

  • Hello,

    I'm trying to change the image point on an enemy to its center, but when I do it messes up the sprite and stretches it. Do I need to do something different to make it not stretch?

    Thanks

  • Got it all working! Thank you so much for your help!

  • I used a timer and the on-screen event to put this together, but the enemies aren't spawning. I did some testing and the timer is running, but nothing is spawning when the timer is up.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Awesome. Thank you!

  • Thanks! My enemy spawners are off-screen, but maybe I'll make invisible objects that are on screen that are connected to the spawners or something.

  • Hello,

    I'm working on implementing some spawners that can spawn certain enemies every seven seconds. However, I'm having problems making the spawners reset if that makes sense. I want the seven second timer to reset if the player is not on the screen where the spawners are.

    Thanks!