tarek2's Forum Posts

  • Hi

    I'm having some trouble lately with the triggers, in this case, is with the (on Animation Finished)

    After the Animation finish, I change the Animation & size to 64x64 but it doesn't work maybe again I did something really stupid that I cant see or this is a bug??

    How to reproduce:

    Left click Mouse to start the animation & on animation finish, you can right-click on any tile it will update the text object to display the UID & Size of that tile

    The size of the tiles after animation finished it should change to 64x64 but it doesn't work

    Capx: https://www.dropbox.com/s/m3698pqez19euyn/Animation%20Bug1.capx?dl=0

    I'm using the last stable release r250 just in case you cant open it

  • Same thing here tested on four iPhones and all of them gives the Black screen, I followed many tutorials and no luck is there any fix for this?

  • I am also interested in an answer to all these questions!

    I saw many people asking the same question but there is no concrete answer, lets see if someone can give us a hand

  • If you just want to test, why not use Remo te Preview?

    Yeah Ashley thanks but that is what I been using for a long time the c2 Remote Preview , The Remote Preview from c3 it takes very very long time for me to load is not very suitable at the moment if you wanna make quick changes to test things quickly Plus scan the link every time etc...., the construct 2 in the other hand is perfect it loads straight away doesn't matter how big is the size of the project.

    But the real issue why I wanna test on phones without the Remote Preview is that I'm having some trouble to debug performance as sometimes it will give good performance and sometimes the same capx without changing anything at all it will give a completely different performance so I thought maybe by testing directly on the phone will give more accurate results just to make sure that I'm going in the right direction to avoid big surprise at the end and spend les time worring about the results from c2 Remote Preview as is sllowing me down quite a lot, I thought testing directly on the phones without Remote preview is the most correct and most used method by collegues here on the forum? unless I misunderstood something

  • Hi

    I have been all day looking at tutorials and staff but most of them they dealing with Publishing the Games to the stores I'm still confused like at the beginning as I just wanna test for now on the devices to check the real performance (Not Publishing). I have many questions I hope someone can give me a hand and guide me in the right direction.

    -I'm using the C3 build service and has two options (Cordoba &

    Xcode) which one do I have to choose

    -Do I need developers account for just testing the devices (not

    Publishing)

    -The same as above Do I need a Mac for just testing the devices (not

    Publishing)

    -If I can use windows Pc how can I install the zip.File that gives c3 --

    exporter after exporting and install it directly to the iPhone and test it

    -Is there any tutorial around that I missed showing how to export and test on devices

    -Installing and testing on the devices does it give 100% accurate performance not estimate like c2 does? Meaning those results will be accurate and will be the same as if you have published to the store

    Sorry for too many questions but I'm completely new to this

  • Both of them measure 5-10% CPU for me. The iPhone 4 is pretty old and is stuck with iOS 7 - now four versions behind - so if you only see a difference there, it may just be that old versions of Safari don't optimise the JavaScript so well.

    I don't think so if it was Anything related to JavaScript it will perform the same (with or without) Containers here you can see very clear just by adding an object to a container without any picking involving between this two objects it affects the performance Badly so I think is a bug from C2 and looks pretty serious

    I mentioned Iphone4 because there you can see very clearly the performance drops but the truth all the phones are affected by this, the only difference is that are more powerful phones and they can handle it better but it shouldn't happen that because if you notice there is only code for the controller we don't even move the player yet and still the CPU goes really High so when you ad more events for the Game Logic then is when you will notice the Fps Drops even on Newer phones.

    If you cant Reproduce it let me reproduce it for you:

    Look for when I touch the screen and start moving the Pad controller how the Cpu goes Up and the sooner I stop touching the Cpu goes to normal plus I recorded on Debug Mode so you can see how the Draw calls is the one causing the problem it may help you more to debug the problem

    Results are With Containers Cpu perform Double & sometimes more than that

    Tests:

    ==========================================================

    Iphone 4

    No Containers

    Normal Mode:

    https://www.dropbox.com/s/o5em0xb7d9k9b9v/Iphone4%2BNo%20Containers%2BNormalMode.mp4?dl=0

    Debug Mode:

    https://www.dropbox.com/s/a97sfiaki735gjh/Iphone4%2BNo%20Containers%2BDebugMode.mp4?dl=0

    With Containers

    Normal Mode:

    https://www.dropbox.com/s/1195dsia704oz9m/Iphone4%2BWith%20Containers_NormalMode.mp4?dl=0

    Debug Mode:

    https://www.dropbox.com/s/kffbn5vyclzzkzo/Iphone4%2BWith%20Containers%2BDebugMode.mp4?dl=0

    ========================================================================

    Iphone 6

    No Containers

    Normal Mode:

    https://www.dropbox.com/s/2m0vpnafu7ut5e3/Iphone6%2BNo%20Containers%2BNormalMode.mp4?dl=0

    Debug Mode:

    https://www.dropbox.com/s/2ez47lm2o1j4d7l/Iphone6%2BNo%20Containers%2BDebugMode.mp4?dl=0

    With Containers

    Normal Mode:

    https://www.dropbox.com/s/pzxrdfv9d8tspri/Iphone6%2BWith%20Containers%2BNormalMode.mp4?dl=0

    Debug Mode:

    https://www.dropbox.com/s/zvzfb3eec65h2bl/Iphone6%2BWith%20Containers%2BDebugMode.mp4?dl=0

    ======================================================================

    Iphone 7 Plus

    No Containers

    Normal Mode:

    https://www.dropbox.com/s/imfq887ei5om32m/Iphone7%2BNo%20Containers%2BNormalMode.mp4?dl=0

    Debug Mode:

    https://www.dropbox.com/s/5lecaoremra7apl/Iphone7%2BNo%20Containers%2BDebugMode.mp4?dl=0

    With Containers

    Normal Mode:

    https://www.dropbox.com/s/zu3zxklmh5sbq20/Iphone7%2BWith%20Containers%2BNormalMode.mp4?dl=0

    Debug Mode:

    https://www.dropbox.com/s/ob1o2btafom65pn/Iphone7%2BWith%20Containers%2BDebugMode.mp4?dl=0

    =====================================================================================

    Iphone 8 Plus

    No Containers

    Normal Mode:

    https://www.dropbox.com/s/ztfl8xzqye3shj7/Iphone8%2BNo%20Containers%2BNormalMode.mp4?dl=0

    Debug Mode:

    https://www.dropbox.com/s/k66wgkfpyf5wt5u/Iphone8%2BNo%20Containers%2BDebugMode.mp4?dl=0

    With Containers

    Normal Mode:

    https://www.dropbox.com/s/mhurt2tc156du2c/Iphone8%2BWith%20Containers%2BNormalMode.mp4?dl=0

    Debug Mode:

    https://www.dropbox.com/s/7h256djmgrtttlv/Iphone8%2BWith%20Containers%2BDebugMode.mp4?dl=0

  • I could not measure any significant difference between the two. Could you produce a minimal .capx demonstrating the problem? It also helps to provide two already-prepared .capx files so there don't need to be instructions to follow to modify them, I could have done something wrong (and people often forget a step). Also a good approach as tunepunk discovered is just to modify the quadissue performance test and measure the difference when you add something to the main sprite.

    Sure Ashley I thought about it first but here you go two capx, Both capx are identically in objects and set up it only varies in >> one uses containers and the other one doesn't.

    How to reproduce: just keep touching and Moving the controller with the touchpad will be easier to see the difference if you test it on a phone like Iphone4

    1-This is the good one Doesn't use Containers

    https://www.dropbox.com/s/7si1khcldvfhin4/ContainersBug-1.capx?dl=0

    2-This is the Bad one uses Containers

    https://www.dropbox.com/s/27r14ancwcidbae/ContainersBug-2.capx?dl=0

  • Hey tunepunk

    I have another one for you to added to the List, I have been Four weeks Hunting this one like crazy I recreated the set up for the Game that I'm doing like 5 times checking every detail and recreating on different ways the same thing and couldn't find what was causing that much poor performance and today I remember this post and started to loock in places that I would have never guess if I didn't see this post before, so I finally after going absolutely mad at last chance I spotted the Problem (Containers).

    Is a really really weird problem as puts the Draw calls through the roof for no reason just by touching the controller I say weird because in the controller event sheet there is no code related to anything for the graphics or sprites, it just has the events for the controller but the Draw calls gets affected I don't know how

    Here is the Capx

    https://www.dropbox.com/s/zwu9q5s1xu9hwgq/ContainersBug1.capx?dl=0

    1-Play the capx with only the first group Active and no containers watch cpu+ fps + Draw Calls, keep touching and moving the controller

    2-Then after deactivating the first group and Activate the second group but this time add the (Rouds Object) in a container to the Tiles and watch cpu+ fps + Draw Calls going crazy keep touching and moving the controller, you will notice this test more on phones like iPhone 4

    the Fps drops from 20 to 30 and on iPhone 6 CPU jumps to 90+ plus fps Drops

    Honestly, I spend more time hunting what is causing poor performance than actually making the Games can you please Ashley Recheck all these things

  • tunepunk N1 Grate work, Thanks for sharing really good info in there

    [quote:247nnno4]but if people are experience performance issues it's good to at least let them know, what might be the cause.

    +1

    All those things that happen internally in c2&c3 that can affect performance it should be public for everyone to at list give the chance for developers to check if those are the one causing the performance drops to fix it because it may you end up losing huge amount of time looking in the wrong places, I had to stop a project after worked on it for 10 month none stop because of the performance issues that I couldn't resolve It uses Families everywhere and mostly checking distances because I couldnt use The Line Of Sight, I guees is time to go back and check if that was the main problem causing poor performance I would love if is this the case so I can carry on with it and finished , was a lot of work done in there it was for Mobile thogh

    Anyways thanks for the heads up and please keep it coming if you find any more stuff like this

    Thanks to jed Rose for sharing swell

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That looks really cool man keep it up, I love the contrast you put in all your Graphics making all your characters and player stand up from the background so they don't get lost in the background which is really important, all the graphics look clean and have beautiful colors making them very pleasant to look at, like the water level.

    I really like your style, congrats and all the best with your Game

  • tarek2

    This would be a case where it would be nice if C2 allowed you to step though the code with the debugger. Anyways it may be helpful to read about the A* elsewhere to see how it works.

    I use the 'done' variable to stop the looping. It's only set when the goal tile is reached. The reason it keeps looping even though it starts with only one object that's 'open' is the neighboring tiles are picked with a family and added to 'open'. To clarify node and othernode can refer to the same objects. Maybe that's where the confusion is.

    The return value is not used in this particular example isn't used but in cases where a path can't be found 0 is returned. That can happen when trying to find a path to a separate island of nodes.

    I see that makes more sense now, is gonna take me time to fully understand it through my brain is been spinning like crazy that is an awesome Loop man I need to learn that, I didn't know you can do that with a Function in one call

    [quote:1pvwkbwj]This would be a case where it would be nice if C2 allowed you to step though the code with the debugger.

    That would be awesome would have saved me one week of debugging running in circles I tried all kind of tricks and no luck jeje

    I will keep reading about A* like you said to learn more about it.

    Thank so much R0J0hound for all your help

    Take care

  • Bravo n1 R0J0hound Thank you so much

    The trick for "octagon collision polygons" than the trick perfectly it avoids diagonals now, I can't believe it was that easy I been trying it for a week to do this jeje

    Thanks for your help I really appreciate it

    There is one last question for anyone that can help on this, I know is gonna sound funny but I swear I cannot debug how is possible that picks each tile of the path plus highlight them because this is what I know

    -The Function gets Call once to find the Path and is a trigger once

    -The Function Runs top to bottom never goes back UP unless the Function gets called again if I'm not mistaken

    -The Loop starts with one node that is "Open" & (Done =0 )then in the following subevents gets opacity 0 so far we have only one with opacity 0 & (Done =1 ) which stops the Loop, but how is possible that goes again back up to highlight the rest of the tiles of the path if the Function doesn't get call again?? I been trying to figure it out and I cant

    -Also, Why do you need to Return the Value 0 or 1 at the end of the Function? because if I disable still works normally doesn't break anything

    Thank you in advance

  • Any reason for using a corner of the hexagons instead of their centers?

    If done manually with events you'll use this for finding the path:

    https://en.wikipedia.org/wiki/A*_search_algorithm

    The difference between a hex grid and a rectangular grid is just how the neighboring grids are found. For simplicity collision detection can be used.

    Here's an example:

    https://www.dropbox.com/s/dwg8owxstf76g ... .capx?dl=1

    /examples29/astar_hex.capx

    In it it defines a function "astar", which you call with two iids: a start and and end node. After the function the start node's node.next will be the uid of the next node in the path. This can then be repeatedly followed to the end node. For smooth motion you'll have to use the moveto behavior or devise your own method.

    Event #9 is where you control the cost to move to a node. Right now it uses the distance times the average of the node costs, but there's no reason you couldn't tweak it to be based on other factors.

    Wow R0J0hound that was awesome and is running amazingly fast, runs at 1 % in my Laptop <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    I was looking for some type of Pathfinder like this for a "Bomber Man" like Game which turns out is an incredible challenge the Ai, I try it to replicate your Capx to use it with Squares tiles and I got some troubles that I can't figure it out, I would love if you can give any advice if possible:

    1-My first problem is that on this capx moves in diagonals swell but in Bomber Man only moves four directions (Up, Down, Left, Right) is there is any possibility that it doesn't count the diagonal moves? so it doesn't go through between two solids blocks

    2-How would I make the same thing but for each Enemy? Example Each Enemy has to find his Path to the Player independently, will be possible to do this without Arrays?

    3-I haven't touch much the official Pathfinder in c2, will it be better for a Game like this to use the official Pathfinder or what would you recommend with your experience?

    I hope you can give me some guidance as I'm a bit stack here, thank you so much for your Time

    This is what I got so far:

    https://www.dropbox.com/s/zcww0mepocp26k3/FindPath1.capx?dl=0

  • [quote:3j1ui7ji]

    The update isn't live yet, so you played the same version

    , cool then.

    [quote:3j1ui7ji]

    however I changed that now. So it starts in the kitchen every time. I'm not sure what's better though.

    I think there is nothing wrong with that however, it may confuse people playing the Game and may end up thinking that the Game is buggy like me, but now that I know it meant to be that way it doesn't bother me, the best bet it will be to start from Kitchen if the pass that level Unlock the next one, so even if they die again they will have both levels to chose from, this way you give them a choice because there will be people that like one level and other people will like the other level or maybe both, either way, they can choose their selfs what they like and every one happy I guess

    Take care

  • AndreasR

    YW mate Glad to help.

    Grate that you fixing it looking great

    I give it another go today to check the updates and here is my second report

    Ho yeah I forgot to mention the most important, the Device that I tested it on is

    Tablet: Samsung Galaxy Tab A SM-T585 16GB Black, 10.1

    So I went ahead and tested it on today and I have to say is so funny the Game as is unpredictable on which Level you will start, you see this time the first attempt to Play I hit the Play button and it started in a new Level that I didn't see it before, is the Space surfing in Board and it looks really cool I really like this Level my favorite so far, So here is some things that I noticed:

    1-Any Level you play at the first time the Music works but if you die just once and restarts in the same Level the Music will not work again, and this happens in all the Levels (space, rocket, and The Runner)

    2-On Menu when you hit the button Play it choose random Level, so you never know in which Level you will end up is like surprise is nice but maybe you didn't programmed do that, I mention it just in case

    3-On Menu the same, the first time you will hear Music but after you die and came back to the menu it wouldn't work most of the times

    4-Another thing I noticed is on the cocoon screen it flicks very quickly like is trying to display two things at the same time and then corrects himself to the coocoon screen, this is happening very quickly so unless you press attention you wouldn't see it, is like a littel conflict there

    5-[quote:rsam5m1q]I changed that so that the player doesn't get stuck on frontal collison. He just loses a life and starts flashing (indestructable mode).

    If you mean that when it gets push from the front of the obstacle loses the life then it doesn't happen at all on my side I test it on both tablet and phone unless I miss understood something there are no life taken on my side, also is a mix, sometimes it will push the Player back to the end and sometimes the player it will flash and get through but no life taken

    6-This is not a bug but I feel like a lot of times after the player jumps on (Runner Level) it gets push back to much to the back and you cant keep up, is like once you are at the back nearly touching the Left edge that's it there is no way that you can catch up to the front doesn't matter how good you jump or control the player after and I think this it will explain this:

    [quote:rsam5m1q]2) Should also be fixed with the upcoming version, thanks for letting me know!

    This mostly depends on the screen ratio of your device, so I haven't had this issue on my iphone.

    I still get this happening on both the phone and Tablet

    =============================================

    The Runner Level it feels much better since the first time that I played when you Jump, Im not sure if you fixed the Gravity but it works much better as it dosnt fly back when it jumps now

    Other than that it looks Grate the Game AndreasR keep it up, wish you Good luck, Sorry to be the annoying guy but I think is worth for you to know all these things jeje

    All those points happened on both Table and Phone

    Devices Tested on:

    Tablet: Samsung Galaxy Tab A SM-T585 16GB Black, 10.1

    Phone: Samsung galaxy s8