Skip to content

Commit

Permalink
Tweaks to Arcade, Outrun game, and README.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesalmeida committed Oct 3, 2024
1 parent cded5c2 commit 380eb59
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 24 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,5 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo

- Want to thank Ameer Studio for the [3D model of the Tesla Model 3](https://sketchfab.com/3d-models/tesla-2018-model-3-5ef9b845aaf44203b6d04e2c677e444f).
- Also thanks to Vasilj Miloevi for the [loading screen circle animations](https://codepen.io/eboye/pen/ANPxVX)
- Thanks to [Patrick Stillhart](https://codepen.io/arcs) for sharing the [OutRun video game on Codepen](https://codepen.io/arcs/pen/aGzNKY) that inspired me to refactor it work in this project.

25 changes: 17 additions & 8 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -333,14 +333,6 @@ html, body { width:100%; overflow: hidden; }
font-weight: 600;
}

/* UTIL CSS */
.no-select {
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}

.small-screen-message {
display: none;
text-align: center;
Expand Down Expand Up @@ -471,3 +463,20 @@ html, body { width:100%; overflow: hidden; }
}



/* -------------------- UTILITY CSS -------------------- */

.no-select {
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}

.ctaBtn:hover {
transform: scale(1.05);
filter: brightness(1.1);
transition: transform 0.1s ease-in-out, filter 0.1s ease-in-out;
}

/* -------------------- UTILITY CSS END -------------------- */
21 changes: 14 additions & 7 deletions src/components/Apps/Arcade/Arcade.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,42 @@
bottom: 0;
left: 0;
width: 100%;
height: 31%;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
height: 40%;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
}

.btnAndTitle {
.activeGameBannerOverlay {
position: absolute;
top: 74%;
left: 3%;
/* transform: translate(-50%, -50%); */
display: flex;
flex-direction: row;
align-items: center;
}

.play-button {
padding: 15px 55px;
padding: 15px 55px;
font-size: 14px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-weight: 600;
min-width: 72px;
}

.gameTitle {
.gameInfo {
font-size: 30px;
font-weight: 700;
color: white;
padding-left: 11px;
padding-top: 4px;
padding: 4px 10px 0px 11px;
}

.gameDescription{
font-size: 12px;
font-weight: 400;
}

.game-carousel {
Expand Down
19 changes: 11 additions & 8 deletions src/components/Apps/Arcade/Arcade.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import './Arcade.css';

export const Arcade = () => {
const games = [
{ name: 'Outrun', image: 'outrun.jpg' },
{ name: 'Asteroids', image: 'asteroids.jpg' },
{ name: 'Centipede', image: 'centipede.jpg' },
{ name: 'Missile Command', image: 'missile-command.jpg' },
{ name: 'Outrun', image: 'outrun.jpg', description: '(Keyboard required) Race against time and other cars to complete the course before time runs out! Thanks to Patrick Stillhart for sharing this on Codepen. Link in the README.' },
{ name: 'Asteroids', image: 'asteroids.jpg', description: 'Coming Soon! Asteroids is a space combat game where you navigate a spaceship and destroy asteroids and enemy ships.' },
{ name: 'Centipede', image: 'centipede.jpg', description: 'Coming Soon! Centipede is a shooter game where you control a centipede and shoot at enemies and avoid their attacks.' },
{ name: 'Missile Command', image: 'missile-command.jpg', description: 'Coming Soon! Missile Command is a classic arcade game where you control a missile defense system and shoot at incoming missiles.' },
];

const [activeGame, setActiveGame] = useState(games[0].name);
Expand Down Expand Up @@ -72,11 +72,14 @@ export const Arcade = () => {
alt={activeGame}
/>
<div className="gradient"></div>
<div className="btnAndTitle">
<button className="play-button" onClick={handlePlayClick}>
<div className="activeGameBannerOverlay">
<div className="play-button ctaBtn" onClick={handlePlayClick}>
Play Game
</button>
<div className="gameTitle">{activeGame}</div>
</div>
<div className="gameInfo">
<div className="gameTitle">{activeGame}</div>
<div className="gameDescription">{games.find(game => game.name === activeGame).description}</div>
</div>
</div>
</div>
<div className="game-carousel">
Expand Down
3 changes: 2 additions & 1 deletion src/components/VerticalSliderPanel/VerticalSliderPanel.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ display: none;

.slider-content {
/* padding: 0px 20px; */
height: calc(100% - 40px);
/* height: calc(100% - 40px); */
height: 100%;
/* overflow-y: auto; */
width: 100%;
}
Expand Down

0 comments on commit 380eb59

Please sign in to comment.