Demo Game
This is demo app to give an idea of the kinds of code and programming involved with programming web applications.
View the game live here.
Instructions
- Download this project and open the folder in VSCode. This is where you will be editing the code.
- Now open the file
index.html
in your web browser. This is where you will see all the changes once they take effect.
- Let's start in the
index.html
file using your code editor- Find the
title
tag, and change it fromdemo game
to something fun - Find the
h1
tag that holds ourboring game title
, and update it with a new fun and exciting name - Find the
link
to our stylesheet and add in thehref
attribute - Take a look at whats changed on the page (refresh the webpage in your browser)
- Find the
- Now over to the
style.css
file- Look through the images folder and find a cool alien you want to play as
- In the
:root
rule, change the--player-image
variable to the your favorite alien - Lets also change the
--background-image
to your favorite wall - Now lets change the
--button-color
to something more readable - The buttons look better, but them being square is a little weird, so lets find the
.button
rule - inside the
.button
rule, lets add a new propertyborder-radius
and set it to a value of50%
- Take a look at whats changed on the page (refresh the webpage in your browser)
- Now the page looks a lot better, lets make it work
- Go back to the
index.html
file and find thescript
tag, add in thesrc
attribute - Take a look at whats going on, things are moving now!
- Find the
timePerBomb
andtimePerFruit
variable and change them until you find a balance you like. - Find the
makeObject
function, and inside find where the objects speeds are set. - Change the speed of the bombs and fruits until you find a balance you like
- Take a look at whats changed on the page (refresh the webpage in your browser)
- Go back to the
- Looks good!
๐ Congrats! you've turned the starter project into a functional game with your own game mechanics. You made it possible using HTML, CSS and JS. Feel free to glance over the project files and see if there are things you understand and things you are not sure about just yet.
Todo -
- Some tasks to explore programming on the web.
- Include comments with notes on possible values along side code
- Building Web Applications
- Need a branch to demo the completed game
- Master branch should leave out some things that become and activity
- Links to css files and js files
- These files might be broken into separate files
- Links to css files and js files
- HTML
- Add some images of other characters
- Add CSS styles
- Add JS file
- CSS
- Can be better organized for demo
- Add opportunities for students to make improvements to the appearance
- #container overflow hidden
- #contanier round corner
- .button round corner changes colors
- .button:hover change colors
- add a box shadow to player
- Change game images used as game elements
- --player-image
- --bg-image
- --bomb-image
- --fruit-*
- JS
- Add link to main.js
- Change somethings in the JS to see what happens
- Edit variables
- change the speed and frequency of elements
- speed of bombs and fruit
- frequency of fruit vs bombs
- change the speed and frequency of elements
- Edit variables