Giter VIP home page Giter VIP logo

cogimagegame's Introduction

CogImageGame

This game is designed and coded by Lukas Haring García.

Code

  • Style is created using CSS.
  • Typescript and Angular is used to create the game.
  • Phaser is used as the Game Engine, first time.

Welcome

Simple box with play and result button, with a simple description. We could improve it by adding a gif.

Music

No music is going to be used, so that the player doesn't get distracted, when tried with my roommates they got lower points so I decided to remove it.

Card

Card Position

The x position is situated on the left of the screen, and moved to the right in a duration of time or speed. The y position is randomly choosen by the height of the element. y = RANDOM(40, SCREEN_HEIGHT - 80)

Card Speed

The card speed is dependent to the screen size, the smaller it is, the slower it goes, adaptative to phone.

The more time you play the faster cards come, dt = 2.7 - SECOND_PLAYING / 5 The difference or delay is calculated randomly. Delay = Random(dt, dt + 1)

Card Points

Where t is delta time since the image has appear.

Points = (1 - t / duration) * MAX_POINTS

Penalization

Be careful! Wrong typping would make you loose time. The penalization time is fixed by the developer.

Alert Points

You get an alert every time you keypress:

  • GREAT: When the card is in the first third of the size of the screen.
  • OK: When the card is in the first third of the size of the screen.
  • BAD: When the card is in the first third of the size of the screen.
  • You loose a life if the card is out of the screen.

Bonus

You get, +2 for OK, and +4 for GREAT more points if you mantain your Alert Points! The formula used is: Points' = Points + (OK or GREAT) * CONSECUTIVE * BONUS_FACTOR

Consecutive Alert Points is increment the bonus counter, different Alert Points reset the bonus.

Execute

> cd <folder>
> ng serve

More information: [https://cli.angular.io/]{https://cli.angular.io/}

Conclusion

It was a fun experiment, where I have learnt a new game engine in a few hours, the game is fun but could be improved with special cards: freeze time cards, life cards, etc. The api 500px was not available so I had to create one by my own, simpler but great.

Result Table

It will show the best 10 games, the information shown is the number of points and time played.

cogimagegame's People

Contributors

lukasharing avatar

Watchers

James Cloos avatar  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.