This enemy ai tutorial shows you how to make an enemy that bounces off walls (ricochet) with only 3 lines of code in GameMaker Studio.

The idea is quite simple. You give you enemy a start speed plus a direction where to go to. Movement is now setup, the automatic bouncing work when you have a collision with an instance wall which needs to be flagged as solid. To automatically change the enemy’s direction just input move_bounce_solid and viola, it does now bounce off walls

This system can be used for bullets that reflect, bounce of walls also.


πŸ‘‘ Support me and get fresh game art and game maker projects every month:
https://www.patreon.com/1upindie

Follow me on:
πŸ“Έ Instangram: https://www.instagram.com/1upindie
🐦 Twitter: https://twitter.com/1upIndie
πŸ’¬ Discord: https://discord.gg/gvr98nb
πŸ“œ Udemy: https://www.udemy.com/course/become-a-video-game-developer-with-gms-23/ (See youtube about page for discount)



Corey Archer CC0
https://opengameart.org/content/top-down-pokemon-esque-sprites

————————————————————–
0:00 What we will do
0:37 Subscribe
0:48 Theory how it works plus a setup
1:23 “Coding” part

1up Indie

View all posts

Add comment

Your email address will not be published.