Skip to content

Commit

Permalink
Version 0.3a2 - Improved readme.txt, more sample replay-files, a bit …
Browse files Browse the repository at this point in the history
…less outdated comments
  • Loading branch information
migf1 committed Jul 9, 2014
1 parent b431ad4 commit 53ef2b9
Show file tree
Hide file tree
Showing 18 changed files with 1,029 additions and 46 deletions.
80 changes: 74 additions & 6 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
==========================================================================
2048 Console Clone v0.3a1 (c) 2014 migf1
2048 Console Clone v0.3a2 (c) 2014 migf1
==========================================================================

Author: migf1 <mig_f1@hotmail.com>
Version: 0.3a1
Date: July 7, 2014
Version: 0.3a2
Date: July 9, 2014
License: Free Software (see the Licence section for limitations)

A console clone of the game 2048 ( http://gabrielecirulli.github.io/2048/ )
written in ISO C99. It is meant to be cross-platform across Windows, Unix,
Linux, and MacOSX (for the latter 3, you should enable ANSI-colors support
on your terminal emulation).
on your terminal emulation program).

Compared to the original game, this version additionally supports:
- skins (color themes)
Expand Down Expand Up @@ -42,10 +42,10 @@ To compile with gcc follow these simple steps:
1. Extract the zip file anywhere you want in your hard-drive
2. From the command-line, navigate into the src/ folder
3. On Windows (e.g. with mingw-gcc) type:
gcc -std=c99 -s -O3 -D_BSD_SOURCE.c -o 2048cc.exe
gcc -std=c99 -s -O3 -D_BSD_SOURCE *.c -o 2048cc.exe

On Unix/Linux/MacOSX other platforms, type:
gcc -std=c99 -s -O3 -D_BSD_SOURCE.c -o 2048cc.out
gcc -std=c99 -s -O3 -D_BSD_SOURCE *.c -o 2048cc.out

4. See the next section on how to run the executable file.

Expand All @@ -72,6 +72,74 @@ folder, otherwise you will not be able to load/save replays.
Run the executable, enjoy the game and please report any bugs you may find.


Gameplay
--------

There are actually 2 modes: normal and replay-mode.

Normal-mode

This is the default mode, the one used for playing the game. Use the arrow-keys
on your keyboard to make a move on the board. Use any key displayed with a
right parenthesis after its name in the Main Menu, to issue the corresponding
menu-command. For example, the menu-command: S)kin is issued by hitting the S
key on your keyboard (this particular command cycles through the available color
skins of the game).

Undo/Redo

You may undo one or more moves at any given time, but the penalty will be that
best-score tracking gets disabled. Redoing undone moves will NOT re-establish
best-score tracking. The moves-counter on the lower part of the screen displays
the count of the current move. In case one or more Undo has been done, the
counter also displays the count of available moves to be redone.

Replay-mode

This mode is entered by issuing the Rep)lay command, in the Main Menu. Once
inside the replay-mode, a new set of commands is displayed on the lower part
of the screen. They are used for navigating inside the current replay, for
saving/loading replay files, and for returning back to the main menu.

When entering the replay-mode (or when loading a replay-file) the replay is
automatically re-winded to the very 1st move. Then you can either navigate
manually, or let it play automatically (in that case you will NOT be able to
stop the auto-play... you'll have to wait until it is finished).

Replays do NOT take into account any Undone moves! That is, the last move in
a replay is the one corresponding to your last Undo. However, they do display
any available moves to be Redone (when exiting the replay-mode).

Exiting the replay-mode, sets the game to the last recorded move of the replay,
without counting any Undone moves (but, if any, their count will be displayed
and you may Redo them if you want to... best-score tracking will be disabled of
course).

Load/Save Replay Files

The replay-mode may also be used for saving unfinished games, and load them at
a later time to finish them. That's because when loading a replay-file, it
overwrites completely the current state of the game.

In order to be able to save and load replay-files, the executable program MUST
be in the same path with the folder "replays/". This is hard-coded into the game
and most probably it will stay that way until I or someone else implements
either a proper GUI, or a a more advanced text-user-interface (using ncurses for
example).

With its current primitive text-user-interface, the game doesn't even allow the
user to specify a name when saving a replay-file. Instead, a pre-defined name
is generated automatically, using a timestamp from the system clock.

It is of the form: "Day_Month_DD_HHMMSS_Year.sav" and it is automatically saved
in the "replays/" folder. Before loading a replay-file, the contents of the
"replays/" folder are listed, and the user has to type-in the name of the file
he wishes to load (but WITHOUT typing the "replays/" folder).

To make your life easier, consider renaming manually any replay-files you have
saved, before attempting to load them from within the game.


License
-------

Expand Down

0 comments on commit 53ef2b9

Please sign in to comment.