Giter Club home page Giter Club logo

nbsdgames's Introduction

New BSD Games

You have a computing machine from 1980's and you wonder how you can use it?
You are a bored sysadmin with no work, and need to kill time looking busy with terminal?
You have Plan9 dual-booted with OpenBSD and have kept the OpenBSD just for gaming?
You have to make a Reversi AI for your homework and you don't know where to copy it from?
Your port of Linux to a fancy platform has no GUI, but you still want nice screenshots?
You have been so excited about the bsdgames, but have grown tired of playing tetris, snake and robots for billions of times?
Are you feeling that betrayed you by bundling stuff like phantasia in a package you expected to contain GAMES?
Did you come here thinking it is bsdgames?

Don't worry anymore as you've got nbsdgames now!

The games include:

  • Jewels (A game with a gameplay kinda similiar to that of Tetris, NOT my invention)
  • Sudoku
  • Mines (Minesweeper)
  • Reversi
  • Checkers
  • Battleship
  • SOS
  • Rabbithole (A maze-exploring game where you have to gather items from all around the maze rather than reaching an end, the idea maybe mine)
  • Pipes (Same as the famous Pipe Mania)
  • Fifteen
  • Memoblocks (or Memory blocks. A similar game was included in Windows 7)
  • Fisher
  • Muncher
  • Miketron
  • Redsquare (Conway's Game of Life made playable!)
  • Darrt (with original gameplay!)
  • Snakeduel
  • Tugow (Numpad practice game)

The difficulty and/or dimensions are adjustable through simple command line options, you can play a minesweeper game that take hours to complete, or exprience hexadecimal sudoku and 8x8 fifteen-like puzzles!

Or just enter "nbsdgames" at your terminal to get a fancy menu and play all sorts of games from there.

Play on xterm for best experience.

Prerequisites

  • git (optional)
  • POSIX make (optional)
  • A C compiler with C99 enabled
  • The standard library
  • ncurses (libncurses5-dev if you are on debian-based distros)

To install them all on debian-base :

        sudo apt install git make gcc libncurses5-dev

How to run

  1. Download the files
  2. Go to the sources directory
  3. Install

Like this:

        git clone https://github.com/abakh/nbsdgames
        cd ./nbsdgames
        make
        sudo make install # or use the binaries already compiled

Packages

It's on almost every repo by now: Debian (and other DEBs), OpenSUSE (and other RPMs), AUR, Alpine, FreeBSD, NetBSD, DragonflyBSD, Minix, Homebrew (MacOSX) and more https://repology.org/project/nbsdgames/versions

Thanks to Elias Riedel Gårding, Zinjanthropus, Gürkan Myczko, Robert Clausecker, Sam James, and so many other nice people for packaging.

They also gave back code and useful feedback.

Other Platforms

They are known to work on Windows as well (using PDCurses, thanks to Laura Michaels for providing advice).

They have been ported to Plan9 thanks to Jens Staal!

Thanks to PDCurses they even work on DOS and every platform with SDL.

They should theoretically work on OS/2 as well but I have not verified that yet.

Dependencies

  • git (optional)
  • POSIX make (optional)
  • A C compiler with C99 enabled
  • The standard library
  • ncurses (libncurses5-dev if you are on debian-based distros)

To install them all on debian-base :

        sudo apt install git make gcc libncurses5-dev

How to build

  1. Download the files
  2. Go to the sources directory
  3. Install

Like this:

        git clone https://github.com/abakh/nbsdgames
        cd ./nbsdgames
        make
        sudo make install # or use the binaries already compiled

How do these look like

Linux+xterm+tmux Screenshot from 4 games in tmux

Plan9 Screenshot from the games in Plan9

Windows Screenshot from the games in Windows 7

How to contribute

  • Share these with your friends and others
  • Your stars make the repo more findable in Github ⭐
  • Tell me your feature requests, bug reports, etc.
  • Tell me the games you want to be added (but in the same genre, I can't port Angry Birds to curses! :)
  • Make a package for your distro (or put it on repos if the package is not there)
  • Tell distro developers to consider adding these as default games, nbsdgames packs a lot of fun games in a few hundreds of kilobytes.
  • Compile these with ASAN, play and find C-ish bugs.

Also thanks to all the people who helped in the previous versions, all what I requested was done! I didn't expect such an amount of assistance on this project ❤️

nbsdgames's People

Contributors

abakh avatar alexmyczko avatar andreasstieger avatar dokutan avatar eliasrg avatar philrandom avatar staalmannen avatar thesamesam avatar twistdroach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nbsdgames's Issues

Man Pages

Man Pages for the games would be kinda nice to have.

[Documentation] On which platforms do nbsdgames run?

Hey there - could some entry be added to the main readme to state on
which platforms it works? Evidently on Linux (I am git cloning it right
now) but I wonder if it works on OSX or windows too. With mingw I
was able to compile quite a bit, though I only rarely use windows so
far.

Doesn't compile with --std=c99

The package currently fails to build on PPC64 FreeBSD 13.0. The reason for this failure is that the PPC64 version of FreeBSD still uses a fairly old gcc version that defaults to C89, so there are a bunch of errors. Switching to C99 makes some of these go away but exposes new problems: your code apparently redefines a byte type a bunch of times:

jewels.c:27:21: warning: redefinition of typedef 'byte' is a C11 feature [-Wtypedef-redefinition]
typedef signed char byte;
                    ^
./common.h:17:21: note: previous definition is here
typedef signed char byte;
                    ^
1 warning generated.

(while this is a warning with the version of clang I tested, I believe it is an error on the old gcc).

Please fix the code by removing all duplicate definitions of byte. There should only be one such definition in common.h. Then make a new release so I can package the fix. You can check if you fixed it correctly by temporarily adding --std=c99 to CFLAGS.

How do package maintainers find out about new versions?

Hi @carlocab, it seems it was you who updated the homebrew nbsdgames bottle for version 4.1.2, thank you for that.

I was wondering how did packaging people find about version 4.1.2 without me announcing it anywhere other than in the releases page?
Also how they didn't find about the new version? Perhaps either I or Github changed a thing.

debian packaging

Hi @alexmyczko
Lubuntu people say that the nbsdgames icon doesn't show for them in the menu, also the nbsdgames command isn't there for them.
Also there is probably no reason for /usr/games/ , /usr/bin/ probably works in more places.

Thanks.

Sudoku doesn't guarantee unique solution

Turns out it matters.
However a fast enough algorithm that adjusts for difficulty and works with all the sizes isn't trivial to write.

A solution is to simply remove Sudoku, since there are a lot of Sudoku games for terminal already. But they don't look this nice.

Help or guidance on that matter is appreciated.

Setting up the donation for this project

Hi @eliasrg
Thank you very much for your help to the project so far.
Would you do this very very simple, very easy act of help that would have a huge impact on me?

That's just making a patreon page for nbsdgames (that is a site where people could donate by subscription, ask for features etc.) and simply just keeping the money until some years later when I could take it. Simply just that. Just a few clicks.

I may sound desperate, since I have asked multiple people through the years and everyone runs away upon hearing the word "money". I can't do that myself, just because of Patreon TOS, but it is otherwise perfectly legal in EU, and people with similar setups have had 0 problems. a real example running for years:
https://www.patreon.com/jadijadi

I would be super-hyper very thankful.
I hope you get the importance it has for me, my pay is below $1/h and I have problems. 169 people have starred this repo, and if they pay just half a dollar a month on average, most of my current problems would be solved, and I could spend much more time on open-source. not only this project, but also many practical ideas I have and currently don't have time for.

Compilation error from AUR

Made an account to say I'm getting the following error:

cp: target '//usr/games' is not a directory
make: *** [Makefile:60: nbinstall] Error 1
==> ERROR: A failure occurred in package().
Aborting...

I don't know enough about code to say how to fix it, but would appreciate if someone could tell me what's going on.

Thanks

feedback

Hi. I'm big fan of ascii games. First, I just want to say thank you. Second, you are my hero! :-) Please keep working on this awesome games compilation.

Tell me the games you want to be added

Frogger. I searched GOOD implementation of this game and not found. What is mean GOOD? Like original with bonuses, time and score. Please see gameplay video - https://www.youtube.com/watch?v=WNrz9_Fe-Us


Another stupid question. Why so strange license? Maybe use standard free licenses like MIT, GPL, BSD.

circlejump.c

What is the file "circlejump.c" for? I don't see a game with that name. I tried compiling it but got errors in the terminal.

Cribbage

Would it be possible to add cribbage (like in the old bsdgames)?
Thanks.

Add manuals

Some games are not known to everyone. It would be nice to see the rules somehow.

`make nb` creates `nbnbsdgames`

make nb adds the prefix nb in front of each binary, including nbsdgames itself, which becomes nbnbsdgames. I am 80% sure this isn't intended, but in case it is, feel free to close this issue.

Does not build on macos (10.12)

make
cc sudoku.c -lncurses -lm -o ./sudoku
sudoku.c:22:6: error: redefinition of 'wait' as different kind of symbol
byte wait=0, waitcycles=0;
^
/usr/include/sys/wait.h:248:7: note: previous definition is here
pid_t wait(int ) __DARWIN_ALIAS_C(wait);
^
sudoku.c:139:17: error: invalid operands to binary expression ('pid_t (
)(int )' (aka 'int ()(int )') and 'int')
wait=(wait+1)%60;
~~~~~~~~^~~
sudoku.c:140:8: warning: address of function 'wait' will always evaluate to 'true' [-Wpointer-bool-conversion]
if(!wait && waitcycles<3)
~^~~~
sudoku.c:140:8: note: prefix with the address-of operator to silence this warning
if(!wait && waitcycles<3)
^
&
sudoku.c:150:18: warning: ordered comparison between pointer and integer ('int' and 'pid_t (
)(int )' (aka 'int ()(int *)'))
for(byte b=0;b<wait;b+=10)
~^~~~~
2 warnings and 2 errors generated.
make: *** [sudoku] Error 1

Errors in Makefile conditionals

When trying to build the package on Arch Linux, I got an error:

Makefile:2: *** invalid syntax in conditional.  Stop.

On line 2 in Makefile there is the line ifndef $(CFLAGS). I think this should be ifndef CFLAGS. As explained in the make manual, ifdef and ifndef take a variable name, not a reference. In this case, if CFLAGS is empty, the line would expand to just ifndef , a syntax error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.