In this tutorial, we will be learning a fairly simple concept. How to create a ball that bounces in GMS2.

– My discord

-=Links=-

– Patreon
– Get Fusion!
– Amazing royalty free music
– Free SVG software

zentacoproductions@gmail.com – Contact me

If you would like to have your bugs fixed in a video send you mfa file along with an explanation of the problem
to my email address listed above.

-=Music=-
All music is from the YouTube Audio Library and did not require attribution.

Nguồn: https://shaarique.com/

Xem thêm bài viết khác: https://shaarique.com/game/

21 Comments

Emmanuel Roux

July 7, 2020

Tell me if I'm wrong, but in reality the bounce never stops. Indeed, yspd will tend towards 0 without ever reaching it. For example, if yspd = 0.01, yspd*0.8 = 0.008 and so on. So, in my code, I had to add an if condition to set yspd to 0. What do you think about this?

Reply

Kreyk 29

July 7, 2020

Good, now in clickteam

Reply

Andrei Veiga

July 7, 2020

15:16

Reply

dudule ninnin

July 7, 2020

Does it work with slopes ?

Reply

Fahren

July 7, 2020

Shaun is a great tutor, still great that someone like you does an updated version of it, thank you!

Reply

Anna Blackwell

July 7, 2020

Is there any way to stop the shaking the object does once it comes to a rest on the ground? I thought it would be the same as bleeding the x velocity but it appears to be gravity affecting it..

Reply

Armyofonev8

July 7, 2020

you sir have earned a star of approval

Reply

FILIP HEDMAN

July 7, 2020

Blue ballz

Reply

CheeseCakeJojo

July 7, 2020

I wrote the exact code you wrote but my obj_ball just falls through obj_wall with no collision.
Why is this happening?

Reply

Pro Rambler

July 7, 2020

having a problem where at low enough speeds the ball clips into and slowly falls through the ground until the game crashes when its collision box is below the wall.

Fixed on my own! for those who encounter this: make sure the object's position updates after the collision checks

Reply

Wayne WW Brown

July 7, 2020

Very useful tutorial 👍
what I did I use the (copy/paste) code segment and change the object wall to object ball now the balls bounce off the walls and each other
// collision
if(place_meeting(x+xspd, y, oWall)) { while() … xspd *= -bouncedecay; }

(other part of the code)
but what I having problem with is to make that code segment into a collision script so I can reuse it

Reply

Ksionc Design

July 7, 2020

please more GM tutorials

Reply

RaitonNin

July 7, 2020

was having trouble making fireballs bounce off the ground with a mario mod im making this helps

Reply

Pixel Planet

July 7, 2020

Coding your own games is easier than you think. You know, you should take this online Unity course, on Udemy. It's taught by a software engineer and a game developer, who are both expert instructors. You'll learn C#, object-oriented programming, functions and variables – basically everything you need to know to make games! …and all for the price of takeout. The course is yours to keep and take at any time, and if it doesn't work out, you can get your money back in 30 days. I can't wait to see what you make with this. Get started now with this special discount.

Reply

RGOTI

July 7, 2020

hey zentaco, which game engine is better? clickteam fusion or gms studio 2?

Reply

Matthew Woosley

July 7, 2020

Hi zentaco. Really big fan your tutorials. Was wondering if you have any videos on making a mobile game with clickteam fusion? By putting joysticks, exporting, and things of that nature.

Reply

iAmLion GD

July 7, 2020

how to make over than 1000 objects?

Reply

Leftyy

July 7, 2020

Can you make Icy Tower in Clickteam Fusion?

Reply

Aaron Flores

July 7, 2020

Another great Video Zen! You are the #1 resource for Click Team fusion tutorials! I'm currently working on a platformer, and I'm trying to do Mega Man type scrolling, where the camera is locked during boss fights, but smooth during platforming. But I can't quite get it to go smoothly. Would you happen to have any tips or pointers? I'm using a variation of your Smooth Scrolling Tutorial, but changing the target with a variable. Thanks for all that you do.

Reply

Andre van der Leeuw

July 7, 2020

Will there be another game jam this year?

Reply

J Gee

July 7, 2020

How do you IOS export?

Reply

Leave a Reply