Inspired by the BASIC 10Liner contest (see their english rules at the bottom): the first Haskell tiny games contest runs through February 2023! The prize.. glory!
Submit your entries now (as many as you like) to this repo (send a pull request, or push if you have access), or paste in the #haskell-game chat (Matrix or IRC) and we'll commit for you. sm and f-a are your judges, informed by #haskell-game.
Here are the general rules for this round:
-
Make a playable game in one haskell file of up to 10 lines of up to 80 characters each.
-
This can be a runghc, stack or cabal script, or a small haskell program, but not a multi-file project. Some templates are provided to give ideas. Our ideal is a self-contained 10 line program that just works, like BASIC programs.
-
Unlimited comments are permitted after line 11. The game's "category/name (author)" info should appear here, and any essential info like player controls, so the game is usable to someone seeing just this file, eg in chat.
-
Achieving programs that "just work" is a core principle and part of the challenge. The script or program must either
- be reliably runnable via shebang line (shebang lines are counted as code, but will impress the judges)
- or contain a reliable build/run command line with all needed options, in the comments
(the
play
script will use this).
Entries which aren't straightforward to run are incomplete. Some tips:
- env -S in the shebang line doesn't work on older GNU/Linux systems, but we allow it (see haskell-game#25).
- Avoid requiring problematic GHC versions. In particular GHC <9.2 doesn't work well on mac. If you specify a GHC version/stackage snapshot, the current release is ideal (GHC 9.2, lts-20).
-
The game should be portable, running on all major platforms, ideally.
-
A small square screenshot must be provided, ideally static and non-gif. (Not animated, because Github's player overlay will obscure it. Not a gif, because you can't make those clickable on Github it seems.)
-
A README file is optional but makes browsing your game more pleasant for website visitors. Feel free to include animations, or discussion of the game/code/your experience.
-
A less-minified version of the code, that we can learn from, is optional but welcome.
-
Contest entries will be collected in this repo. You can update them at any time; judges will consider a snapshot of the repo at 2023-02-28 11:59:59 UTC. You may want to watch the issue tracker to hear about anything concerning your entry, or general announcements.
-
You can submit any number of entries, in the following categories:
prelude-10-80
: No imports may be used. (template1)
base-10-80
: Imports from the base package may be used. (template1)
default-10-80
: Packages installed by default with GHC may be used.
Also a second file named Import.hs may be used to gather and re-export imports, only.
(template1)
hackage-10-80
: All packages on Hackage may be used, and an Import.hs file may be used. (template1)
Here are the entries received so far:
guess1 (sm) |
pure-doors (tristanC) |
fifteen (bradrn) |
chess (fizruk) |
sudoku (elderephemera) |
matchmaking (migmit) |
timing (TravisCardwell) |
shoot (migmit) |
log2048 (Lysxia) |
rhythm (elderephemera) |
peyton-says (gergoerdi) |
type-and-furious (lsmor) |
guess2 (sm) |
wordle (halogenandtoast) |
ski (sm) |
guesscolor (TravisCardwell) |
bulls-n-cows (akadude) |
hallway-to-hell (juliendehos) |
1234-hero (gelisam) |
crappy-flappy (gergoerdi) |
pong (gergoerdi) |
minesweeper (Greg8128) |
pong2 (sm) |
brickbreaker (fgaz) |
You will need a suitable version of GHC (9.2.5+ or 9.4.4+ recommended), and stack (or cabal).
See https://www.haskell.org/get-started/.
Once Haskell is installed, and if you have bash, you can run ./play
in this repo:
or:
If you don't have bash, cd into each game's directory and try running the game's .hs file. If that fails, look for run/build instructions in that file or a nearby readme.
Since haskell-game#14, we have a minifier that can turn your game into a brick of inscrutable code no more than 80 characters wide, provided that you add curled braces and semicolons over all your program, so that it becomes white space insensitive. @kindaro is the owner of the minifier, ping him with your reviews and suggestions.