All Projects → taniarascia → Snek

taniarascia / Snek

Licence: mit
🐍 ‎ A terminal-based Snake implementation written in JavaScript.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Snek

Snake
🐍🎮 Snake game made with Expo & PIXI.js 👾 iOS, Android, and Web
Stars: ✭ 67 (-68.1%)
Mutual labels:  game, snake
Snake Go
Snake game made in Go! 🐍
Stars: ✭ 292 (+39.05%)
Mutual labels:  game, snake
Snake
Artificial intelligence for the Snake game.
Stars: ✭ 1,241 (+490.95%)
Mutual labels:  game, snake
Tastysnake
A two-player (Bluetooth) game on Android.
Stars: ✭ 61 (-70.95%)
Mutual labels:  game, snake
Dotnet Console Games
Game examples implemented in .NET console applications primarily for educational purposes.
Stars: ✭ 157 (-25.24%)
Mutual labels:  game, snake
Pokemon data
全ポケモンのJSONデータです。
Stars: ✭ 201 (-4.29%)
Mutual labels:  game
Vcmi
Open-source engine for Heroes of Might and Magic III
Stars: ✭ 2,514 (+1097.14%)
Mutual labels:  game
Dustracing2d
Dust Racing 2D is a traditional top-down car racing game including a level editor.
Stars: ✭ 199 (-5.24%)
Mutual labels:  game
Chunkstories
Somewhat fancy blocky game engine written in Kotlin
Stars: ✭ 199 (-5.24%)
Mutual labels:  game
Corsixth
Open source clone of Theme Hospital
Stars: ✭ 2,481 (+1081.43%)
Mutual labels:  game
Sandspiel
Creative cellular automata browser game
Stars: ✭ 2,476 (+1079.05%)
Mutual labels:  game
Game Of Life
A browser extension to play Conway's Game of Life on GitHub contribution board
Stars: ✭ 202 (-3.81%)
Mutual labels:  game
Renpy
The Ren'Py Visual Novel Engine
Stars: ✭ 2,734 (+1201.9%)
Mutual labels:  game
One Html Page Challenge
Can you create something cool without modern tools?
Stars: ✭ 205 (-2.38%)
Mutual labels:  game
Aimandshoot
A neuroevolution game experiment.
Stars: ✭ 201 (-4.29%)
Mutual labels:  game
Csharpgameframework
基于unity3d引擎与c#语言的游戏框架/架构(包括客户端与服务器)。使用ServerPlatform作为服务端通信基础设施。
Stars: ✭ 208 (-0.95%)
Mutual labels:  game
Bounceback
Boomerang Zelda Homage for JS13k
Stars: ✭ 200 (-4.76%)
Mutual labels:  game
Asm Space Invaders
A small, bootable game written in x86 Assembly inspired by Space Invaders
Stars: ✭ 202 (-3.81%)
Mutual labels:  game
Civitas
Civitas is an empire-building game written in Javascript with the help of the jQuery library.
Stars: ✭ 207 (-1.43%)
Mutual labels:  game
Tic Tac Toe Minimax
Minimax is a AI algorithm.
Stars: ✭ 201 (-4.29%)
Mutual labels:  game

🐍 Snek.js

License: MIT snekjs on NPM

Run on Repl.it

A terminal-based Snake implementation written in JavaScript (Node.js).

Read the tutorial

snek.gif

Instructions

Use the arrow keys (, , , ) or W A S D to navigate the snake up, down, left, or right. Eat the red dot to gain points. If the snake collides with the wall or its own tail, it's game over. Press ENTER to restart, and Q, ESCAPE or CTRL + C to quit the game.

Installation

Run without installing

The easiest way to play the game is to just run it in the terminal without installing anything!

npx taniarascia/snek

Clone from repository

git clone https://github.com/taniarascia/snek
cd snek

# install and run via npm or yarn
npm i && npm run play

npm module

Add the snekjs module.

npm i snekjs

Create the game.

// index.js
const { UserInterface, Game } = require('snekjs')
const game = new Game(new UserInterface())

// Begin game
game.start()

Run the game.

node index.js

Acknowledgements

  • Vanya Sergeev for pointing out my snake collision bug, for advising me to make a single, reusable draw method, for showing me how to properly bind methods between classes, and for overall guidance and inspiration.
  • Devin McIntyre for general advice.
  • Panayiotis Nicolaou's JavaScript Snake for Web for initial logic.

Author

License

This project is open source and available under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].