hookecho's Forum Posts

  • 7 posts
  • You do not have permission to view this post

  • You can make 2 global variables...one for the character's X position, and one for the Y position. When the character goes through the door, create an action that sets the global variables to the X and Y positions of where the character will appear in the new layout. And also create an action that goes to the new layout.

    Then, have a "On start of Layout" event that sets the character's position to the global variables.

    Hope that makes sense

  • If someone could convert the "Ig_Shake" behavior by Luiz Gama, and "Circle" by Mutuware, I could open my project in C3. Until then,

    I'm stuck in C2...

  • ErekT

    It happens either way. I've just tested it for about 8 hours today and my task manger shows that my CPU and memory usage stay pretty consistent. CPU rarely goes over 50% and memory stays around 50-60% (I only have 4 gigs).

    However, I just noticed the debugger says my estimated CPU usage is around 90% when the slowdown begins, and it never seems to fully recover. I have no idea what could be using so much CPU power.

    imhotep22 AllanR

    I do have a couple of layouts that use bullets as weather effects (like rain and snow). For example, I have a raindrop sprite that is created every 0.025 seconds at a random X position relative to the main character, and the bullet behavior causes it to fall to the ground. I'm pretty sure they're set to destroy when they hit the ground, but wouldn't they be destroyed anyway at the end of the layout? Or do bullets persist from layout to layout?

    Also, is it possible that having to check for a collision for each rain/snow particle is too much work for the engine? Or that creating that many sprites so fast is causing slowdown?

    What I really don't understand is why it works perfectly on a fresh start (even the heavy particle layouts), but deteriorates over time.

    Thanks for your responses

  • So, my brother and I have been working on a 2D side scrolling Metroidvania type game for about a year now. The game is getting pretty large, and what I've noticed is that the frame rate begins to drop dramatically after playing for a while and going through several layouts. On a fresh startup, the game runs fine, but eventually the FPS goes down the drain. If you restart the game, problem fixed, but we surely don't want players to have to restart the game in order to have a consistently playable frame rate.

    Has anyone else experienced this that can offer any advice? My initial thought would be that some things aren't getting unloaded from memory after layout changes, and it eventually bogs everything down. But everything I've read from Ashley's blogs seems to indicate that C2 loads and unloads everything per layout.

    I know a CAPX would be helpful, but I'm hesitant to post it because we have tons of hand made pixel art that I'd rather not make readily available on the internet .

    If I need to offer any more details, please ask. I appreciate any help!

    EDIT: Our game is only for desktop, so we shouldn't have a hardware bottleneck

  • Yeah, I've done that, the problem is my game is in a letterbox style...with black borders at the top and bottom. The mouse cursor is hidden until you hover over the black borders. I'm not sure if that makes any sense. Thanks for the reply though

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This was really helpful! Thanks! In my game, which is a 2d side scroller, right clicking makes the character roll. But it was also making the context menu pop up on screen. Now if I can just find a way to hide the mouse cursor completely....

    Buy

  • 7 posts