Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ad56d51
august 2019 hack day initial instructions and resources added
lloan Aug 4, 2019
b45f9dd
updated wording in getting started section
lloan Aug 4, 2019
7668d6d
pushing project files
lloan Aug 31, 2019
99e46e6
updated readme for 8/19
lloan Aug 31, 2019
ece557c
Added key input for WASD
SJT1988 Aug 31, 2019
52cc6f0
added in property for Player lives that can decrease and leads to a l…
homr0 Aug 31, 2019
f06582b
added WASD controlls
SJT1988 Aug 31, 2019
42f26b7
updated the lives condition so that it gives alert for Game Over when…
homr0 Aug 31, 2019
18f452e
Add setup container for score counter
Aug 31, 2019
7b45024
Partitioned classes into their own files
SJT1988 Aug 31, 2019
e58ae84
Merge branch 'august-2019-backend' of github.com:tyricec/hackday into…
homr0 Aug 31, 2019
d82ec72
locked the Player sprite's movements when lives are 0
homr0 Aug 31, 2019
d383dd4
Add modal
Aug 31, 2019
b12dbfc
created Game class (state machine)
SJT1988 Aug 31, 2019
4cbf365
added more Player sprites that change after getting to the top
homr0 Sep 1, 2019
8b24ca3
Merge branch 'august-2019-backend' of github.com:tyricec/hackday into…
homr0 Sep 1, 2019
b9e3652
fixed Game class's constructor for state
homr0 Sep 1, 2019
414e0ba
refactored modal content and added level complete overlay, also tweak…
SirHexxus Sep 1, 2019
6e3c480
got rid of stupid scrollbar
SirHexxus Sep 1, 2019
2c1dd6f
added title screen overlay
SirHexxus Sep 1, 2019
7e1c2b8
Merge branch 'august-2019-backend' of https://github.com/tyricec/hack…
SirHexxus Sep 1, 2019
ee85967
removed 'x' button
SirHexxus Sep 1, 2019
e3e21af
added Selector for win space(s)
homr0 Sep 1, 2019
b2383e4
Merge branch 'hackday-frontend' of github.com:tyricec/hackday into au…
homr0 Sep 1, 2019
0a6e0b2
updated lives counter on the HTML page
homr0 Sep 1, 2019
a9d70b3
Add title screen and remove on enter key press
SirHexxus Sep 1, 2019
46d0e60
Merge branch 'hackday-frontend' of github.com:tyricec/hackday into au…
homr0 Sep 1, 2019
4bcd9d4
added in Game Over modal
homr0 Sep 1, 2019
9e96672
moved sprites array to the app.js file
homr0 Sep 1, 2019
e5a0985
added New Level screen
homr0 Sep 1, 2019
6393759
added in level and games won counters
homr0 Sep 1, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,49 @@
</p>

<p align="center">
Welcome to the official repository for the IESD Hack Day event.
August 2019 IESD Hack Day event.
</p>


## **Getting Started**

Look under branches and find the appropriate month and year for the Hack Day you're participating in. Each branch has its own documentation for getting started.
This repository has the resources to get you prepared for the Hack Day event.

```Starter code has been update - 8/31/19 @ 1:55 PM.```

If you have any questions, please ask on our [Slack](https://ie-sd.slack.com). We welcome everyone to our Slack, so don't be afraid to join! Have fun coding!

**<a href="https://bit.ly/2C0umfQ">Join our Slack!</a>**

## **Concepts to Review**
Resources section below has links for these concepts.
- Canvas
- RequestAnimationFrame (JS Method)
- Object Oriented JavaScript
- Prototypal Inheritance
- Sprites
- Keyboard Events

## **Resources**
List will be updated up until the day of the Hack Day event.
- <a href="https://jlongster.com/Making-Sprite-based-Games-with-Canvas">Making Sprite Based Games with Canvas</a> (2013 article - still relevant)
- <a href="http://blog.sklambert.com/html5-canvas-game-2d-collision-detection#d-collision-detection">HTML5 Canvas Game: 2D Collision Detection</a>
- <a href="https://stackoverflow.com/questions/13916966/adding-collision-detection-to-images-drawn-on-canvas">Adding collision detection to images drawn on canvas on StackOverflow</a>
- <a href="https://lowrey.me/modals-in-pure-es6-javascript/">Modals in Pure ES6 JavaScript</a>
- <a href="https://css-tricks.com/snippets/javascript/javascript-keycodes/">KeyboardEvent Value (keyCodes, metaKey, etc) via CSS-Tricks</a>

### **RequestAnimationFrame**

The `window.requestAnimationFrame()` method tells the browser that you wish to perform an animation and requests that the browser call a specified function to update an animation before the next repaint. The method takes a callback as an argument to be invoked before the repaint. <a href="https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame">Read more about this here.</a>

### **Object-Oriented JavaScript**
Make sure you are comfortable with Object-Oriented JavaScript:

- What is an object?
- How is an object different from a primitive in JavaScript (e.g., can a primitive have methods?)
- What are some ways to create or instantiate a new object?
- How do you modify properties, or add/remove properties from an object?
- What is a constructor function (or class)?
- What is `this`? What does it refer to and how is it used in different contexts (i.e., in a constructor function, a method, etc.)?
- How do you add a property or method to a constructor's prototype?
- What is prototypal inheritance and how is it implemented?
78 changes: 78 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
body {
text-align: center;
}

#game-info {
border: 1px solid red;
display: flex;
width: 100%;
flex-direction: row;
}

#life-counter-container, #score-counter-container, #character-profile-container {
border: 1px solid black;
flex: 1;
font-family: Arial, Helvetica, sans-serif;
font-size: 24px;
}

#score-counter-container {
border: 1px solid green;
flex: 1;
}

#character-profile-container {
border: 1px solid blue;
flex: 1;
}

.is-hidden {
display: none !important;
}

.button-close {
display: inline-block;
width: 16px;
height: 16px;
position: absolute;
top: 10px;
right: 10px;
cursor: pointer;
}

.modal-overlay {
position: absolute;
top: 0;
left: 0;
width: 505px;
height: 606px;
background: rgba(0, 0, 0, 0.6);
z-index: 9999;
display: flex;
justify-content: center;
}

.modal {
padding: 20px 30px;
width: 90%;
max-height: calc(100% - 150px);
position: relative;
margin: 5% auto 0;
z-index: 9999;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #fff;
}

.game-over {
font-size: 48px;
}

#retry-btn {
background-color: #8888ff;
color: #fff;
max-width: 160px;
padding: 16px;
}
185 changes: 0 additions & 185 deletions engine.js

This file was deleted.

Binary file added images/Gem Blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Gem Green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Gem Orange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Heart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Rock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Selector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/char-boy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/char-cat-girl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/char-horn-girl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/char-pink-girl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/char-princess-girl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/enemy-bug.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/grass-block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/stone-block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/water-block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hack Day - Frogger Clone Starter Code</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div id="game-info">
<div id="life-counter-container">
Lives: <span id="life-counter">5</span>
</div>
<div id="score-counter-container">
Rounds: <span id="round-counter">1</span>
</div>
<div id="character-profile-container">
Games Won: <span id="games-won">0</span>
</div>
</div>
<div class="is-hidden modal-overlay">
<div class="modal">
<div class="modal-content"></div>
</div>
</div>
<script src="js/game.js"></script>
<script src="js/screens.js"></script>
<script src="js/modal.js"></script>
<script src="js/resources.js"></script>
<script src="js/populate.js"></script>
<script src="js/player.js"></script>
<script src="js/enemy.js"></script>
<script src="js/app.js"></script>
<script src="js/engine.js"></script>
</body>
</html>
Loading