Giter VIP home page Giter VIP logo

dice-game-1's Introduction

Dice Game

Description

I have created a dice game that is designed to be fun for the user. It uses 6 sided dice, 10 sided dice and 20 sided dice. The aim is to get the highest dice roll and be the first to win 10 times and beat the computer.

My layout is simple, all the player needs to do is select a die and press the roll button. Once the game is over just press restart to try again.

I decided to make a dice game because I am an avid D&D player and love rolling dice!

Technologies used

I used HTML, css and Javascript to create this game. I used these technologies because my game is designed to run on web browsers on many devices and the vast majority of web browsers have integrated HTML, css and javascript.

Bugs

One major bug I faced (image below) was a space created by a line that would not allow me to display divs side-by-side. I tried displaying the divs using inline-flex which worked with every other div wrapper but would not work with the all-rolls-wrapper. Unfortunately the only way I found to fix this was by nesting the all-rolls-wrapper in another div. I will work to fix this using the correct css in future updates.

dice game bug

Testing

I tested the game myself, hundreds of times over the course of it's creation and also had a group of 10 people test the game repeatedly. No serious issues were reported throughout all of my and the groups testing.

Validating

I ran the site through W3C HTML and css validators and both reported no errors as seen below.

image

image

I also ran the site using Lighthouse and had no problems. The results can be seen below.

Lighthouse checker

I used JSHint for my javascript code which did not report any significant errors.

Responsive design

i have tested my game on desktop, tablet and mobile devices and found no issues and images can be seen below. All media queries are working correctly.

image

Publishing

The website was published and hosted from Github, using Github pages on 01/04/2022.

Layout

Start menu

The user is first taken to the start menu where they can select what die they want to use.

image

D6 game

The D6 game allows the user to play the game using a 6 sided dice.

image

D10

The d10 game allows the user to play the game using a 10 sided dice.

image

D20

The D20 game allows the user to play the game using a 20 sides dice.

image

You win the game

If the user wins the game a message is displayed stating that they won the game and all dice rolls are shown for that set of rolls.

image

You lose the game

If the user loses the game a message is displayed stating that they lost the game and all dice rolls are shown for that set of rolls

image

Future updates

I would like to include another game with a board for players to move around as the dice rolls. Fix bug mentioned above.

Credits

d10 and d20 images were taken from Game-icons.net

Link: https://game-icons.net/

D6 images were taken from code league

Link: https://www.youtube.com/watch?v=B17NC5DD-dA

dice-game-1's People

Contributors

acegaz avatar

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.