• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Install and play snake game on Linux Terminal

{{postValue.id}}

To Install and play snake game on Linux Terminal

Snake game is the most popular game, played on mobile devices. In this article we will show how to install and play snake game on Linux terminal.

To install Snake game

Go to the following link to download snake game,
http://sourceforge.net/projects/nsnake/
install-play-snake-game-Linux-terminal-download

install-play-snake-game-Linux-terminal-save

After downloading, Extract the package using the following command.

[root@linuxhelp ~]# cd Downloads/
[root@linuxhelp Downloads]# ls
nsnake-3.0.1.tar.gz
[root@linuxhelp Downloads]# tar -xzf nsnake-3.0.1.tar.gz
[root@linuxhelp Downloads]# ls
nsnake-3.0.1  nsnake-3.0.1.tar.gz
[root@linuxhelp Downloads]# cd nsnake-3.0.1/

This game requires the library packages c++ and ncurses. Run the following command to install it.

[root@linuxhelp nsnake-3.0.1]# yum install gcc-c++ ncurses-devel ncurses -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.webwerks.com
 * extras: centos.webwerks.com
 * updates: centos.webwerks.com
Package ncurses-5.9-13.20130511.el7.x86_64 already installed and latest version
Resolving Dependencies
-->  Running transaction check
--->  Package gcc-c++.x86_64 0:4.8.5-4.el7 will be installed
-->  Processing Dependency: libstdc++-devel = 4.8.5-4.el7 for package: gcc-c++-4.8.5-4.el7.x86_64
-->  Processing Dependency: libstdc++ = 4.8.5-4.el7 for package: gcc-c++-4.8.5-4.el7.x86_64
-->  Processing Dependency: gcc = 4.8.5-4.el7 for package: gcc-c++-4.8.5-4.el7.x86_64
.
.
.
Installed:
  gcc-c++.x86_64 0:4.8.5-4.el7                                  ncurses-devel.x86_64 0:5.9-13.20130511.el7                                 

Dependency Installed:
  cpp.x86_64 0:4.8.5-4.el7                     gcc.x86_64 0:4.8.5-4.el7                         glibc-devel.x86_64 0:2.17-106.el7_2.6     
  glibc-headers.x86_64 0:2.17-106.el7_2.6      kernel-headers.x86_64 0:3.10.0-327.22.2.el7      libmpc.x86_64 0:1.0.1-3.el7               
  libstdc++-devel.x86_64 0:4.8.5-4.el7        

Dependency Updated:
  glibc.x86_64 0:2.17-106.el7_2.6   glibc-common.x86_64 0:2.17-106.el7_2.6   libgcc.x86_64 0:4.8.5-4.el7   libgomp.x86_64 0:4.8.5-4.el7  
  libstdc++.x86_64 0:4.8.5-4.el7   

Complete!

Now install the snake game using the following command.

[root@linuxhelp nsnake-3.0.1]# make
# Compiling src/Flow/GameStateMainMenu.cpp...
# Compiling src/Flow/InputManager.cpp...
# Compiling src/Flow/StateManager.cpp...
# Compiling src/Flow/GameStateGame.cpp...
# Compiling src/main.cpp...
# Compiling src/Misc/Timer.cpp...
# Compiling src/Misc/Utils.cpp...
.
.
.
# Compiling src/Game/Player.cpp...
# Compiling src/Game/Game.cpp...
# Compiling src/Game/Board.cpp...
# Compiling src/Game/ScoreFile.cpp...
# Compiling deps/commander/commander.c...
# Linking...
# Build successful!

[root@linuxhelp nsnake-3.0.1]# make install
# Linking...
# Build successful!
# Installing...
# nsnake successfuly installed!

To launch Snake game

To Launch the game run nsnake command on your terminal.

[root@linuxhelp nsnake-3.0.1]# nsnake

install-play-snake-game-Linux-terminal-arcare-mode
To change the settings, click Game settings
install-play-snake-game-Linux-terminal-game-settings
install-play-snake-game-Linux-terminal-game-settings-configure
To know about the key Controls, click control option.
install-play-snake-game-Linux-terminal-key-Controls
Click Help for more info.
install-play-snake-game-Linux-terminal-help
To select levels, click Level Select.
install-play-snake-game-Linux-terminal-Level-Select
To add level, copy the default level from /usr/share/games/nsnake/levels/ to /root/.local/share/nsnake/levels/

[root@linuxhelp nsnake-3.0.1]# cp /usr/share/games/nsnake/levels/* /root/.local/share/nsnake/levels/

Now you can select the levels on the game menu.
install-play-snake-game-Linux-terminal-Level-Select-game-menu
Click Arcade mode, to play the game.
install-play-snake-game-Linux-terminal-Arcade-mode-play-game

install-play-snake-game-Linux-terminal-play
To pause the game press “ Enter”
install-play-snake-game-Linux-terminal-pause
install-play-snake-game-Linux-terminal-resume
install-play-snake-game-Linux-terminal-game-over

Tags:
daniel
Author: 

Comments ( 2 )

JJAbrams
How can i ping this website - https://epiccarry.com/wow/?
carollawrence
nice!
Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

Even after installing packages it is asking for dependency error?

A

Use this command to paly
Syntax; "groupinstall development tools"

Q

It is not getting launched in command line "nsnake"

A

whether while ruuning "make" it would have throw some error please check with the errors

Q

Is the "snake" game available in an epel repository?

A

No, it will not available you can add it to the repository.

Q

What is the keyboard button to move the snake slower?

A

Press "8" to move the snake slower.

Q

How to pause the snake game in Linux?

A

Press the "p" button to pause the game in Linux.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Sebastian ?
How to change non required to required field in SuiteCRM Custom/Default Modules

How to change not required to the required field in SuiteCRM Custom/Default Modules?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.