3 ms·
Two small issues: - you have a separator that isn't commented out on line three. Just don't add these at all, it doesn't help anything. - your requires (eg "P
by krapp 4mo ago
Two small issues:
- you have a separator that isn't commented out on line three. Just don't add these at all, it doesn't help anything.
- your requires (eg "Projets.Space Conqueror.outils") should point to folders (Projets/Space Conquerer/outils.lua) but don't. Paths will be relative to wherever the Lua interpreter or executable is.
I made those two changes and it plays fine. You should really do a final check and make sure things run before committing.
Someone else suggested Love2D, which would be a great framework for Lua games, but you can also get LuaJIT and SDL (2 or 3, probably should use 3) to work without it, so you can use graphics, sound, etc. if you want. Using metatables is the right way to do it with Lua, not every language is a fit for every paradigm and I think it's better to work with a language than try to impose arbitrary patterns onto it.
Please don't "feed your code to an AI to make it more readable" in the future. You don't know if the AI will just introduce random bugs and it really doesn't matter. Learn by making your own code more readable, yourself, if that concerns you.
And don't worry about impostor syndrome. You actually finished a project, and you wrote it yourself. That puts you ahead of every vibe coder and most amateur game developers.