3 ms·
That's fascinating. Congratulations to Tyler for not only sharing this story but also sharing this as a project on GitHub. It's quite a bit of code and a nice p
by facorreia 14y ago
That's fascinating. Congratulations to Tyler for not only sharing this story but also sharing this as a project on GitHub. It's quite a bit of code and a nice peek into the world of Lua game programming for me, since I've had very little contact with this language.
- tylerneylon 14y agoThank you! Lua is great fun - very similar to javascript. The only weird part for me is that it's 1-indexed, but I see that as a feature for kids learning to program for the first time. Also, the code for PacPac is not very clean. Just like javascript, globals in Lua are the default, easy to use, and require discipline to avoid :)
- elisee 14y agoYou might want to look into strict.lua for avoiding unwanted globals: http://metalua.luaforge.net/src/lib/strict.lua.html http://metalua.luaforge.net/src/lib/strict.lua.html It's a little script that you can add to your Lua project and will check for usage of globals in functions without prior assignation in the global scope. Quite nifty.