Giter VIP home page Giter VIP logo

a4-creative-coding's Introduction

Eat

Live demo: https://a4-creative-coding-liamrathke.herokuapp.com/

Screen Shot 2021-10-04 at 10 47 50 AM

The goal of this submission was to modify the HTML5 Canvas-based game I had built for A2 and A3 to conform with A4's requirements, as well as to make several user experience and usability improvements. Most of the challenging work was completed earlier this term, when the game was initially built - I learned about HTML5 Canvas rendering, including strategies for clearing/reusing the canvas, syncing game progress to a refresh rate, and since this application uses the VueJS framework, properly registering interval-based code so that it works properly with the VueJS lifecycle. To add substance for A4, users are now able to customize the player and food colors using sliders (several colors are pre-selected), bringing the total user-modifiable parameters up to the four required: the player's X position, the player's Y positoin, the player's color, and the food's color. Additionally, navigation buttons (to move the player up, down, left, or right) were added, so that users on mobile devices could still play the game without needing a keyboard. One additional challenging bug was somewhat improved: the original game listened to all keystrokes triggered on the webpage, which could cause issues if the user entered a name that contained letters in WASD, or if the user tried to use arrow keys to navigate through the input options. By listening only to keystrokes on the canvas, this unintentional behavior should be fixed.

a4-creative-coding's People

Contributors

charlieroberts avatar liamrathke avatar

Watchers

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