How do I prevent ball from disappearing from game?

0 favourites
  • 12 posts
From the Asset Store
Bouncing ball
$9.99 USD
Template for a bouncing ball game, fully documented in comments and video
  • Does anyone got any tips on preventing a ball from disappearing in between the game? I've tried resizing the layouts and objects,moving positions of the paddle (this and resizing them helped a little. It'll last longer which it did before, but still it don't stop it.) switching the ball from physics to bullet and adjusted the hit points of each paddle and it's now 3. Im not sure what else to do because I was advised that the ball works best as a bullet. Is there any way to fix this or prevent this or is there not much you can do about it?

  • Thank you, but it's not disappearing by the layout or from it. It's disappearing from the paddles. Manly in the harder and faster levels in my game such as 7, 8 and 9. It can sometimes happen on 4 & 5 as well. I cannot have a full match while playing those 3, especially level 8.

    Try just playing level 8 and you'll see what im talking about.

    dropbox.com/s/2kcit4xns2a2enh/Prototype%20Pong%20project%28normal%20size%29.c3p

  • Is there anyone that can please look into this that can help give me a solution to this? I don't want a broken game where players aren't able to finish the game. I've literally tried everything I can possibly think of including watching other videos, searching for links about object disappearing, checking to see if it's possibly a bug, taking out unnecessary things that could possibly cause the ball to disappear and using less hit spots in the paddles which caused it to make it to happen more less, but still it continues to happen. Im literally basically bout finish with the game and want to post it already, but can't knowing this problem can occur while playing the single mood. Is there anyone who can please look into this and find a solution?

  • i took a look at it, but i only managed to experience the glitch on match 8, however, i can't seem to see where the problem is (inside your event sheets) but that was a code based glitch not a Construct glitch, based on how the item disappeared (which basically on contact with the pad moved behind it and continued it's movement at the ricoche angle), a engine glitch won't do that from my construct experience, it might be that there was a delay in construct event system reading, cause of all those

    set engine scale speed 0
    

    ,

    wait 1 2 3 6 seconds
    

    or

    every 0.5 seconds detect collisions
    

    , and it is possible that momentarily a collision detection was delayed and when it came back to normal game scale speed the ball was inside the pad, and was pushed out by the solid/bullet behavior. which seems to be the more plausible issue here, that also is a event system code based glitch.

    To prevent it you need to clean your code, and try removing any delay and waits in your code. especially u need to stop using scale speed of the game engine where is not needed or to pause the game. that expression scale speed engine you are using is a very dangerous expression if missed used (can cause havoc inside a fast passe gameplay), especially when you have a fairly medium size game where you have a AI movement behavior like you do. a good replacement for the scale speed u can do a boolean or a global number 1 to be as game on 0 be game off.

    i mainly use the scale speed of engine for slow motion effects but nothing outside that, and not in the same time as calculating collisions or saving data.

    hope it helps.

  • Thank you! I think I know where the problem is in the sheet. There's a group in the event sheet called "When Score". In the group is where all the pausing and delay takes place when player or cpu scores a point as well as the audience applauding during the paused period. But thank you once again for going through and taking the time to examine the project to see what the issue is, and finding a code glitch. I am even more confident of finishing this game now and putting it out once I manage to safely and completely clear the codes that caused delay and the glitch in this game. THANK YOU ONCE AGAIN!!!

    I'll be testing the global number to substitute the time scale, if I have any questions or problems, Ill come back and let you know. Thank you a 1000 for getting to the bottom of this situation!

  • GeorgeZahariaHey, can you show me a quick example of how to make it go on and off by 1 and 0?

    I kinda of confusing myself with trying to make the numbers work.

  • Hi there, here it is:) you just need to follow a similar structure/pattern for your game (if you do this you need to remove the game speed scale for pausing or stopping the game). You can still use the game speed scale, but i don't recommend it be used in the same time as saving the game, setting scores etc. The game scale is good in some cases, but the game scale also slows down the entire engine, so some of the event reading might be skipped or not happen or happens with a delay, which might cause glitches, or misplaced objects.

    GameToggle

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • GeorgeZahariaThank you for the example, but is there a more simpler example you can do for me of just using 1 & 0? I tried incorporating it into my game and replacing the scales but im not really getting it. The 0,1 & 2 one that u showed me is still a bit much for me to try to understand. Like I kinda get it, but not fully.

    or do I just need to follow exactly how its structured in the toggle example?

    dropbox.com/s/hq6s0dllr09ehev/20190307_162139.jpg

  • hey sorry for the late response, no necessarily i used 0,1,2 because is easier to spot, but you can replace the numbers with groups as you did.

    the structure i made there is basically toggling 3 numbers, if is 0 is GameON if is 1 is GameOver if is 2 game is paused.

    now i used 2 buttons to toggle them, but you need to replace those conditions where i used the buttons to whenever ur player is losing the game or pauses the game. other than that they are all kinda the same structure in most of the Construct games. now u can use as i said above groups, but groups are just a fancy boolean with text over them. a group kinda is the same as a variable that u set it on or off. so u can use what u feel you understand better, just the conditional logic of the code needs to be something similar.

    if players dies set variable 1 if player pressed pause button set variable to 2 otherwise variable should be 0 and game playable.

  • Okay, thank you for your advice. I'll give you an update and let you know if I got it to work. but thank you for your help.

  • GeorgeZahariaHey, thank you so very much for your help. I got it to work and the game plays smoothly and the glitches was reduced greatly during game play. I removed all time scales in the game and performance is great. A few glitches still happens, and the ball doesn't (seem) to disappears anymore. But at this point, im just glad that the overall game performs much better now and that there is less glitch and less disappearance. Anyways thank you once more again. I can finally say that the game is now completed and will be uploaded soon to the scirra arcade. I'll post it in the "Show your construct 3 creation" forum when it's officially completed. Once more again big thanks. I couldn't of got pass this issue without you and other support crew who helped me out on this game.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)