-Silver-'s Recent Forum Activity

  • Hello! I'm trying to use the Trigger Once While True condition to "gate" other events, hopefully cutting down on the number of events being checked every frame. Here's how I have a little section set up:

    <img src="http://i216.photobucket.com/albums/cc212/darkstorne/RunSpeed_zps94b283ed.jpg" border="0" />

    I have three base animations - Running, Jumping, and Rolling. The character's movement speed stat can change, so I have that stored in a variable. But as his movement speed increases, I want his run animation to speed up at the same time, which is what I'm trying to accomplish here. However, while this section works perfectly the first time it's triggered, when the player jumps (switching animations) and then eventually goes back to the run animation, it reverts back to the base animation speed, and this event doesn't trigger again.

    I was hoping the change in animation would allow the "Trigger Once" condition to be reset, but it doesn't seem to. Disabling or removing the "Trigger Once" condition works perfectly well, and without any slowdown, so this isn't a big issue. I was just hoping to cut down on events per tick.

    Should "Trigger Once While True" be working how I expect it to? Or am I just using it for a situation it was never intended for?

    Thanks for reading <img src="smileys/smiley12.gif" border="0" align="middle" />

  • Wow, that's awesome news! I've been panicking about seeing frame rates dip into the 30's on my iPad 3, and wondering if I'd have to start cutting out entire features. Still, I'll aim to stay above 30fps with LAN testing, and aggressively optimize to reach that goal - that way I should have no issues with final app performance <img src="smileys/smiley1.gif" border="0" align="middle" />

    Is there a guide to porting a game to iOS for testing?

  • At the moment I'm testing my games on PC, iPad 3, and Windows Phone 8 (Lumia 920) via LAN testing. After looking into CocoonJS (which I think is required for porting to iOS?) it says something about accelerating performance to native quality?

    Does this mean that I'll see better performance on my iPad 3 after porting the game through CocoonJS than I'm currently seeing through LAN testing? Or is the frame rate from LAN testing pretty much identical to how the game will run after porting?

    Thanks for reading <img src="smileys/smiley12.gif" border="0" align="middle" />

  • Though judging by the bullet shape, he wants to leave the sprite rotation turned on <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Maybe set an event to reduce each layer's opacity (such as by -100*dt, for a one second fadeout) and then have a second event that changes to a new layout once a specific layer's opacity is equal to 0.

  • I am also looking for similar solution.

    Example: swipe from left to right or right to left would bring up some sprite. And swipe from top to bottom or bottom to top would bring up some sprite.

    Can anyone submit a capx?

    Do you need this to happen whilst swiping, or is activating a new sprite after swiping okay? Because if you compare touch.X at the start of a swipe to the touch.X at the end of a swipe, you can work out whether a swipe is going left or right, and checking the Y variable will tell you if it's going up or down.

  • vee41 - As I said in the OP, 0 is the initial value, and it isn't changed to 1 until it's spawned (then back to zero before destroying it). Other objects in the layout won't impact the spawning of new, unrelated objects. Other than the destroy section, I've posted and screenshooted everything related to it.

    rogueNoodle - Worked perfectly, thanks! <img src="smileys/smiley4.gif" border="0" align="middle" /> Events now look like this, and there's no noticeable performance impact:

    <img src="http://i216.photobucket.com/albums/cc212/darkstorne/Short4_zps4c725713.png" border="0" />

    If anyone knows why the original event setup might not have been working, I'd love to hear from you. It's great having a solution, but I'm still not sure where I was going wrong before <img src="smileys/smiley12.gif" border="0" align="middle" />

  • vee41 - There is much more going on, but not in relation to these Objects. That's all there is to them. Other than the part where they get destroyed when they move off to the left of the screen.

    rogueNoodle - I'm setting the variable to 0 first, and then destroying it. Sorry, I should have made that part clearer. Though, even if that part was wrong, they'd need to be created before they can be destroyed anyway, so they'd at least be spawned once before the variable can be set to 1.

    You're right about the second part though! I'll try having C2 simply move them, instead of creating a new object and destroying it every time. It just means there will be slightly more object bloat (and each object has a bullet behaviour being acted on every tick too). I'll see how it works though <img src="smileys/smiley1.gif" border="0" align="middle" />

    Still leaves me confused about the above events, because I genuinely can't understand why they wouldn't work.

  • Hello! I'm having issues with a series of events that check an Instance Variable. Basically, for an endless runner type of game, I'm spawning objects at random locations along a path so long as that object isn't already on screen.

    To do this, I'm checking an Instance Variable named "Active" for an object, and if the variable is 0 (which is its default setting), spawning the object and then setting its variable to 1. When the object is later destroyed, its variable is set back to 0. Here's what the event sheet looks like at the moment:

    <img src="http://i216.photobucket.com/albums/cc212/darkstorne/Long_zpsa18dfbb2.png" border="0" />

    It doesn't work. None of the background objects (that require Instance Variable checking) spawn. The foreground objects work perfectly.

    Disabling this didn't change anything. Still no background objects spawned:

    <img src="http://i216.photobucket.com/albums/cc212/darkstorne/Short1_zpsbfc3063e.png" border="0" />

    But disabling this does allow the background objects to spawn. However, it spawns loads of them, since there's nothing to tell C2 to stop spawning the objects:

    <img src="http://i216.photobucket.com/albums/cc212/darkstorne/Short2_zps8e7c9675.png" border="0" />

    Finally worth noting - I had originally tried setting the events up like this (using a sub event), but this doesn't spawn any background objects either:

    <img src="http://i216.photobucket.com/albums/cc212/darkstorne/Short3_zpse868e47a.png" border="0" />

    Sorry for using so many images, but I wanted to be as thorough as possible so you know what I've tried <img src="smileys/smiley1.gif" border="0" align="middle" /> Any idea where I'm going wrong?

    Many thanks for reading <img src="smileys/smiley12.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm. Well, I just tried without retina display enabled, and the frame rate improved to 40-60fps. Still not as strong as my Lumia 920's performance, but then that phone is one and a half years newer than the iPad 3, so maybe that's to be expected.

    I think all iOS releases from this point on HAVE to support retina display though, so I guess this means I need to optimize the game further for mobile and tablet devices. Thanks for all the feedback about the importance of downscaling though! It's been very useful <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Okay, thanks! <img src="smileys/smiley1.gif" border="0" align="middle" /> So a good balance might be to go for a mid-range resolution? Scaling down slightly for older phones with lower resolutions, and scaling up slightly for newer phones with larger resolutions. I'm assuming the upscaling won't be very noticeable, and it will help with performance on older phones.

    I just tried running my game (natively runs at 1280x720) on three different devices: On my PC I got a solid 60fps, on my iPad 3 with retina display enabled it ran at 35-45 fps, and on my Windows 8 phone (Lumia 920) it ran at a solid 60fps. I'm surprised my Windows phone is more powerful than my iPad <img src="smileys/smiley3.gif" border="0" align="middle" /> Unless retina display is a major performance killer.

  • Thanks for the replies! And if I scale down from 1920x1080 (for example) to 1280x720, would that be more expensive performance-wise than delivering natively at 1280x720? Or does the original resolution not make any difference to performance at all?

-Silver-'s avatar

-Silver-

Member since 21 Sep, 2010

Twitter
-Silver- has 1 followers

Trophy Case

  • 14-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Email Verified

Progress

16/44
How to earn trophies