Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Is it possible to "code" A star (A*) algorithm in Construct 2?
I know there is PathFinder behavior, but i'd like to kode it in construct events to show in school that contsruct also can do it (not only programming language).
Events aren't well suited to highly algorithmic code like the A* algorithm - that's part of what plugins are for, to offload the algorithmic things. So I'd go for the PathFinder behavior.
I agree with Ash but if it's just to show off a bit, you can try adaptating r0j0's cap into a capx (you need to download construct classic)
I think it's pretty doable, all functionalities you need are in c2 already (except for the foreach ordered... But it's just to set random start and goal on start of layout)
Develop games in your browser. Powerful, performant & highly capable.
Here is an example for grid based astar pathfinding. It's useful for a visualization of the algorithm, but plugins are better suited for something like this. As it is it's a bit laborious to re-implement it for every project.