Skip to content

Super simple and easy game usable for a marketing campaign.

Notifications You must be signed in to change notification settings

andreaweb/super-dario

Repository files navigation

Super Dario

Simple sample game for interactive campaign

Check it out!

https://andreaweb.github.io/super-dario/

Print of Project

To install and run the application

  • Download it and run npm install
  • Run gulp watch or npm start to see it on your browser
  • Gulp is currently minifying css and js automatically and reloading the project on each change

What the app is

  • Super Dario runs/walks forever, automatically
  • After you click "Play Now" an enemy will appear at the screen
  • You must jump to avoid the enemy or Super Dario will get hurt
  • If Super Dario is hurt, he becomes small. If he's hurt again, he dies
  • To jump, press any key or tap your screen if you're on your phone

How the app works

  • Super Dario, the ground and the enemy move constantly through CSS animations
  • When the game starts, the position of the enemy (offsetLeft) is constantly compared with Super Dario's position
  • If Super Dario and the enemy share the same offsetLeft, but Super Dario is jumping (class .up), Super Dario isn't hurt
  • If Super Dario is hurt, JS checks if he has the .small class. If yes, he fades (dies) and the game 'freezes' (animations stop).
  • If no, he becomes small by the add of the .small class.

About

Super simple and easy game usable for a marketing campaign.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published