No description, website, or topics provided.
Logos C#
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Assets
Common
ENU
NEU
Properties
Sharp
classes
shaders
.gitignore
App.xaml
App.xaml.cs
CommonDX.dll
Console.xaml
Console.xaml.cs
DataTypes.cs
MainPage.xaml
MainPage.xaml.cs
Package.StoreAssociation.xml
Package.appxmanifest
README.md
TheAmazingFishy.GDFMakerProject
TheAmazingFishy.csproj
TheAmazingFishy.csproj.user
TheAmazingFishy.h
TheAmazingFishy.rc
TheAmazingFishy.sdf
TheAmazingFishy.sln
TheAmazingFishy_StoreKey.pfx
TheAmazingFishy_TemporaryKey.pfx
fxc.bat
proposal.txt

README.md

#THE AMAZING FISHY

The Amazing Fishy is a retro style game developed for Windows 8 Tablets, in which you are a fish who must dominate the local sea region by consuming other beings and getting powerups! The player may advance to the next level by fulfilling a goal. This application has been brought to you by Philip Yum, Lynn Lu, Karlen Naidoo and Henry Chen. Please refer to the proposal for further details.

Check it out on the Windows App Store: http://tinyurl.com/bvkg5a6

Also available at: http://www.spriteproject.com/the-amazing-fishy/

#CONTENTS OF THIS FILE

How to Play

  • Controls
  • Powerups
  • Levels

Implementation

  • Models
  • World
  • Enemies
  • Gamelogic
  • Camera
  • Sound

#HOW TO PLAY

Important! Read before you play!

##CONTROLS

CAMERA:

  • Panning: W A S D
  • Rotation: I L
  • Zoom (Keyboard): Z X
  • Zoom (Touch): Use dual touch input to zoom
  • Toggle Panning (ON/OFF): G
  • Toggle Rotation (ON/OFF): H
  • Toggle Follow Player (ON/OFF): F
  • Jump to origin: O
  • Jump to player: P

PLAYER:

  • Movement (Keyboard): UP, DOWN, LEFT, RIGHT
  • Movement (Accelerometer): Tilt the Slate
  • Movement (Mouse): Click/Drag
  • Shoot (gun mode only): SPACE

PAUSE SCREEN:

The player may switch movement controls between keyboard and accelerometer. Camera and shooting controls remain the same.

DURING PLAY:

The player can pause the game as well as adjust the volume. (Top Right Corner) Player Screen Statistics:

  • HP: Health Points, the size of the player scales from this value
  • DAMAGE: Damage per hit
  • SPEED: Movement Speed
  • ACCELERATION: Movement Acceleration

##POWERUPS There is a total of 6 powerups in the game, these include:

###FRENZY:
The player's movement speed, acceleration and attack speed is increased by 200% for the duration.

###SUPERSIZE:
The player's HP and Damage is increased by 200% for the duration.

###VORTEX:
The player receives 360deg attack region. All units within a large radius are pulled towards the player, however the player is not invulnerable.

###SPLITTER:
The player makes a clone of itself which gains all of the players current and future stats and powerups. For example, if the player obtains GUNMODE after SPLITTER, the clone will start shooting. If a clone is within a distance from the player, it will follow the closest enemy it finds. If the player travels too far away, the clone will follow the player instead until it is again close enough to the player.

###GUN MODE:
The player shoots "bullets" with greater ferocity, shooting will now be automatic. (It looks like water/bubbles).

###HEAL:
The player gains a permanent HP increase (about 20% of its current health).

##LEVELS Each level generates different enemies and have a condition to advance to the next level. The condition can be either to kill a number of enemies or to survive for a period of time.

#IMPLEMENTATION

##MODELS All models were made using Autodesk 3D Max and exported as text based .x files. The .x files contain all information of the model such as vertex positions, surface normals and surface color. These .x files are then read by ModelReader.cs and converted to an array or floats to be used in Assets.cs. Our rendered models may contain any or all of color, texture as well as lighting. The float array format is thus:

                    new InputElement("POSITION", 0, Format.R32G32B32_Float, 0, 0),
                    new InputElement("TEXCOORD", 0, Format.R32G32_Float, 12, 0),
                    new InputElement("COLOR", 0, Format.R32G32B32A32_Float, 12+8, 0),
                    new InputElement("NORMAL", 0, Format.R32G32B32A32_Float, 12+8+16, 0),

The shader file is a combination of the original coloured and textured styles. Lighting is implemented using Blinn-Phong shading. Any color and size changes will require a recalculation of the model. For example, when a unit takes damage, they will flash red for a short duration as well as lose hit points (thus change in size). The model is then recalculated.

##WORLD

The entire game is actually inside a giant sphere. The sphere model was taken from 3D Max, and read by ModelReader.cs. The vertex positions of each triangle have been reversed, thus the texture is shown on the inside of the sphere. Although the world is a sphere, there is a rectangular boundary box for where units are generated. Units cannot move beyond the boundaries.

##ENEMIES

As well as the player, the game contains many enemy units. Enemies are generated randomly around the gameworld upon level start and as the level progresses. Thus each level has an init and an update function. We have a few types of enemies ranging from fish to giant cabbages. From the varying types of enemies, we have made different scenarios for each level.

###Survival Mode:

Survival type enemies can not be attacked, instead they will damage the player heavily if touched. They can be identified as fast moving spinning units.

###Bosses:

These are special units which can spawn minions. They are currently the only ranged units in the game (well the minions are). Boses will spawn 20 minions on creation and continue to spawn minions every few seconds if it has lost any minions. If the player is within range of the minions, they will follow and shoot at the player. Otherwise they will follow and crowd around the cube god. Albeit slow, bosses have a long range of sight in which it will follow the player.

##GAMELOGIC

###Movement:

All movement and rotation is calculated from acceleration for a "smoother/more real" result. Enemy units will move towards the player if he/she is within a certain hostility range.

###Collision:

Collision is done by the distance method. Each unit is given a "size_ratio" which determines the size of it's collision circle with respect to its HP (which is proportional to it's relative size in game) as well as it's base model size. There are 3 collision states: None, Touching and Overlapping. However the method is currently not perfect thus there is no differentiation between Touching and Overlapping. To fix the problem we have tried to use a "last position stack" to restore the previous position until the colliding units no longer Overlapping, however this produced "glitchy" results in game. Instead momentum (actually this should be called the "on hit formula") has been tweaked to prevent colliding units being locked in the Overlapping state.

###Momentum:

If two units collide, some acceleration is "transferred" between the units. This makes is possible for a unit to "push" a stationary target. Furthermore, two moving units will appear to bounce away from each other if they collide. Same scenario applies for collision with the world boundaries except the boundary can't move, obviously. Note this "momentum" formula is wrong, but it looks pretty good in game.

###Rotation:

To attack a target, the unit must face the target. Enemies will rotate to face the player if they are within the hostility range.

  • ROTATION ANGLE: Current direction the unit is facing (0deg is East, 90deg is North, etc.)
  • ROTATION SPEED: Units have a speed at which they can rotate. Thus units cannot face targets instantaneously.

###Attacking:

  • ATTACK REGION: Targets will only be damage if it is inside the attacker's attack region. This has been set to a 90deg section. Thus the target will be damaged if it is within 45deg of the attacker's rotation angle.
  • ATTACK DELAY: Minimum delay between each hit. This is also referred to as the attack speed.

###Friction:

A part of the unit's acceleration is taken away each update (based on friction force formula). Thus, a unit will eventually stop moving if acceleration is not applied.

##CAMERA

The camera is implemented as a separate class CameraController.cs, which has an update method that calls the Matrix.LookAtLH and Matrix.PerspectivFovLH functions. It also contains methods to control properties of the camera such as the pan distance, rotation angle and zoom which all determine the current location of the "eye". The target of the camera will also change accordingly. The camera is controlled primarily by keyboard, please read the "CONTROLS" section for details.

##SOUND

All sound effects have been generated using an 8-bit sound generator. The background music has been obtained from a free site. Sounds are separated into background music (BGM) and sound effects. The BGM is a looping Media Element; sound effects are contained in an array of Media Elements which are re-initialised if the media source is finished. Thus the BGM as well as a number of sound effects can play simultaneously at any time.


Congratulations! You have reached the end of this detailed README. Enjoy the game.