tunepunk's Recent Forum Activity

  • Ashley Sometimes you have a collision polygon set at a certain shape for some reason, and want to detect a sprite overlap, but they don't detect because the collision polygons are not completely square at the Sprite edges. An ugly workaround - Create another sprite on top with a Square collision box pin it to the object, and wholla! you've doubled the spritecount, and icreased collision checks. I find BBox very useful also, since you can't really get X &Y positions of idividual collision polygon points.

    Index based multiple collision boxes per object could also work. That may be even better.

    sprite1.colBox(0) is overlapping sprite2.colBox(2)

    EDIT: To explain further one of the main uses could be for z-Ordering. Instead of having Zorder to run every tick it would seem smart if you could have it trigger once only on any BBox overlap. For me et least on developing for mobile Zordering is one of my main resource hogs at the moment, so I would like to bring it down further to allow for other good stuff instead.

    For now this chunk of events was the most resource friendly way I could do it, and it's just slightly better than running the zOrder every tick. What it does: If there's any moving objects on screen, first picks within radius (Line of sight is supercheap distance picking), then Checks BBox overlap, and then if any BBox overlap is off in Zorder (higher Y but lower Z or opposite) then trigger the Zorder Once.

    I sort on average once every 2-5 seconds (if there is any overlap/zorder that needs fixing), but the whole event chain there is just slightly cheaper than running Zorder every tick.

  • 5. Is not because C2 is easier to use that you don't need game logic and a deep understanding, easier to use but easier to mess up things as well

    I completely agree. I've done so many stupid things so many times that i should probably start working on a massive tuturial on "How not to do things in C2". Well sometimes things work, but they dont work well. It's like eating icecream with a snow shovel. You can probably do it but it's not very precice or effective. Then people go on the forums and rant about bad performance. The problem is that C2 let you do things, so you tap yourself thinking, "IT WORKED, I'm an awesome coder" but in reality you're not. Happens to me all the time. :p

  • I use BBox quite regularly and It would be nice to see a plugin that handles BBox instead of only XY and collision boxes. I'd gladly donate or pay for some neat BBox tools.

    Practical uses.

    Detecting overlap of objects.

    Sometimes you don't want use the regular collision boxes to detect overlap. BBox can come very handy then. I use it all the time, but current the event sheet way is not very friendly way of do it, as it involves a very heavy piece of code, and I'm pretty sure a plugin/behaviour would handle that much better. Currently I'm doing this:

    Pick by evaluate: Sprite1.BboxLeft < Sprite2.BboxRight & Sprite1.BboxRight > Sprite2.BBoxLeft & Sprite1.BboxTop < Sprite2.BboxBottom & Sprite1.BboxBottom > Sprite2.BBoxTop.

    It would be nice to be able to both pick any overlapping sprites, or just detect any overlap and return true without picking.

    I don't know if it's possible, but it would be good if you could even detect overlap on sprites within a family, only checking against other sprites within the family, as I havn't figured out a way to do that using events. You can't check family1 against family1 as it's always true, checking against itself.

    I found this piece of code but don't know is useful: I wouldn't even know where to start to make a behaviour myself. Otherwize i would do it.

    var overlap = !(rect1.right < rect2.left ||

    rect1.left > rect2.right ||

    rect1.bottom < rect2.top ||

    rect1.top > rect2.bottom)

    Any help appreciated and would have gladly pay for it, if you give me a reasonable price for the request.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    spy84 If your game is running at 25-30fps at best (I don't know what phone you got those reuslts on) you probably have a lot of optimization to do. Anything below full 60fps, on a mid range device is unacceptable if you are developing for mobile. I'm getting almost constant full 60fps (with a few dips) on a lower end mid range phone (2 year old - Lumia 830). using 1280x720 window size, linear sampling, 3000x3000 layoutsize, isometric with z ordering, approximately 800 objects in layout, with 4 player multiplayer using photon. Yeah... I've spent a year grinding and trying out stuff, and learning and optimizing so now the game I even running on a 50€ low end phone at around 15-30fps, and get around same results which ever wrapper I use.

    Agree with Ashley there. Too many people complaining about mobile performance when they clearly don't know the limitations of mobile development. Just because you can make something in C2 and can export for mobile doesn't mean that it will play well on mobile. I've learnt the hard way. Investigated what's going on under the hood, what features to use and what not to use.

    X - Don't use webGl effects - They are neat but usually heavy & not useful for mobile.

    X - Don't use Force own texture on layers.

    X - Don't use constantly updating Text object if you can do the same with Spritefont.

    X - Don't use particles, unless it's very simple and low amount of particles.

    X - Don't expect heavy amount of physics to run well.

    X - Don't update things every tick unless you have to. Use 'Every X Seconds'

    X - Don't use big images with large areas of overlap.

    * - Always limit your Top level events. The less events the the engine has to go through each tick the better.

    * - Group event's and only activate groups when needed, close when not needed.

    * - Use smart and cheap ways of picking objects & Structure your conditions accordingly.

    * - Disable collisions for objects that don't need it. (Personally I think this should be disabled by default)

    * - Keep an eye on memory, cpu, fps, draw calls, ammount of sprites, etc

    * - Study and try different approaches of doing the same thing in a smarter/cheaper ways.

    If your game is not performing well, it's probably not because C2, it's probably because you don't know what the hell you're doing, and have no clue what the mobile limitations are.

  • I absolutely love those pure & clean graphics and animations.

    It works like this.

    everything is sorted by Y right? So anything with lower y will be behind and higher y will be in front. For the character on top to appear in front of the sprite you cant sort by only y. His y is lower so will look like he is behind and not on top. but if you sort by y + elevation. his new sorting point will actually have a higher value than the tower so he will appear infront (on top) instead.

  • Confirmed. Bizarre. Lumia 550. When first started, after 6 clicks on +, I can move in circles, lift my finger, and watch the dot follow my path in slow motion. Press the power button, press again to get back to the app, and responsiveness is immediate, even hitting + X times.

    Ahhhh. Thank you! I thought I was going crazy! I've spent countless hours/weeks optimizing the game to keep as low CPU level as possible to reduce the lag. And woooops..., close screen open, and the lag is gone. I don't think It's a Construct 2 issue though. I did the same test on some of the Intel XDK demos that comes with the app preview. (I doubt they are done in C2 but don't know for sure) and notice the same behaviour. This seems to be a Microsoft issue from what I'm guessing but so far I can't confirm

    So Lumia 830 and Lumia 550 is confirmed to have this issue.

    I hope more people can do the test as I had a report that som older Android devices had a similar issue, but i havn't tried myself.

    **Edit: Another funny thing is that this behaviour is apparent even if you build with XDK or even Visual Studio.

  • Ashley It seems like on startup touch seems to fail to initialize correctly or something, or maybe stuck in some loop?

    I just noticed that the Touch Lag/unresponsiveness goes away if i lock the screen in game, and then unlock it again on Windows Phone.

    This also helped on other C2 games for windows phone like (Mortar Melon and Last of the Surviors)

    I still need to confirm if All windows phones have this problem or if it's just my device. So calling out for anyone with a windows phone.

  • tunepunk Is there somewhere I can see your game in action?

    http://www.tunepunk.com/arrowheads

    It's based on touch so you need to try on a mobile phone or tablet.

    The arrows are using the "elevation" variable, so that they will sort correctly when they stick on walls etc, and can fly over certain things correctly.

  • I think it also depends on how well the games are promoted by for example buildbox and Gamemaker. One problem is that the C2 showcase isn't very updated, and they could update the showcase with some recent released well made games made with C2, that would be both beneficial for Scirra and the gamesdevs.

  • Ashley do you have any windows phone to test this one?

    http://www.tunepunk.com/touchtest

    I just need to confirm if my device is faulty or it's a problem across all Windows phones. If the problem is a windows phone issue, i can contact them about it. And if it's a pure windows phone problem I need to put the windows phone version on hold and focus on Android/iphone until it's fixed.

  • I just tried this scene on a LG Nexus 5X, stock android. The Touch never failed even as I was approaching 80% CPU.

    The 50% mark is not an issue here. But on Windows Phone it is, even if I build an app with Visual Studio and XDK

    I havn't tried this test on any Apple device yet. But the same seemed to happen on Samsung galaxy S3 as well.

    I just also tried the touch test in another browser (UC Browser) on same windows phone device (Nokia Lumia 830). Touch doesn't fail, but as soon as I'm touching the screen the FPS drops about 20%.

    I don't know if this is a windows phone issue, or I'm just having a faulty device, but it seemed to happen on the Samsung Galaxy S3 as well.

tunepunk's avatar

tunepunk

Member since 2 Mar, 2014

None one is following tunepunk yet!

Connect with tunepunk

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies