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

Recent cool cards!

Did a couple ten pulls and got nothing!

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.

Merry chistmas to those who celebrate and happy holidays to everyone!

I hope you all have a wonderful holiday and a fantastic end of year!

Please look after yourselves, keep being awesome and please stay safe out there!

Finally! Been waiting for this for months!

With this catching other things should be MUCH easier!

Woop!

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

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!!)

So I spent a while remaking the title screen load code only to realise the reason it was taking so much longer than a normal island was because the file for it had all the objects in one big list instead of being broken up in to chunks

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