Giter VIP home page Giter VIP logo

fab-five-game's Introduction

image

The Fab Five Game


Introduction

This is a project that I made at Ironhack as part of their 2023 Web Development Bootcamp. It is a logic game, based on a German card game. I’m especially proud of the fact that I built it entirely in Javascript, HTML and CSS – no canvas elements here.

I used one inline svg for each shapes, then cloned them via the <use> element. This makes it easy to change the shapes, if needed. The colours are equally easy to adjust via CSS custom properties. The game comes with dark and light mode and scales to mobile, of course.

Features

  • 😎   nice simple gaming fun without signup
  • 🌈   clever colour switching via SVGs and CSS custom properties
  • ⏰   time adapts when you’re fast
  • 🌄   random cheesy motivational quote when you’ve lost a round
  • 🌙   light and dark mode

Demo

👉  Play it at  fraulueneburg.github.io/fab-five-game/ (no sign-up required)


Content

  1. Setup
  2. Customization
  3. Game Rules
  4. About me
  5. Contact

1. Setup

If you’d like to view my game in your browser:

  • git clone https://github.com/fraulueneburg/fab-five-game.git in your terminal
  • cd fab-five-game
  • open index.html
  • or, you know, just visit the game demo and start the gaming fun right away 🚀

2. Customization

Item Colours

To customize the item colours, just change the CSS custom properties inside css/items.css.

Shapes

The shapes are embedded as inline svgs in index.html. The wrapper code for all svgs stays the same:

<svg display="none" width="0" height="0" version="1.1" role="none" xmlns="http://www.w3.org/2000/svg">
	<defs>
		<!-- CODE FOR ALL SVGS -->
	</defs>
</svg>

Inside that wrapper code, paste the inline svg code of your items and wrap each one with the following <symbol> tag. Adjust the number inside the id attribute accordingly (item01, item02 etc.). Make sure your svg has a square artboard so all items will be displayed correctly.

<symbol id="item01" focusable="false" role="none" viewBox="0 0 160 160">
	<!-- svg code of first item -->
</symbol>

Put together, it looks like this:

<svg display="none" width="0" height="0" version="1.1" role="none" xmlns="http://www.w3.org/2000/svg">
	<defs>
		<symbol id="item01" focusable="false" role="none" viewBox="0 0 160 160">
			<!-- svg code of first item -->
		</symbol>
		<symbol id="item02" focusable="false" role="none" viewBox="0 0 160 160">
			<!-- svg code of second item -->
		</symbol>
		<!-- ... etc ... --->
	</defs>
</svg>

3. Game Rules

The rules are explained on the startscreen of the game as well as throughout the game.

4. About me

I’m a Full Stack Web Developer and UI/UX Designer currently living in Hamburg, Germany.
Usability is a top priority in my work and I am also strongly advocating for (and keep learning about) web accessibility.

5. Like this project?
Follow my progress and let’s connect:

LinkedIn

fab-five-game's People

Contributors

fraulueneburg avatar

Stargazers

Fernando Lucas Picco avatar

Watchers

 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.