Search found 5 matches

by flinnburgess
Wed Apr 09, 2014 10:46 pm
Forum: Support and Development
Topic: How to store/extend the snake in a recreation of the classic
Replies: 7
Views: 4051

Re: How to store/extend the snake in a recreation of the cla

Brilliant, seems to have worked well for the most part. One bug I found which I think was that the food was spawning just outside of the screen. Think I fixed it by changing the code in main to for y=0, height/16 -1 do -- was y = 1, height/16 for x=0, width/16 - 1 do -- same as above table.insert(sn...
by flinnburgess
Wed Apr 09, 2014 9:33 am
Forum: Support and Development
Topic: How to store/extend the snake in a recreation of the classic
Replies: 7
Views: 4051

Re: How to store/extend the snake in a recreation of the cla

I've tried to implement what you suggested but Love doesn't seem very happy with it. I've included the file so you can have a look if you like, my main two problems at the moment are the one I just underlined which you can see if you uncomment the two lines in food.lua, and once you've gone off the ...
by flinnburgess
Mon Apr 07, 2014 10:19 am
Forum: Support and Development
Topic: How to store/extend the snake in a recreation of the classic
Replies: 7
Views: 4051

Re: How to store/extend the snake in a recreation of the cla

That worked fantastically, thanks! Ignorance on the way tables work on my part. Now i'm having an issue with food spawning on the snake which I can't seem to get rid of. I've tried to in the food-check function but it doesn't seem to be working and I'm not sure why not. Would it make more sense to h...
by flinnburgess
Mon Apr 07, 2014 12:37 am
Forum: Support and Development
Topic: How to store/extend the snake in a recreation of the classic
Replies: 7
Views: 4051

Re: How to store/extend the snake in a recreation of the cla

Hey guys, just a quick update. I've pretty much finished writing the code for the game to the point where it almost resembles the original snake. The main problem now is that the snake isn't growing when it picks up food. I've included the lua file so anyone can have a look at it, my guess would be ...
by flinnburgess
Sun Apr 06, 2014 9:24 pm
Forum: Support and Development
Topic: How to store/extend the snake in a recreation of the classic
Replies: 7
Views: 4051

How to store/extend the snake in a recreation of the classic

Hey guys, hope I'm posting this in the right place, I apologise in advance if this topic has come up before. I'm trying to recreate the classic game snake to get to grips with Love2D. So far I've got a single square moving around the grid at a desirable speed. I'm trying to implement the snake growt...