jatin1726's Recent Forum Activity

  • Applying effects to the layer will probably be much better here, so just remove them from the road object and add them to the road layer.

    THanks for the reply. Removing an effect from object is not affecting much though a little. Main issue here if I don't destroy road object cpu consumption is less but if I start destroying road object to save memory, then cpu spikes up. I think destroying is not releasing memory. You can try it with any self example and I assume lets Ashley make aware of this issue though is already working hard on C3. Nice man.

    Any alternate solution will be helpful too. Though I tried fadeout solution too which couldn't help me.

  • Using two effects on so many sprites is really a bad idea, especially for a mobila game. Try to optimize the image so it can be used without any effect. You dont need to includ dt in bullet behavior because it is already using it. From your example i dont realy get how your game will work, but i am sure there will be some things that need improvement. Here's an example where I think it could work better:

    https://1drv.ms/u/s!Ap_-qxoGKbDcg2-8y22xY2n9jbyh

    What my game is doing? Here is preview of my game. youtu.be/tcgMAigbFdg You can see road is created with bending dynamic angles, Also video is created when I was using least effects (2 weeks back). Within few seconds u can see slow down and that cpu consumption is still there. Main problem is destroying process eating cpu.

  • What are you using to preview your project? Using the newest version of chrome or NW.js is significant faster then the newest version of firefox. Did you try the same thing in an empty, new project to make sure that creating/destroying is the cause? Maybe sharing your project can help us to find a solution.

    I tried debugging using chrome. I have to run it on android and on mobile performance is too bad to even play this game for 15 seconds. Sample capx I will try to send here. Functionality shown in sample is just small part of my game.

    touch.affle.com/explorations/mohan/capx/sample.capx

  • One reason it might cause your cpu to spike when you destroy items/objects, is cause the coding you have to calculate the position of the 1000 objects are taking in consideration the position of objects at all time... if you change that and only use the position of all objects as being important when they spawn and then never compare their position while the game runs, when gets destroyed they shouldn't use that cpu spike anymore.

    Also it might be based on how many items are you destroying in 1 tick... maybe limit them instead of each 5 seconds, more to when each individual object reaches outside of screen ? and apply the removal for each object and not all objects? just an idea.

    This might be a event coding issue more then cpu dump data speed.

    THanks for giving time to my issue. to reduce cpu consumption I am not using distance calculation. out of many alternative I am currently keeping a sprite at bottom of screen and when objects touch that destroy the object thus saving mathematical calculation. Also, I have always noticed that games built on other platform do not consume this much cpu as construct 2 does. C3 also has same issues even c3runtime is not much improvment in real world may be on papers. Though I understand it is still in development. I love construct 2 and think Ashley should look into this.

    Any other solution is most welcome would love to try.

  • I tried to reproduce this using fade out to destroy the objects. Enabling fade always leads to a lower CPU usage (using C2 261 64-bit).

    thanks for trying. I followed your solution but no luck, cpu consumption is still same. high consumption. Me too using same version of construct 2.

  • Hi Friends,

    I am creating a racing track which needs object to be created every tick so more than 1000 objects are created within 20 seconds. CPU is 12%. Now to reduce burden I destroy each object after 5 seconds. But when destroy action happens cpu reaches 35%. So when I don't destroy any object, game slows down after 15 seconds but if I keep destroying objects to free memory then game slows down within first 5 seconds. I feel construct 2 is having a bug that it is not releasing memory on destroying object. Can anyone help me how to decrease cpu consumption by destroying objects?

    Regards,

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Dop,

    Thanks for the time. Problem with touch count is on second touch on the device it turns all touch to count 2 making it difficult to detect which finger touch made it count 2, was it first touch or 2nd touch.

    Quite difficult to explain but really grateful to you to suggest me solution and some point it has helped me :)

    Regards,

    Jatin

  • Hi Bruno,

    The tween is same to download. please download it from the link but remember it is behavior and not a plugin. Please read the instructions carefully before using plugin then raise a query. It is difficult to explain basic stuffs here. Hope u understand.

    Regards,

    Jatin

  • Hi Dop, thanks for the time and example. But for me the issue still exist. The thing is two touch should be active at same time. like one touch controlling movement of the player and other touch on same time at screen (may be on jump or fire button) do its action.

    how can i detect that when user is touching button 1 on screen, he is trying to move player at the same time while player is moving and button 2 is touched, is trying to fire or jump along with movement.

    Can you help me out? and I really appreciate for sharing with precious time in helping me.

  • Thanks Dop for the suggestion. But the thing is left hand thumb or finger touch is used as player movement/action and right thumb swipe up anywhere on screen makes player jump. You can check this sample game at playstore play.google.com/store/apps/details

    player can shoot and jump at same time.

    How can we do that ? Please guide me.

  • Hi Friends, I need help in detecting two different thumb touch.I don't know how to use touch.id to do it. Any capx help will be deeply appreciated.

    What I am trying to do?

    1. When user is touching screen with left thumb, player is running

    2. When player is already running and user touch/swipe up screen with right thumb, player jumps.

    I have already seen touch detect tutorial but couldn't understand it. My bad I just beginner type for construct 2

    Please help me or suggest me ways to detect two different thumb touch at same time on mobile screen.

    Thanks a lot guys in advance.

  • Hi Friends I am very happy that I have completed selfie taking game with construct 2 and you can post selfie directly on Facebook. I am sure you would like to play the game so here is the link to play the game.

    http://bit.ly/HT3gamelink

    If you don't want to play and just want to see how it works the see this demo play of the game.The see the video below.

    Subscribe to Construct videos now
jatin1726's avatar

jatin1726

Member since 27 Oct, 2014

Twitter
jatin1726 has 4 followers

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • x25
    Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies