tarek2's Recent Forum Activity

  • Rhindon In a sub Event

    Is touching object

    SubEvent >On any touch end >>>> Do your actions

  • My first Construct 2 game Résumé Run is out now on Google Play!

    Rise to the Occupation!

    In this world, you’ve got to put yourself out there to get what you want. Résumé Run puts that power at your fingertips, but you’ll need the skill and will to match.

    Run, jump, and unleash an array of power-ups while working your way to the top. Hand out as many résumés as possible before time expires! Get promoted by collecting new résumés, applying to hiring managers, and defeating bosses!

    Each playthrough is unique, requiring new avenues and shortcuts to save time. Can you climb the vicious corporate ladder and become CEO?

    How far will you go to get the job? Download Résumé Run today!

    https://play.google.com/store/apps/details?id=com.rodrigosantelices.resumerun

    Hi BeastCoasting

    you should check your Game it may be something wrong with your App as it doesn't allow me to download in any of my devices it says none of my devices are compatible.

    My Devices are:

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

    Samsung galaxy s8

    Are very new Model devices that's why I'm surprised

    I'm from the UK if that helps

  • tunepunk Thanks a lot for the capx that's a great example it definitely improves performance a lot but in my case what I win in performance I lose it on accuracy ending behaving a bit jumping as they can be 4 or 5 famili1 instances at the same time touching one sprite. is a bit complicated and demanding I will keep testing

    Thanks anyway for your help take care

  • tarek2

    16 objects doesn't sound like a lot. Care to explain how it works?, maybe I can come up with something more efficient in your case.

    Are they all checking distance too eachother and get picked if colliding?

    That's what I thought is not many and the problem they will be more on the gameplay, at the moment I'm testing just to see where are the limitations to have an idea.

    Yess that's right 16 objects on the screen and say like (150 of the screen) they are all instances of the same object even I stop everything off the screen, I use a family to check distances between them and make sure they don't check distances with their selfs by filtering the UID of each one and them when picking the family don't pick this Uid wich mean himself so they check distance against all the other ones on the screen.

    To give you a perfect Example of the mechanics is like (Agar.io) when you split and has to stop the overlap between your cells you can be split up into 16 pieces and all of them they cant overlap they have to move next to each other

    I'm not sure if I explained properly haha

    so say 170 instances of one object is the total

    from those 170 instances, 16 are the player and the rest are the enemy

    I filter the 16 instances for the player by instance Variable say Var = "Player" to identify them

    Then check the distances between this 16 instances

    For what I see the problem can be when I filter pick the ones with Var = "Player" c2 will have to loop through the whole 170 if I'm not mistaking and all of this every thick, even if I put another condition first like (is on screen) or (is Active)

  • Looking Awesome!! good job man, I was a big fan of Ninja Gaiden looking forward to seeing the final product

  • Thanks a lot tunepunk for the capx and the tips

    I do use at the moment all the ones that you mentioned the (Line of sight, Is on screen, boolean is Active) etc... but the cpu still goes high when I'm checking distances just between 16 objects on the screen, the only one that I didn't try yet is like the test you did putting all 16 UID in a list and just keep checking distances from that list but I'm not sure if this is even possible to do, I been playing with your capx to see if I can make it work but no luck, I see there is a new feature in c3 that it looks interesting that I didn't know existed the one you use in your capx the plugin "Picked" I may this can help to put the picking in list and just loop through that list I will have to keep testing.

    For my purpose, I need to be able to check distances every thick between the objects on screen and depends on what distances are then apply some actions to them so I need to refer to them one by one independently is quite complicated probably to make it work with a list

    And I agree with you the best results I had from all the Tests that I did, the Line of sight was the winner all the time is very optimized

  • Hey tarek2 thanks! I wanted to have the game out this year before xmas, but im not sure Ill be able to achieve that at the rate Im going!

    What are you working on at the moment?

    Artpunk I just saw your post by luck I didn't get any notification haha

    Yeah man, it happens all the time just keep it at it I'm sure you will get there, xmas is the best time though people love to spend on Xmas.

    I'm working in a game was inspired by Pacman and Agario some kind of fusion jaja is a very funny history how I choose this Game I was tired of starting projects and leave them after some time, until one day I said enough I'm gonna do a very simple game for mobile so I can start and finish at list one game, so I chose this game as I calculated is gonna take me two to three weeks and is one year past already and I don't see the end yet any near I'm going crazy with this I had so enough of this game that I just wanna put it out there in any state like it is now but I keep going lets see, the main problem now left is the performance is a lot of distance checking between objects very often, and I can't-do much about it as the game needs that, so I'm still looking for tips and solutions for the loops, let's see what happens if I finish this game will be a Miracle I end up choosing the most difficult game that I could find by mistake.

    But I did have good things swell, example another main reason I started this game I wanted to get experience with C2 so this game was perfect I learned a lot about picking and many different stuff so has very positive things and I feel like I improved a lot with C2 which is great.

    once I see that I have something solid like there is a chance like I can release it I will post some pictures.

    Take care

  • I don't know if this work for you, but I sometimes use dictionary to store picked UID's. That way the for each loops doesn't have to loop through a whole family, but only the ones stored in the dictionary. That might work when you have many units in the same family, but let's say 20 out of 100 selected, as you don't have to loop through the 80 that are not selected. I found it to have some performance benefit in some cases.

    For me the picking itself seems to use a lot of cpu in some cases, so i try to find ways to use some more lightweight way of picking objects. Restructuring the condition order can help a lot too.

    For example:

    For each unit (loops through all units)

    is Selected. (then picks and filters the ones selected)

    insead use.

    Is selected (pick the selected ones)

    For each unit. (loops through only the selected ones)

    Small things like that can help a lot, but you probably know that already. Trying to filter down with conditions as much as possible before running any for each loops and actions, seems to work pretty well in most cases.

    Hi tunepunk I show you did an interesting test on this very good test Thanks

    Did you manage to find any good results or ways how to improve ?? I will be very interested in that

    do you know if is possible example you have 20 objects on the screen the idea is to take the UID of all those 20 objects and just loop between them checking distances between them and depends the distances do some actions those objects, is it possible without looping through the whole 150 instances that are not on the screen

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have the same problem and still looking for a solution I hope someone can give us a good hint, I got 16 objects checking distances between them so when is in a empty project with just that 16 objects works ok and when I put the same code on my main project where they are like 150 instances of the same object the CPU goes double and triple doesn't matter how much I filter it with boleans and conditions and all kind of tricks is not working and this is just to check distance between 16 instances on the screen

  • tarek2, Nice, you got it!

    Many thanks!!! Be blessed.

    No problem mate, I'm glad you Fixed

    [quote:3r8zyll6]Someday I'll have this skills

    You have already the Skills you did everything by yourself and is looking Great

    Haaah too bad I just noticed a big hole on my capx on the (Else) I left it open even when you close the Menu it will still keep running and checking his Actions, that's what happens when you do millions of things at the same time and quickly, sorry for that I'm pretty sure you corrected already but here is a corrected capx just in case. The popup Button should work better swell before sometimes use to get stuck

    Take care

    https://www.dropbox.com/s/rscirg288hbewpq/SlidePopup4.capx?dl=0

  • Oooh I see, you simply use Object.Pin.PinnedUID . Nice tarek2, many thanks man! Be blessed.

    No problem

  • There is some way to identify in witch object the pin object is pinned?

    Like: ObjectA > Is pinned to ObjectB > Do this

    ObjectA > Is pinned to ObjectC > Do that

    Hi something like this?

    Object A here = is represented by the Text Object

    And ObjectC, ObjectB etc.... = is represented by the sprite object

    Note: I apply the actions to both Objects but you just remove the object that you don't need to apply any actions

    Example:

    ObjectA > Is pinned to ObjectB > ObjectA Do this & ObjectB do that so you just delete one of them

    https://www.dropbox.com/s/up58pnl34jrcv7p/PinnedTo2Who.capx?dl=0

tarek2's avatar

tarek2

Early Adopter

Member since 26 Jan, 2016

Twitter
tarek2 has 12 followers

Trophy Case

  • 8-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
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x5
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

15/44
How to earn trophies