Skip to content

klassmann/lua-enemy-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enemy AI

Small example of using Lua script for giving game objects some inteligence.

About

You can play with WASD the green rectangle and it can flee from red rectangle. You can also make changes in the enemy_ai.lua script during the gameplay and hit R button to reload the script.

What you can learn here?

This repository is used in an article on my blog, Lua for Dynamic AI in Games , in that article I explain in detail how some features from Lua were used in which case.

Dependencies

Installation depends on the platform, in Ubuntu Linux:

sudo apt install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev liblua5.3-dev lua5.3 cmake

License

Apache 2.0