/fightingGame

Primary LanguageJavaScript

FIGHTING GAME

This challenge started out being very ambitious. Between the little time and the difficulties that I have faced, I have made a rather regrettable code, but it is functional and meets the specifications and I hope to improve it later if I have time for it.

Index

Gratitude

In this challenge, I have to thank the great help that many colleagues have given me, especially Álvaro, Carlos, Diego and Joan. For those long nights "picando código".

Development

Technology

  • JavaScript (high percentage).
  • HTML.
  • CSS.

Documentation

  • To do the random luck I documented here. This is the part of the code:
const getRandomArbitrary = (min, max) => {
    return Math.floor(Math.random()) * (max - min) + min;
}
let fluke = getRandomArbitrary(1,rival.luck);
  • To make the progress bar of life I documented here. This is the part of the code:
<progress id="healthPlayer1" value="200" max="200" min="0"></progress>
  • To put audio I documented here. This is the part of the code:
<audio src="./audio/Pokemon_Gold_Silver_Battle.mp3" autoplay></audio>
  • To restart the app I documented myself here and here. This is the part of the code:

JS:

const reset = document.getElementById('reset');
reset.addEventListener('click', () => {
    alert('Game over... loadding');
    window.location.reload();
})

HTML:

    <div class="resetButton">
        <button class="reset" id="reset">Game Over</button>
    </div>

  • I found and documented how to put different fonts here.

Functioning

The operation is simple. You press start, choose three characters per teams and then attack. To listen to the music you have to allow automatic playback in your browser. Simple for so many hours.

Deploy

The fighting game I have deployed on GitHub page. Here you can see the final result of the project.

up