-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdesign.txt
51 lines (41 loc) · 2.38 KB
/
design.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
TITLE
The Legend of Giselda
AUTHOR
Lukens Orthwein
ABSTRACT
A barebones remake of The Legend of Zelda series games made to be easily
expandable and highly portable.
WHAT
This is an ASCII tribute to the original Legend of Zelda games. It focuses on
recreating the feel of these games but being both original and incredibly
barebones in terms of the tools used. It is meant to run in the terminal
window, only use terminal beeps for the sound effects and music, and only
feature characters created with simple ASCII letters and symbols. It includes
only one dungeon, but holds the framework and engine to be easily expanded into
a much longer and more full gaming experience. The purpose in mind in creating
this game was to create something that anyone, specifically any cs student,
could easily compile and run in the terminal, or perhaps on any operating system
so long as it the right compiler could be found. It was designed with maxmumum
portability in mind and only contains a single file with all of its code along
with a series of text files storing the data for each area that needs to be kept
in the same directory.
HOW
The two key libraries used are ncurses for the visual layout and instant key
input features and pthread (POSIX Threads) to allow for multithreading. The
program uses a thread to dictate character movement and action, a thread to
dictate enemy movement, and a thread to play the background music. Each of
these acts independantly but they all affect the two key files stdscr, the
structure in curses that stores screen data, and undergrid[50][80] that acts as
a grid to store game data. Both of these grids will be constantly changing
based upon any movement or attacking that occurs in the game.
Enemies are stored as numbers on the undergrid, and each has a unique number
generated by an incrementing counter that assigns the number each time they
are initially drawn.
The character is denoted by a 'c' and the walls of the level by 'w's.
The areas will be designed using text files that are 80x50 grids of letters
filled with either spaces, denoting open space, 'w's denoting walls, or 'e'
denoting an enemy spawn point.
Characters and enemies are animated by simply drawing and deleting characters
on stdscr based on their dimensions and arrays storing how they look.
The music makes terminal beeps on specified i values in a 16-part for loop that
increments every 8th of a second.