Giter Site home page Giter Site logo

mengelcode / finalfate Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 4.0 8.47 MB

**The Final Fate** A space game in HTML5 and JavaScript.

Home Page: https://manuel-engel.de/finalfate/finalfate

License: Other

HTML 2.83% JavaScript 97.17%
html5 javascript-game html5-game canvas space-game javascript arcade gamepad game

finalfate's Introduction

The Final Fate

License: MIT GitHub issues GitHub stars

The Invasion of Earth is at hand!

March 15th 2270...in the last centuries, humanity struggled because of war, epidemics and economical crisis. The global situation is about to turn for the better. But then, research satellites have detected a rush of giant objects travelling towards Earth. The Global World Initiative has commenced a defensive operation. It seems this is the one time at which humanity must come together, without room for errors and misunderstanding. A war against interstellar forces has started... However, there is one special unit ordered to take out the root of the evil. It is YOU! Are you ready to be the final fate which decides the outcome?

Your mission

Elimate all enemies at sight and trace back the origin of the troops. Nobody knows how far you need to travel into the unknown universe and where your true adversary awaits. Use your space ship and all power-ups wisely!

The controls

Classical: Keyboard and gamepad (PC)

You can control the game with the arrow keys and the space key on your keyboard or by going ahead and use a gamepad with an analogue stick and a designated fire button (chosen by pressing it on the title screen). You can pause the game using the "P" button if you use a keyboard or key 09 (mostly known as "The start button") if you use a gamepad.

New: Touch controls

A recent addition to the game are touch controls! Just press anywhere on the touch screen of your device (at the title screen) to activate them! At the lower left, you will find your D-Pad, above that, the pause button. To the right, this is your fire button. Make extensive use of this!

Difficulty selection

The game offers four difficulty levels in order to customize the challenge you are seeking. Every difficulty has its own combination of damage done by enemy units and subtile changes in game play. In Beginner and Normal, you shoot three bullets at a time and play four levels. In Hard and Master you only shoot two bullets, play five levels and must expect that some troops and traps may cost you a life instantly.

Ways to prepare and play the game

There are severals for you to play the game. Decide which one you like to use.

1) Give it a quick look on my server
If you do not want any big setup, but simply a quick round of action, you should definitely look here.

2) Locally storing the files and directly opening the html file
Clone the repository, or, if Git is not your tool of choice (How did you find me in this case? Let me know.), you can manually download the respective files. Mandatory downloads are index.html and all the .js files in the finalfate directory, the sound files are optional. Please include a copy of the license file when making the game available to others.

3) Serving the game's files over a webserver
Follow the 2nd option "Locally storing the files" and either host the game on your computer or a web hosting provider you trust. This way needs a bit more technical knowledge, but the advantage is that your family at home or possibly the entire world can enjoy a cool space ship adventure! Please make sure users are able to review the license, e.g. mentioning it on your homepage when you link to the game.

Power-Ups

During your quests, there are some power-ups you can ease your journey with. Pay attention, they travel quickly! You pick them up by touching them.

Fire Boost (Red F)

Grants you the ability to auto-fire bullets by holding the fire button. If you pick this up again while auto-fire is still available, you receive additional Health Points.

Health Boost (Green H)

Grants you additional Health Points. Use the boost in order to heal yourself or to build up a shield reserve for dire situations. There is no limit on how many Health Points you may have.

Life Boost (Blue L)

Grants you an extra life. There is no limit on how many extra lifes you may have.

Web browser compatibility

It is an aim for this game is to be fully compatible with modern Firefox and Chromium/Chrome browsers. If you encounter any issues please send us the error you are facing.

Epilepsy warning

Some people tend to epilepsy triggered by (flashing) light effects. Theoretically, everyone can encounter this the first time. If you are known for this type of epilepsy or notice that something is off, immediately stop to play the game.

HTML 5 Web Storage & Privacy

The progress of the game can be saved if the player wishes so. The technology HTML 5 local storage does save data in a storage space managed by the used web browser per domain and protocol (i.e HTTP, HTTPS). In contrast to cookies, those data are NOT transferred to the server by default and in the case of the game, they are not transferred at any given time. Some web browsers manage the usage of this function the same way as they do for cookies. Some browsers might even state that the game does place cookies, but this is not completely the truth from a technical point of view. The game progress you can save (this does not happen automatically!) cannot be used to identify you. Also, it is impossible for the hoster of the involved web server to give you a copy of your game save and your own local storage space.

Troubleshooting and Feature Requests

Please open an issue or send an e-mail to the developer in order to report technical difficulties or feature requests.

Licensing

The software is licensed under the MIT license. Please retain the license notice with all copies you distribute, publish and modify.

Collaboration

As the nature of this project is personal skill development, collaboration is not (a planned) part of it. But you can pick something from the Issues list, let me know about it and create a Pull Request from your fork to my main repo. Please declare if and how you want to be credited in the request notes.

finalfate's People

Contributors

ichbestimmtnicht avatar mengelcode avatar vicfinistere avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

finalfate's Issues

Create enemy type "Mega Blinky"

The idea: For a short time, you can see a very large enemy. It can spawn Blinky enemy objects at random locations on the screen. Most likely, it will not spawn Blinky Tracer objects.

To be used for #30.

Setup a server to make the game easily playable without download.

It would be nice if one could play the game live without getting it on their computer in the first place.

TASK:

  • Decide if the docker container or an already running Apache at my home is used.
  • Setup one of the domains I have in order to show to my luckily static IP address.
  • Add this as a way to play in the repo description and in the readme file.

Pause function: Enemies spawning oddly / only partially in number

When using the pause function of the game, the spawning of the enemies is influenced.

Known cause: The "aniCount" variable still counts up, altough the normal game cycle is stopped.

How to (most likely) repair: Stop the frame counter when switching to pause. To animate something in the pause menu, an alternate counter needs to be used.
#19 should be resolved beforehand.

Implementation of Level 3

Level 1 and Level 2 are playable. So the next logical step is to begin creation of the next stage.

Volume control

During a showcase, it was asked if a volume control could be implemented. So I guess this should be added.

Change of the cannon's place [Player feedback required!!]

A player reported that they find it rather unintuitive that the smallest object can hit them as it just fits into he gap between the two bullets shot.

TODO:
Make the shots spawn closer to the cockpit.
Change the look of the space ship.
Change the physics model if required.

Playing the game on an XBox

A potentially new player reported they would like to try the game on their XBox 360 and/ or XBox One.

TASK:
-Do research if the game could possibly run on one of those consoles.
-Prepare a webserver who can deliver the game to the consoles' web browsers,
-Contact the requester if the previous tasks were successful.

RESULTS (subject to updates)
The Edge included on an XBox One console is seemingly capable of HTML 5. In order to remove the mouse out of the picture, use:

navigator.gamepadInputEmulation = "gamepad";

This property does not exist elsewhere and adding it on another platform will most likely simply have no effect at all.

Serious performance issues in game (master branch NOT affected!)

#2 has been solved. However, the price for correcting the algorithm is a serious loss of performance, notable in Firefox and Chromium.

TASK

  • Re-write the structure of in-game enemies in a way which makes as little changes in the level generators necessary as possible.
  • Check if the former task and the removal of now hopefully unneeded "shadow entries" in the collision matrices help performance to become acceptable again. All level 3 tasks will be blocked.

Option to save and resume in game

In #12, a saving feature was requested. Altough the game is supposed to be as old school as possible, some adapations to modern society could be necessary. The game must be saved and resumed later if the player wishes so.

This feature might completely change the nature of the game, so both "Enhancement" and "Elementary" will be added as label.

Cut content?

Because the scope exploded too much, I guess I need to decide if I will cut what I wanted to be level 5 of the game, a rather mecha- and metal-themed world.

Use Nintendo Switch Joy-Cons as possible way to play.

As an owner of a Nintendo Switch console, I would like to use nice little "Joy-Cons" (basically small gamepads which can form together "one" gamepad).

If you try it right now, the following problems will occur:

  • A "Joy-Con" can register to an ordinary computer via Bluetooth. But the problem is that one "Joy-Con" will always be a single whole gamepad from a technical point of view.
  • The peripheral uses other axis ( axis 5 and 6 instead of 1 and 2) in order to register stick movement. So it will be impossible now to steer the space ship.
  • I simply dream of playing my own game similar to how I can play what runs on specified console.
  • A reliable way of differencing those devices from all other gamepads will be required.

Disclaimer: In no way I am affiliated with Nintendo, the owner of mentioned trademarks.

Critical: Input system heavily damaged.

While working on #12, refactoring and possibly other factors did severe harm to the mechanisms which poll and apply the states of a possibly connected gamepad. This results on game crashes and/ or general unusability of the device. A new branch has been openend.

TASK

Manually merge the master branch and the new branch. Any work has to be stopped until this is resolved.

Need for not-destroyable objects!

Difficulties "Easy" and "Normal" are theoretically also too easy.
TASK:

  • Create an invisible enemy object which sole task is to generate some walls.
  • Create instances of it for Levels 2 and 3 (and later for others).

Checkpoints before a boss fight

A player reported they would like to be respawned in front of the level boss if they reached the end of level 2 or a follow-up level. The decision to implement this was taken.

Coordination: Level 3 boss

The task can be divided into following sections:

  • Create hatch for "secret fun".
  • Create arms for attack.
  • Create the two behaviours for the "fun".
  • Adapt HUD (#16)

The task is a subset of #6.

Implementation of MIT License

In #18, I misleadingly announced the usage of the BSD license by accident. It sadly took me a while to notice the mistake.
So, now I am going to be correct and more concrete in the announcement:
All commits after December 31 2019, 23:59:59 CET will be subject to the MIT license.

Process: Make it a routine to report updates.

Right now, there are basically limited ways I hint potentially new players to this repository.
These include, but are not totally limited to multiple Discord channels, most of them being public, some of them being more private.

TASK: Post about the game more often at the communication channels right now available.
BONUS TASK: Make YouTube videos possibly "public" instead of "not listed".

Important: Adapt license file.

Because the new Docker configuration files are now licensed under a Creative Commons license, the license file is no longer correct.
To prevent too much from going wrong, I think I should freeze all running tasks until I worked this out.

Related:
#20 and #33

Create enemy type "Ship Buster"

Idea:
Have a bomb-like object which will do damage to the space ship.
The damage will be determined by the distance between space ship and bomb.

I think a portion of the implementation can be shared between #42 and this issue.

To be used for #30.

Implementation of another license (Public Domain -> BSD)

Further versions of the game will be licensed under another license. The current state can be considered as "Public Domain" (free for everybody, without any conditions). Altough I cannot (I am not even willing to do so) revoke this, I will apply the BSD license in one of the next coming commits. The only true restriction for you will be that you are required to give credit then when re-using and distributing the software. Old commits and progress states are not affected in any way.

New powerup: 1-up

In #6 a level is implemented. I want to add an extra life icon. Changes will be committed together with the level progress.

More compact source code

The usage of function variables has been quite overdone at some point. So, before continuing, the object types an own Enemy class could be created for should become the subject to refactoring.

Spelling error in Readme file

"Keep in my that this feature is experimental and only applicable for Firefox browsers right now."
This is what the last sentence of the "The project" section reads. "Keep in my" was intended to be "Keep in mind".

Firefox: Gamepad not re-usable for next playthrough

A user stated that, in Mozilla Firefox, under certain conditions, a gamepad is no longer usable for steering of the space ship.
Reproducibility: Unknown
Stated condition: Lose all lifes, lose the last time while being in the right corner of the playfield.

The possibility is given that the user accidentally disconnected the gamepad for a short moment of time.

Enemy type "Stupid Enemy" should be renamed.

I think this name is not suitable for this game. I originally have chosen it because the corresponding enemy type has no capabilities except simply falling down /flying into a single direction.

TASK:
Refactor "StupidEnemy" to "SimpleEnemy" in the code.

Information Issue about external working on issues

When choosing to work on an issue on an own fork (with the goal of a Pull Request), please assure the following:

  1. Don't work on issues labeled "Elementary".
  2. Only pick issues without assignee.
  3. Contact me via a comment on the issue beforehand.

Create enemy type "Fog Bomb"

The idea: Flying objects looking like the enemy object type "Meteor", with a small twist:

  • If you do not shoot them, your screen fill be filled with some fog. You will not be able to see new objects.

I want to use them for #30. This issue will become a very early blocker.

User manuals would be pretty good

Even if most things in the game are self-explanatory, it is good if there was a guide, dedicated to end-users. I know that mostly devs are active on GitHub, but I think a user manual, in the most ideal case, available in the native languages of the players, should come with a good game.

Related to #4.

Example: It is not documented at all that the game can be paused, saved and resumed.
(Pause on keyboard = button p, Pause on gamepad = Button 9, a.k.a. "Start button")

New power-up: Distributed shots.

Multiple persons asked me if I could implement a power-up which upgrades your cannons in a way that they shoot multiple distributed bullets. So, I guess this is now also in the project scope.

Backgrounds in Level 1 and 2

The backgrounds of Level 1 (blue entity filling the entire screen) and Level 2 (none at all - the default black of the canvas) could use some live.

Multiarch Dockerimages

Dear Mengel,

I dockerized your project with automated mutliarch (arm64v8 & amd64, arm32v7 aka armhf) images.

There is a catch: automated dockerhubbuilding doesn't support experimental features, so that the "ungrouped" images are not flagged with the correct architecture. The complet manifest is tagged correct so that this can be ignored safley for endusers.

I am working on a lightweight solution for that flaw but haven't got one so far. DIND (Docker in Docker) is my best working try but to heavy for just pushing the image - if you ask me. In case you don't care about buildtimes I can help to get it running.

Steps to accept:

  1. Create or login to your hub.docker.com Account
  2. Create the repository "finalfate"
  3. Setup an automated build with github
  4. Merge a pullrequest from my fork
    • Optional: Moove the build-args from the buildhooks build (and delete them in post_checkout since src_arch isn't in use anyway to your Dockerhub
    • Replace maintainer with an email (can be found in the same file)
  5. Wait for the build to finish
  6. Test the image e.g.
    docker run -dit --name test -p 8080:80 mengel38/finalfate:latest-amd64
    and open 127.0.0.1:8080 in your browser
  7. Update your Readme
  8. Enjoy

further ideas:

  • Dockerfiles could be combined into one with a some
    sed
    commands and tweaks in the build hook (DOCKERFILE_PATH is the var send from dockerhub and the
    docker build
    command already uses DOCKERFILE which is already customised right before)
  • Enabling automated tests could help with bugfinding.
  • There is a great Browsertesting gitlab-ci.yml template from where you can start

HUD: Status section

The creation of the current boss gives reason to enhance the HUD with a field "Status", which displays general info: Without spoilering the boss fight, following status texts might apply:

  • Normal --> Standard state.
  • Low HP --> HP beyond 40.
  • Critical HP --> HP beyond 20.

Additionally, the HUD should be able to have a red background.

First "unavoidable" bullet shot after starting the game.

When you press either space or your self-chosen fire button at the title screen, you will most likely also shoot bullets, even if you did not intend to directly fire at something.

"Potentially unwanted" chosen because I think this is a super-minor bug. Correct me please if you think it is more severe.

Faulty collision model for space ship

The shots are correctly registered so far. Where the current game "physics" still have its weakness is in the collision matrix of the space ship. An enemy needs to be there quite for some time in order to get a collision detected.

Make difficulty adjustable.

A player asked if a difficulty switch could be implemented.
I will continue development as I am doing anyways, but this will be the "Hard" difficulty later in its original.
Levels are supposed to be:

  • Easy
  • Normal
  • Hard

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.