Java Zelda

cavalcadejewelSoftware and s/w Development

Nov 18, 2013 (3 years and 7 months ago)

60 views

Java Zelda

By: Phillip Garber

Executive Summary


Java Zelda is an attempt at making a
remake of the classic SNES game Legend
of Zelda


A Link to the Past.


The game will come with a map editor,
with a point and click interface.


The final product will contain a database of
files and maps that the program will use to
create the players environment.

System Selection



The reason for creating a Java
implementation of Zelda would be to add
the ability to customize features of game
play.


The user would be able to modify maps,
characters/enemies, items, and sounds.


By developing in java, I will not have to
create different distributions for different
platforms.

System Analysis


Zelda for the SNES
works well with tiled
images.


The map is scrollable,
due to the small
display size of the
screen.


The game is full of
simple puzzles, and
enemies to defeat.


System Design



The new system will keep the old style for
making maps, by creating an array of
images.



The player will interact with the game
through the keyboard, instead of a
gamepad.


System Design


The HUD has been
changed, to put the
weapon information on the
bottom.



A basic map, and its map
file’s contents.


01#01#01#01#01#01#01#01#01#01#01#01#01#01#

01#01#09#08#01#01#14#01#01#01#01#01#01#01#

01#01#05#53#01#01#01#01#01#01#14#01#01#01#

01#01#05#53#01#01#01#14#01#01#01#01#01#01#

01#01#05#53#01#01#01#01#01#01#01#01#01#01#

15#01#05#53#01#01#01#01#01#15#01#01#01#01#

01#01#05#53#01#01#01#01#01#01#01#01#14#01#

01#01#05#10#04#04#04#04#04#04#04#04#04#04#

01#01#06#03#03#03#03#03#03#03#03#03#03#03#

01#01#01#01#01#01#01#01#01#01#01#01#01#01#

01#14#01#01#01#01#01#01#01#01#01#01#01#01#

01#01#01#01#01#01#14#01#01#01#01#01#15#01#

01#01#01#01#01#01#01#01#01#01#01#01#01#01#



System Design

There are 11 files per map, which make
up all of its layers, and effects.



Activators


Blocker


Button


Enemy


Map


Overlay


Pickupable


Pits


Pushable


Warps


Music

Map


The basic background image that the player walks on.

Blockers


A blocker is a wall, or impassable object
for the player.

Pits


The player can fall in pits, and will be sent back to the
part of the map where they originated with lower
health.

Warps


Tiles that will warp the player to a new
map, or a different section of the same
map.

Activators


An activator can be used to display a
message, or unlock a door.



Pushable


Blocks that can be pushed around to solve
puzzles.

Buttons


A button is a tile that when stepped on, it unblocks
a set of blockers.


A button can either open permanently, or while it is
currently pressed.

Buttons
-

continued


A button can be also pressed by pushing a block on it.











There is an invisible button that can unblock something if it
detects all enemies in the room are clear.

Pickupable


Any item that the player can pick up.


Can be animated, and can be set to an
unpickupable state to be used as a
background animated tile.


Enemies


Enemies have several simple AI types,
and attack the player.

Overlay


A layer of PNG images that are drawn on
top of all of the layers semi
-
transparently.


Can be used for shadows, clouds, or
anything else that would cover areas of
the map.


The overlay layer can be animated.

Music


The music file contains the filename for
the music file that will be looped in the
background of the map.


Currently, only music files less than 1MB
are supported due to limitations in java’s
audio, and IO classes.

Operating System Principals


Multithreading
-

Many of the objects in the game
run on their own thread.


Multiprocessor Support
-

With elements of the
game being able to run on their own thread, the
program can be split up to take advantage of a
multi
-
core CPU.


Each of the threads are assigned a priority,
which allows the Operating System to manage
them if the CPU is currently being used by a lot
of other processes.

Operating System Principals


The IO in my program uses the built in
reader for images, and sun’s AudioPlayer
to play audio streams.


Everything is in a respective folder to its
type, and is easy to access.


This software system currently takes up
19.4MB, and has over 1,600 files.

Operating System Principals


The tree diagram of my program’s files.

Tiles/

Images/

Maps/

Save/

Sounds/

Map1/

SaveGame.save

Map1.act

Map1.blk

Map1.but

Map1.enm

Map1.map

Map1.mus

Map1.ovr

Map1.pik

Map1.pit

Map1.pus

Map1.wrp







01.GIF

arrowHit.wav

Significance of points related to embedded
operating system principals, policies,
techniques or architectures


The game must optimized to run on any
platform.


The game must have a high, and constant
frame rate.


The game must be modifiable.


The game must be easy to control, and
the editor must be easy to use.


The game must optimized to run
on any platform


The code is written in java, which can be
run on most all computers.


The game is multithreaded, so it can take
advantage of hyper
-
threading, or a multi
-
core CPU.


Even if a computer has a standard, non
-
hyper
-
threaded CPU, it still will run.

The game must have a high, and
constant frame rate


Because everything is threaded, with
priorities, the Operating System can
manage the threads if the CPU gets
overloaded.


The game’s rate is controlled by a
separate timing thread, which calls for a
new frame 66.67 times per second.

The game must be modifiable.


The game comes with a mapmaker.


All of its images, sounds and maps can be
edited.


The files can be edited on the fly, while the
game is running. The user just needs to
walk out of the map, and back in, to have
the changes take place.

The game must be easy to control,
and the editor must be easy to use.


The game uses WASD to move, E to
activate objects, and R to use a weapon.



The editor has an easy to use interface.



The file structure makes it easy to find
files, so they are not all in one giant folder.


Methodology and technology for the solutions
related to embedded operating System
Principles, policies, techniques, or architectures


Java has the Thread class, which can be extended by
a custom class to allow a program to run as a
separate thread.



With the performance benefits of multithreading on a
multi
-
processor system, the CPU load by my program
is usually within 0
-
2%.


The file structure of my program allows easy access to
maps, and files. This makes it easy to edit, and
transfer the maps to a friend.

Sources Used


"Hyper
-
threading."
Wikipedia, The Free Encyclopedia
. Wikimedia Foundation, Inc. 13
Nov 2007 <http://en.wikipedia.org/w/index.php?title=Hyper
-
threading&oldid=170417708>.



“Java 2 Platform Standard Edition 5.0: API Specification.” Sun Microsystems, Inc.
2004 http://java.sun.com/j2se/1.5.0/docs/api/



“Legend of Zelda Sound Effects.” Creator: “HelpTheWretched.” 2007
http://noproblo.dayjo.org/ZeldaSounds/



“Operating Systems: Internals and Design Principals” William Stallings. Pearson
Prentice Hall, Pearson Education Inc. Upper Saddle River, NJ. 2005.



“The Legend of Zelda: A Link to the Past” Shigeru Miyamoto, Nintendo. April 13,
1992. Super Nintendo Entertainment Center.



"Thread (computer science)." Wikipedia, The Free Encyclopedia. Wikimedia
Foundation, Inc. 2 Dec 2007
<http://en.wikipedia.org/w/index.php?title=Thread_%28computer_science%29&oldid=
174109853>.