Saloon Lua Client
This is the root of you AI. Stay out of the joueur/ folder, it does most of the heavy lifting to play on our game servers. Your AI, and the game objects it manipulates are all in
games/saloon/, with your very own AI living in
games/saloon/ai.lua for you to make smarter.
How to Run
This client does not work on the Campus rc##xcs213 Linux machines, but it can work on your own Windows/Linux/Mac machines. You just need to install lua 5.1 and luajit, both which are easy to install.
Make sure you have the package
luajit installed, then:
Just download LuaDist. That package has everything you need to run the Lua client, and actually has LuaJIT to run Lua. Place it the contents anywhere, then make sure to add the path to the bin/ folder in LuaDist to your Path. Then you can:
lua main.lua Saloon -s r99acm.device.mst.edu -r myOwnGameSession
There is a
Makefile provided, but it is empty as Lua is an interpreted language. If you want to add
make steps feel free to, but you may want to check with an Arena dev to make sure the Arena has the packages you need to use in
It is possible that on your Missouri S&T S-Drive this client will not run properly. This is not a fault with the client, but rather the school's S-Drive implementation changing some file permissions during run time. We cannot control this. Instead, we recommend cloning your repo outside the S-Drive and use an SCP program like WinSCP to edit the files in Windows using whatever IDE you want if you want to code in Windows, but compile in Linux.
The only file you should ever modify to create your AI is the
ai.lua file. All the other files are needed for the game to work. In addition, you should never be creating your own instances of the Game's classes, nor should you ever try to modify their variables. Instead, treat the Game and its members as a read only structure that represents the game state on the game server. You interact with it by calling the game functions.
|Tile||A Tile in the game that makes up the 2D map grid.|
|YoungGun||An eager young person that wants to join your gang, and will call in the veteran Cowboys you need to win the brawl in the saloon.|
|GameObject||An object in the game.|
|Furnishing||An furnishing in the Saloon that must be pathed around, or destroyed.|
|AI||the AI functions for the Saloon game.|
|Bottle||A bottle thrown by a bartender at a Tile.|
|Player||A player in this game.|
|Cowboy||A person on the map that can move around and interact within the saloon.|
|Game||Use cowboys to have a good time and play some music on a Piano, while brawling with enemy Cowboys.|