Better Snake [1.0]
Posted: Tue Jan 23, 2018 12:20 am
BetterSnake is my spin on the game snake. I started with Lua and Love2D today, and looked up a snake tutorial. From there I just modified the game and gave it more features. You can look at the code for this if you want, it's not very advanced. The reason I am posting here is to ask: Are there any really informative tutorials on Love2D? I have previously coded in Java and I want to learn Lua as it seems to be a lot easier and just as fun.
https://github.com/AngusWP/bettersnake
Another thing I want to ask - when I tried to run main.lua inside a package, it wouldn't run. I am used to packages through Java but what is the normal way to structure Lua code, and if there is no package system is there a better way to keep everything organized and not just in one huge class?
Another thing, I wanted to add a game icon but I can't convert my image into image data, does anyone know how to make this work?
Thanks for reading my post! If you would recommend any game projects that don't take too much work but will teach me more about Lua, just let me know. I want to learn!
https://github.com/AngusWP/bettersnake
Another thing I want to ask - when I tried to run main.lua inside a package, it wouldn't run. I am used to packages through Java but what is the normal way to structure Lua code, and if there is no package system is there a better way to keep everything organized and not just in one huge class?
Another thing, I wanted to add a game icon but I can't convert my image into image data, does anyone know how to make this work?
Code: Select all
icon = love.graphics.newImage("images/snake_icon.png");
love.window.setIcon(icon:getData());