Page 1 of 2

Snake.Pi - Yet Another Snake Clone

Posted: Wed Sep 28, 2011 5:28 am
by DXT
Hi

I just finished (to some point) my first game and/or my first software since learning programming in general and lua spezifically. YEAH :awesome:

Originally, I just wanted to programm a fire-and-forget missle ai. Now I have a snake clone with 360° movement. Whatever.^^

I tried to make the code as small and uncomplicated as possible. Because of this, the game is reduced to the "core". It's pure lua and löve, with one lonely sound file. It's more like a demo of a future game with more features which will never come..

Feedback, code-wise and gameplay-wise, is highly appreciated.

And thanks to linux-man for his random lib.

My highscore is somewhat around 70 dots.

Re: Snake.Pi - Yet Another Snake Clone

Posted: Wed Sep 28, 2011 6:07 am
by tentus
That's quite cool. At first I thought the game mechanic was too easy, but I quickly found depth I didn't expect.

Have you considered maybe toning the colors down a bit? There's a great tutorial called How to make placeholder art suck less that you may want to read (no disrespect to the current visuals, they are quite effective).

Out of curiousity, why is almost every other line line main.lua blank? Personal preference?

Re: Snake.Pi - Yet Another Snake Clone

Posted: Wed Sep 28, 2011 9:08 am
by DXT
Interesting post about the placeholder stuff. Will utilize that in the future!

And i thought the code was better readable while late-night-coding by placing many empty lines. But you're right, I overdone it a bit (especially between single assignments..)

Re: Snake.Pi - Yet Another Snake Clone

Posted: Wed Sep 28, 2011 2:08 pm
by bartbes
Nice game mechanic. One thing that made the mouse control (it took a while before I figured that out) hard(er) was the wrapping, as the angle changes quite a bit when it wraps around.

Re: Snake.Pi - Yet Another Snake Clone

Posted: Wed Sep 28, 2011 4:43 pm
by kikito
I liked it. At the beginning I thought "This is too easy" but soon I started struggling. I like how the difficulty naturally increases simply by making the snake longer - it starts "wrapping around".

Re: Snake.Pi - Yet Another Snake Clone

Posted: Wed Sep 28, 2011 5:25 pm
by vrld
Fun game! But I would suggest two changes:

First, make the playing field bigger.
Second, either add obstacles, or don't wrap around the edges.

Oh, and I broke your highscore:
snake.pi.jpg
snake.pi.jpg (31.19 KiB) Viewed 8443 times

Re: Snake.Pi - Yet Another Snake Clone

Posted: Wed Sep 28, 2011 9:43 pm
by DXT
I'm wondering why the snake looks a bit weird on your screenshot.. I know such behaviour when running prime95 stress tests in the background while playing. Not mentioning some minor disruptions when a "lag-spike" occurs..

Anyway, obstacles would be totally the next thing to add. I even tought about making labyrinth-like levels which are larger than the screen and therefore need a camera which follows the snake around.

Re: Snake.Pi - Yet Another Snake Clone

Posted: Wed Sep 28, 2011 11:45 pm
by Lexsym
I died and then it crashed. :(

Re: Snake.Pi - Yet Another Snake Clone

Posted: Thu Sep 29, 2011 4:42 am
by pancakepalace
I'm working on a similar project in Javascript.

I wanted to show you how my snake wrapping works, so I made a demo with only the snake at a very slow speed so it's easy to inspect the transitions. Notice how each part of the snake doesn't suddenly get warped to the other side when it reaches the wall, it goes through pixel by pixel making the wrapping very smooth. If you make the snake go on the edge and follow the wall, you can make it be half on one side and half on the other.

I thought this idea might interest you.

http://www.kingaaraya.com/projects/DiamondBack/

Use the left and right arrow keys to control the snake.

Re: Snake.Pi - Yet Another Snake Clone

Posted: Fri Sep 30, 2011 3:09 am
by Lexsym
Image