Skip to content

Rules for & examples of tiny haskell games

Notifications You must be signed in to change notification settings

lsmor/tiny-games-hs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Haskell Tiny Game Jam

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.

Rules

Here are the general rules for this round:

  1. Make a playable game in one haskell file of up to 10 lines of up to 80 characters each.

  2. 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.

  3. 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.

  4. 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).
  5. The game should be portable, running on all major platforms, ideally.

  6. 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.)

  7. 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.

  8. A less-minified version of the code, that we can learn from, is optional but welcome.

  9. 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.

  10. 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)

Games

Here are the entries received so far:

prelude-10-80


guess1

(sm)

pure-doors

(tristanC)

fifteen

(bradrn)

chess

(fizruk)

sudoku

(elderephemera)

matchmaking
(migmit)

base-10-80


timing

(TravisCardwell)

shoot

(migmit)

log2048

(Lysxia)

rhythm

(elderephemera)

peyton-says

(gergoerdi)

default-10-80


type-and-furious

(lsmor)

hackage-10-80


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)

Let's play!

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.

Development Tools

Minifier

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.

About

Rules for & examples of tiny haskell games

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 91.4%
  • Shell 8.4%
  • Makefile 0.2%