IOCCC image by Matt Zucker

The International Obfuscated C Code Contest

2025/jhshrvdp - Most likely to teleport

J_S_R_ogue game

Authors:

Award: Most likely to teleport

To build:

    make all

To use:

    # A - move left
    # D - move right
    # W - move up
    # S - move down
    #
    # T - teleport if score>=3. Lowers score with 3
    # Q - quit

    ./prog

Try:

    ./try.sh

Judges’ remarks:

Up, down, left, and right: stay away from your those moving carrots (“^”), grab the cash (“$”), use the stairs (“>” “<”), and teleport if you must! You are in a maze of C code, for which if you are code spelunker, you will find an impressive maze of logic!

A fun challenge

Create an alternative form of prog.c (i.e., prog.alt.c) that has a “Amulet of Yendor”.

In particular, add an “Amulet of Yendor” (similar to the “,” comma character in the rogue 5.4 game) to floor 26. If the player descends below floor 26 without the amulet, place it on that lower floor until the player eventually acquires it. Block the player’s ascent (to a lower floor number) unless they possess the amulet. If the player returns to the top floor 0 with the amulet, display a winning message, and exit.

The above fun challenge is still open. See the “Fun challenge Info” section for details.

Author’s remarks:

What does the entry do.

It is a rogue-like game with a finite amount of procedurally generated levels that you play in the terminal. You are the ‘@’ symbol. Enemies are ‘^’. Score points are ‘$’. Walls are ‘#’. You travel up/down floors with ‘>’/‘<’. Enemies will chase you and they deal contact damage. Health regenerates back over time.

Controls

    A: move left
    D: move right
    W: move up
    S: move down

    T: teleport if score>=3. Lowers score with 3.
    Q: quit

You can load specific game states by passing the information inbetween {} after argv in the game hud as the program’s first argument:

    ./prog 'game state data'

How to entice it to do what it is supposed to do.

Just run it without arguments. If you want to load a ‘save file’, pass it as the first argument. You can whisper sweet words to it if you want, it might like that. You need to have ncurses installed.

What obfuscations are used.

What are the limitations of your entry in respect of portability and/or input data.

Inventory for 2025/jhshrvdp

Primary files

Secondary files


 Jump to: top