DEV Community

Cover image for Make your computer move from A to B in javaScript (Whilst also avoiding walls!)
Ania Kubow
Ania Kubow

Posted on • Edited on

2

Make your computer move from A to B in javaScript (Whilst also avoiding walls!)

This tutorial is useful for so many games, but I am going to show you how to do this using PacMan as an example. For those of you who watched my PacMan Game Walkthrough, you will know that in the game all the ghosts have random movements. They do not really 'chase' PacMan around the board. Hopefully, after watching this video, you will be able to implement some smart ghost movement logic into your game, resulting in each ghost chasing PacMan.

Watch the video here > https://youtu.be/Rr2xCoOm5BM

I would love to see what you made so please tag me on twitter on @ania_kubow or mention me on Youtube so I can find it and see :)

Top comments (0)

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started