Game Hanging Upon Pressing Left

This forum is currently in read-only mode.
From the Asset Store
five golem elements Sprites Sheet.Best for enemy or villain game characters.
  • Sorry to bring up such a weird error, but whenever I press the Left Arrow Key, the game freezes up and slows down dramatically. Hopefully there is a simple solution! Here is my cap file.

    http://www.mediafire.com/?wz15yb8pnuxivic

  • After getting no good results from toggling off every event, i started to look at your layout and objects. The main problem is that you have sprites that are gigantic, mainly your ground sprite (sprite2), one of them is 12718 pixels wide. After removing a lot of them and resizing some i managed to get the game running smoothly again.

    There's a few things you can do to fix this, instead of using a sprite object, use the TiledBackground object, its much faster when your going to be resizing things that much. If that fails or you insist on using sprites, split the huge ones into lots of smaller ones.

    I also recommend aligning all your objects with the grid because they are kinda messy right now, but its your game

  • Oh, wow, that was a fast reply! Thanks!

    Well, not to be a pest, but would you mind sending me the fixed cap file? I'm happy to give it a go with any of the changes you included and I'd like to see this tiled background you're talking about.

  • I will be honest, i didn't actually save the fixes! However, i just went in to re-do them and pin-pointed the problem down to one object - It's the Chomposaur's!!! I can't figure out why they are doing it, but if you completely remove the Chomposaur object, the problem goes away.

    Sorry i can't really help more than that, this one has me stumped.

  • Well, you are too kind. Thanks for your help

  • I changed the sprite, but it's still happening. If anyone else could shed some light on this, it would help a lot.

    http://www.mediafire.com/?3ja5thkbxinot5x

  • http://dl.dropbox.com/u/7658043/Fixed.cap

    Hopefully i fixed your problem now.The new cap was done with v99.94 of Construct.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The slowdown is due to construct recalculating the collision mask on resized objects for each frame. It's from a fix that I made in construct since 0.9984. Prior to that, the collision mask wouldn't get updated unless the object was resized or rotated. The only drawback is it seems to be one of the main sources of slowdown encountered in projects. The slowdown is avoided if collisions are not continuously compared with animated, resized objects.

    Anyway in your case the solution is to have a separate object that handles all the collisions.

    Here is a fixed cap

    http://dl.dropbox.com/u/5426011/examples2/fixedreadthesigns.cap

    saved with 0.99.94

    Edit :

    DravenX's solution of setting the guy's collision to box will work, but by looking at your Hitbox animations you want the hit box to be smaller than the sprite. In which case another object should be used.

    -cheers

  • Yes Rojohound is right.I didn't take the hitbox into account.Anyway never fear when Rojo's near.I wish i was half as good as Rojo then i would be able to create the games i really want to create.

  • Okay, I'll download 0.99.94. Thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)