Snake.Pi - Yet Another Snake Clone

Show off your games, demos and other (playable) creations.
DXT
Prole
Posts: 7
Joined: Tue Sep 20, 2011 3:41 am
Location: Germany

Snake.Pi - Yet Another Snake Clone

Post 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.
Attachments
snakePI.love
(25.33 KiB) Downloaded 600 times
User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: Snake.Pi - Yet Another Snake Clone

Post 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?
Kurosuke needs beta testers
DXT
Prole
Posts: 7
Joined: Tue Sep 20, 2011 3:41 am
Location: Germany

Re: Snake.Pi - Yet Another Snake Clone

Post 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..)
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Snake.Pi - Yet Another Snake Clone

Post 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.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Snake.Pi - Yet Another Snake Clone

Post 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".
When I write def I mean function.
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: Snake.Pi - Yet Another Snake Clone

Post 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 8958 times
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
DXT
Prole
Posts: 7
Joined: Tue Sep 20, 2011 3:41 am
Location: Germany

Re: Snake.Pi - Yet Another Snake Clone

Post 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.
Lexsym
Prole
Posts: 15
Joined: Wed Sep 07, 2011 1:23 am

Re: Snake.Pi - Yet Another Snake Clone

Post by Lexsym »

I died and then it crashed. :(
pancakepalace
Prole
Posts: 40
Joined: Wed Aug 03, 2011 3:13 pm

Re: Snake.Pi - Yet Another Snake Clone

Post 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.
Lexsym
Prole
Posts: 15
Joined: Wed Sep 07, 2011 1:23 am

Re: Snake.Pi - Yet Another Snake Clone

Post by Lexsym »

Image
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot] and 2 guests