I've updated bot utils to a more or less stable state. Now I want to release them for you to test and use.
Ok, seriously. To speak frankly, as this kinda first official release, so there are probably bugs and you might not be able to run them. Let me know about such issues, so I can fix them.
Kudos to @sleepy for fixing some issues, filing bugs in the repos and thus inspiring me to continue these projects.
botc - bot script compiler
This project is a continuation of @CrimsonDusks botc compiler. Some bugs are fixed, some features are added, namely:
- unused return values should not lead to stack overflows in Zandronum
- variable limits should be fixed now, so variables defined in one state should not count to limits for variables in another state
- added support for arrayset function
- switch-case blocks now support negative numbers
- fixed some crashes
- it should be easier to build botc compiler from sources yourself, at least if you use Windows or Ubuntu and CLang/LLVM
- boolean as a real type different from ints - if-block conditions will have to be truly boolean like in Java
- support contants in switch-case
- support else if
- define variables without '$'
- support return
- add some examples
Code: Select all
botc script.botc BOTLUMP
(You might need to install Microsoft VC++ runtime files (on Windows) or libc++-9 and libc++abi-9 (on Ubuntu))
Currently the best way to get some examples is to decompile lumps (with debotc) from Zandronum pk3 file.
Some what obsolete examples: CRASHBOT, HUMANBOT
Spoiler: debotc - bot bytecode decompiler (Open)