Add 2015/mills1/try.sh + format/typo checks

The try.sh script runs the make command in the judges' remarks to make
it easier.

A warning is that if you have good eye-hand coordination and you're good
at games and you have too much time you might end up falling asleep
playing it as you'll probably never die. I only died because I was
trying to mark a reminder complete on the other side of the screen at
the same time as playing .. and I almost survived that .. and 'Cody's
also blind' as the joke goes in the family. That's probably why I ended
up dying. At that point I already had over 90 points.

Still the purpose is to make it easier to play if the default settings
are too frustrating. I contemplated playing with other settings but I
decided not to. An example where it might be improved is to let the user
pass in the environmental variables to override should they wish to but
it is not even clear to me how the variables should be sanitised so
that's an argument against it.
This commit is contained in:
Cody Boone Ferguson committed 2023-12-06 11:22:13 -08:00
1 parent af310e0b3a
commit 267cbdfef3
4 files changed
+66 -18

No files matched your search

+3 -3
View File
@@ -136,14 +136,14 @@ DA=100 # Acceleration due to gravity (scaled by 256).
# Smaller values make you glide slower.
DI=-200 # Impulse velocity of a flap (scaled by 256).
# Make larger if you want an less intense tapping experience!
# Make larger if you want a less intense tapping experience!
DB='"<o^="' # Sprite for player when gliding.
# HINT: Try using various emoji.
# HINT: Try using various emojis.
# NOTE: The string MUST be enclosed inside double quotes.
DF='"<ov="' # Sprite for player when flapping.
# HINT: Try using various emoji.
# HINT: Try using various emojis.
# NOTE: The string MUST be enclosed inside double quotes.
DG='"Tap to Flap!"' # Instruction text.
+32 -15
View File
@@ -24,13 +24,21 @@ Press the up arrow and the down arrow at the right time.
## Judges' remarks:
Did you find that mobile application game a bit frustrating?
Well you can adjust the makefile parameters to make life a
Well you can adjust the Makefile parameters to make life a
bit easier for you:
```sh
make clobber all DW=199999 DW=22 DH=16 DA=50 DI=-150
./try.sh
```
which runs:
```sh
make clobber all DW=199999 DW=22 DH=16 DA=50 DI=-150
./prog
```
From the Makefile:
```
@@ -53,14 +61,14 @@ DA=100 # Acceleration due to gravity (scaled by 256).
# Smaller values make you glide slower.
DI=-200 # Impulse velocity of a flap (scaled by 256).
# Make larger if you want an less intense tapping experience!
# Make larger if you want a less intense tapping experience!
DB='"<o^="' # Sprite for player when gliding.
# HINT: Try using various emoji.
# HINT: Try using various emojis.
# NOTE: The string MUST be enclosed inside double quotes.
DF='"<ov="' # Sprite for player when flapping.
# HINT: Try using various emoji.
# HINT: Try using various emojis.
# NOTE: The string MUST be enclosed inside double quotes.
DG='"Tap to Flap!"' # Instruction text.
@@ -68,6 +76,12 @@ DG='"Tap to Flap!"' # Instruction text.
# NOTE: The string MUST be enclosed inside double quotes.
```
WARNING: if you have good eye-hand coordination and too much time on your hands
you might fall asleep while playing as you probably will never die in this mode.
We only stopped when a reminder came through and we tried to mark it complete at
the same time as playing and we almost managed to survive that. At that point we
already scored over 90.
Enjoy!
TAP!! TAP!! TAP!!
@@ -92,6 +106,7 @@ You can even make the game more challenging -- resize the terminal window to
make the world taller or shorter. You'll never be able to get through the
pipes when they are four times as tall!
### Instructions
The instructions are printed at the start of the game: Tap to Flap!
@@ -99,6 +114,7 @@ The instructions are printed at the start of the game: Tap to Flap!
Hit any key to make your bird fly. Navigate her between the gaps in the pipes.
Your score is shown in the upper left, along with your current high-score.
### Customization options
To customize the gameplay, change any of the following options on the compile
@@ -115,18 +131,18 @@ command line:
* `-DI`: Impulse velocity of a flap (scaled by 256). Make this smaller
if you want an intense tapping experience!
* `-DB`: Sprite for player when gliding.
* `-DF`: Sprite for player when flapping.\
* `-DF`: Sprite for player when flapping.
* `-DG`: Instruction text. Change to your native tongue.
Feel free to try out physics or play field options to make the game more
interesting. Try setting the player sprites to change the game completely --
maybe you can be a fish, or a pig -- the options are limitless! Try using
emoji -- you can be a flying beer mug!
emojis -- you can be a flying beer mug!
Note that since the `curses` library on POSIX doesn't natively support wide
characters (needed for UTF-8 support, which is needed for emoji), you may need
to make some changes to the `Makefile` to get emoji to work on your system.
To help you get started, I've included some example substitutions for emoji
characters (needed for UTF-8 support, which is needed for emojis), you may need
to make some changes to the `Makefile` to get emojis to work on your system.
To help you get started, I've included some example substitutions for emojis
sprites and instruction text; for example, type
```sh
@@ -139,19 +155,20 @@ or
make EMOJI=globe
```
for some examples (the full list of options is in the `Makefile`). Don't
forget to `make clobber` first. If the output doesn't look right, you may need
to link with the "wide" version of `ncurses`. On MacOSX 10.11, it should work
with the current `-lcurses`; on Linux, you might need `-lncursesw`.
for some examples (the full list of options is in the `Makefile`). Don't forget
to `make clobber` first (or use `make -B`). If the output doesn't look right,
you may need to link with the "wide" version of `ncurses`. On MacOSX 10.11, it
should work with the current `-lcurses`; on Linux, you might need `-lncursesw`.
See the `Makefile` to make this change if you need to. Or buy a Mac.
You will also need a UTF-8 compatible terminal and an emoji font installed,
and you will need to have your `LANG` environment variable set to use UTF-8.
Again, if this is too complicated, maybe just go and get that Mac.
### Future additions
Future versions of the game will include monitization via the freemium model
Future versions of the game will include monetization via the freemium model
with micropayments for customization options, play-to-win and of course
live-streamed targeted video advertising.
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
#
# try.sh - demonstrate IOCCC winner 2015/mills1 - make it much easier
#
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
# this way allows us to have the user specify a different compiler in an easy
# way.
if [[ -z "$CC" ]]; then
CC="cc"
fi
# clear screen after compilation so that only the entry is shown
clear
make CC="${CC}" clobber all DW=199999 DW=22 DH=16 DA=50 DI=-150 || exit 1
read -r -n 1 -p "Press any key to play (send EOF to quit game): "
./prog
exit 0
+10
View File
@@ -3803,6 +3803,16 @@ simply typing `make back_to` or `make mullender`.
(Linux doesn't seem to but macOS does).
## [2015/mills1](2015/mills1/prog.c) ([README.md](2015/mills1/README.md))
[Cody](#cody) added the [try.sh](2015/mills1/try.sh) script which changes the
parameters to what we had in the judges' remarks to make it easier (he only died
when he tried to mark a reminder complete on the other side of the screen at the
same time and he almost survived that, scoring at that point over 90 - but this
also involves good eye-hand coordination and playing games like this in the
past).
## [2015/muth](2015/muth/prog.c) ([README.md](2015/muth/README.md))
[Cody](#cody) added the [try.sh](2015/muth/try.sh) script.