+ 1

Algorithm

Can anyone tell/show me example of an algorithm that are needed to build simple games in any programming language? Also, do every feature requires different algorithms or do game devs write whole algorithm in the beginning?

21st Apr 2021, 2:06 PM
Shikaki Van D Wolfgang Sebastian
Shikaki Van D Wolfgang Sebastian - avatar
3 Answers
+ 5
Well the algorithm is game-dependent since not every game does the same thing. Some mostly used popular algorithms are: -A* for pathfinding -Fringe search also for pathfinding -Co-op pathfinding for entity group pathfinding - Terrain acknowledgement algorithms for knowing the entitie's surroundings (AI) -Behavior trees for making decisions based on state -Floodfill for detecting similar things in a grid (think paint bucket tool or minesweeper when you click an empty tile) -Reinforcement learning (More of a ML topic) Then there's the liner algebra, algebra, geometry algorithms for finding collisions, line of sight, simple linear paths, if you need wave-like movement, etc. It's a huge topic, as you see from this list, so first stick to a simple game idea and find the algorithm(s) that are used for only that game and you will learn then make a new game that requires new algorithms and you'll learn those and so on
21st Apr 2021, 4:50 PM
「HAPPY TO HELP」
「HAPPY TO HELP」 - avatar
+ 1
Hope this helps you
21st Apr 2021, 2:46 PM
Atul [Inactive]