GitXplorerGitXplorer
s

snake

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
c23969721588e0ddee9e54a339c93026f9406698

Disable length param for performance reasons

ssoriat committed 7 years ago
Unverified
97053d4dd2f0ca6f636ab6bdfc7f0bee16fe804d

Add length url param

ssoriat committed 7 years ago
Unverified
f2c42c346973f580340b5367d3ea6a5a7d5b0f22

Fix off by one error

ssoriat committed 7 years ago
Unverified
573d7a51af69e8480eaa4075b5f880b0bfaa00e6

Remove click action

ssoriat committed 7 years ago
Unverified
6bd2ddcde6ba1f66ff4741e3d5120f5ed7f42fcd

Make snake loop screen on settings

ssoriat committed 7 years ago
Unverified
57e78af3c64856fae1bf02c01092a7f19c24e7ac

Combine pause and settings menus

ssoriat committed 7 years ago

README

The README file for this repository.

Henry Clay, The Friendly Snake

JavaScript Snake built on the P5 Javascript Framework.

By: Thomas Soria

License: MIT

Website: Todo: Link once hosted...

In its current state, the game is very basic. My focus was just to make the game incredibly customizable and aesthetically pleasing. I wanted these customizations to be saved in the URI so you could share your preferred settings and for these settings to be changable while the game was running.

Todos

This project is in a pretty good state but there are many improvements that can be made. In order of importance:

Abstract / Cleanup

The code isn't pretty. There are a lot of magic numbers, public variables, and the structure for the project is all over the place. Having a clear distinction between "game engine" and "game logic" would be really nice.

Optimize

This game lags a fair bit on older devices when the snake reaches a certain length. This might just be a limit of the P5 engine and the sheer number of draw calls being made, but I'm fairly certain something can be done to improve it. If nothing else, a performance mode can be added that doesn't do any of the fancy color shenanigans.

Score / Leaderboard

Probably just a local cookie initially.

Mobile

Add mobile controls.

URI History

Refreshing the page should preserve updated settings. Also, add logic to ignore keypresses if Cmd/Ctrl is held down.

Different edibles

Currently only 'green' is implemented. Adding powerups should be fairly straightforward.