[Games] IMPORTANT ANNOUNCEMENT! SORTA!

Colonel Thunder

Renowned Blunderer & Dishonorary Czech
Member
Alright friends. I actually have a decent shot at winning some prize money in a video game competition here. If you wouldn't mind heading over to Kongregate (http://www.kongregate.com/games/CanadaGDP/legacy-ball) and rating my game, "Legacy Ball", that would be awesome. The competition ends uh, less than 24 hours from now. So please vote, and generously!

Thanks so much and have fun!

So I'm making a little physics based puzzle game for a class I'm taking. I finally managed to get the core mechanic working properly today. Here's a link to it in case you folks want to try it out in its way early alpha stage.

https://dl.dropboxusercontent.com/u/248465061/ARGH/index.html

You hold down the mouse to draw lines.

Lemme know what you think.
 
Last edited:

coolpool2

Savage AF
The Original Gangster
That's pretty cool. I think for this kind of game maybe you should have a limit to how much you can draw. I mean I know there is a 10 second time limit but just take that into consideration.
 

Xander

Well-Known Member
Member
You kiddin me?! I pushed every button on my keyboard and nothing happened!
 

Firedemon

Well-Known Member
Member
Sometimes the ball will bounce as if it collided with the mouse when it did not. I believed this to be a result of being at a high velocity, though I've now seen it at relatively low velocity as well. The ball also does not seem to reliably collide with the mouse except when the mouse it below it, and I've encountered the ball clinging to the mouse with a bit of luck, where the mouse is inside the ball and it follows the mouse for a time. This is probably because checking collision in multiple directions is rather difficult.

A collision is whenever the mouse's position is within the bounds of the ball. The direction of the collision is dependent upon the relative velocities of the ball to the mouse or the mouse to the ball. For one dimension, if your velocity is in the same direction for both the ball and the mouse when you collide, the faster object will be striking the slower object on the side facing the faster object. So if your mouse is moving faster than your ball and both are moving to the right, the mouse will strike the left side of the ball and should impart rightward momentum. Similarly, if the ball is faster and both are moving to the right, the ball will strike the left side of the mouse, but since you probably don't want to impart momentum to the mouse on collision, you can just treat this as the ball having been hit on the right side. If the two objects are moving in opposite directions, the impact for each object will be on the side the object was moving. So if the ball is moving the left and the mouse to the right, the ball got hit on the left side and should gain rightward momentum. All of these examples function the same in the up and down dimension, simply swap right for up and left for down, so just have the program check for both dimensions. But there's an issue, you can't easily get a velocity for the mouse. To fix this, record a position for the mouse, then find the difference of that position and the position from the previous iteration of the program's main loop, which will serve as a rough estimate of an instantaneous velocity. Congratulations, you've now approximated calculus with a video game. And of course, the sign of that difference will tell you the direction of motion just as it would on the ball's velocity. With an approximation of the mouse's velocity, you can also use that to better model the reaction of the ball to being struck.

There is also the special case of when one of the objects is not moving. If the mouse is not moving and the ball strikes it, the ball should reflect. If the ball is not moving and the mouse strikes it, the ball should go in the direction of the mouse's motion. This should be done by dimension, not overall. So if the ball is moving in one dimension but not the other, it should act as if it was hit while moving for the dimension it is moving in and act as if it was hit while stationary for the other dimension.

Of course, I notice you're using Construct 2, so I still don't know what kind of control you have over that kind of thing.
 

Colonel Thunder

Renowned Blunderer & Dishonorary Czech
Member
That's pretty cool. I think for this kind of game maybe you should have a limit to how much you can draw. I mean I know there is a 10 second time limit but just take that into consideration.
Duly noted, thanks!

You kiddin me?! I pushed every button on my keyboard and nothing happened!
Huh, that's weird. Your mouse doesn't do anything?

Lots of stuff
Yeah, the physics system definitely needs to be reworked.
 

coolpool2

Savage AF
The Original Gangster
One thing I find is that if you run out of momentum you can just encase the ball from the bottom and sides and draw lines under it to push it upwards.
 

Firedemon

Well-Known Member
Member
So, uh, I noticed you posted a new version on the MyBook, so I started fiddling with it.

I'm trying to figure out what the trampolines are doing on the third level. I presume they aren't meant to behave this way. I also presume you're aware of the glitch by now, but in case you aren't, the ball bounces off very weakly when falling at a high speed, but bounces off very strongly when falling from a low speed, which obviously isn't how trampolines work, which is why I presume these aren't meant to do that either. By stopping the ball's momentum during the first drop, then letting it hit the trampoline, I've concluded that it does indeed depend on the speed you hit at, not set to alternate or something, which makes much more sense for a glitch. It looks to me like you set it to bounce off with the inverse of the speed it hit with, based on my observations of multiple drops.

Oh god, that next level with the trampolines. I surrender, I'm just bad.
 

The Hound

Just Monika
Member
I thought the yellow square to the right was a thing I was supposed to get the ball on, after 5 tries I realized it wasn't
 
Top Bottom