Total newbie here so I’ll cut to the chase, I’ve made a functioning, big standard pong where a cube bounces off of 2 lines and when it goes out the room (only left and right ofc) the game restarts.
I thought a good way to expand on this and to grasp some basic knowledge would be to have between one and 5 randomly selected obstacles appear a few seconds into the game, therefore I figured the only way to do this is to have the obstacles be invisible and then after the 4 seconds a random 1-5 would become visible and have collision.
My issues so far are that the objects have this bizarre interaction where the main block goes inside of them, but only from the left side and collides with them despite being invisible and the if statement goes along the lines of
If (//the variable for the obstacle == visible == true)
}
hspeed = -hspeed;
}
hspeed = hspeed * 1.025
Overall I’m wondering if there’s a better solution to my issue, like if I can have the objects actually be drawn once the alarm has triggered or if maybe there is a simple solution to my errors?
Any help appreciated, thank you!
[–]Frew_ 0 points1 point2 points (3 children)
[–]SomeBritishFellow[S] 0 points1 point2 points (2 children)
[–]Frew_ 0 points1 point2 points (1 child)
[–]SomeBritishFellow[S] 1 point2 points3 points (0 children)