Advertisement

Need Help with AI Movement in My Turn-Based SFML Game

Started by February 06, 2025 02:05 PM
0 comments, last by funkywizard 6 days, 10 hours ago

Hey everyone, I’m FunkyWizard, and I’m working on a project to help me get into a game programming university. It’s my first real game, and I’ve only been learning C++ and SFML for about a month now.

The game is called Murble Dungeon, a top-down 2D turn-based game where you control a marble that bounces into enemies to defeat them. Everything is working well so far, and I’ve managed to get the player movement working after a lot of trial and error.

But now, I’ve hit a roadblock. I need to implement enemy movement, but I’m struggling to figure out how to make the AI follow the same movement mechanics as the player. The idea is that enemies should also "bounce" like the player does, but I have no idea where to start when it comes to AI decision-making for movement.

If anyone has experience with turn-based AI movement, SFML, or general C++ game programming, I’d really appreciate some guidance! I’m attaching my project files below so you can take a look.https://drive.google.com/drive/folders/1S3unYy8ymeQnhqxu5-P50Al3ng7-Q-x0?usp=drive_link

Thanks in advance for any help! 😊

Advertisement