1 year ago

OH! Different way of doing it.

11 lines of code, no randomness needed to stop them bouncing forever up and down!

This still means individual objects for the balls and bouncers, but no physics engine definitely means this is possible for minigames!


Code:

if gravTrue == true

{

if vsp < vsp_max {vsp += grav;}

}

var _col = noone;

_col = collision_circle(x,y,sprite_width,oSolid,true,true);

if _col

{

var _curSpd = sqrt(sqr(hsp)+sqr(vsp));

var _nAng = point_direction(_col.x,_col.y,x,y);

hsp = dcos(_nAng)*_curSpd;

vsp = -dsin(_nAng)*_curSpd;

}

x+=hsp; y+=vsp;

4
3
3
2
2
1
1
1
1
1
1
1
1
1
1
1
1


4 comments

Loading...

Next up

Woop!

New pack day! Let's open a couple 20 pulls!

I wish I had more to show recently but I've been taking it easy over the holidays and what I have been working on is just optimisations which doesn't translate to gifs so well

Finally! It has taken me 17 days to get this from the Wonder Pick, I would have gotten it sooner but I pressed the wrong place not realising my phone screen wasnt locked (I always press the same location every day)

Finished the set too! (Except shinies)

Happy New Year everyone!!

Geez, 2026!!

Bit of a short one this month. I took things easy over the holidays, partially because of the time of year but also the heating broke and granny had a few bad days so she needed more focus.

PIKACHU NOOOOOoooOOOOo!!!!

I want that cactus card!!

because I wanted to?

#Devruary

Finally! Been waiting for this for months!

With this catching other things should be MUCH easier!

Charged sticker appreciation post for December!

Thank you all so very much for everything this past year, I hope you all had a great one and have a fantastic 2026!

(WOW, three way tie for first place!!)

TCGP Has the Gold packs back and I need like 150+ of them so I did 12 pulls, got some good ones!