Coder Social home page Coder Social logo

phianova / mudlark Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 106 KB

JavaScript, HTML Canvas and CSS game about treasure hunting in a riverbed

Home Page: https://phianova.github.io/mudlark

HTML 9.92% JavaScript 50.31% CSS 39.77%
css html html-canvas javascript

mudlark's Introduction

phianova.github.io

Hi! This is the code for a short game I built, to support my application to the Founders and Coders programme. It is built entirely in HTML, CSS and vanilla JS as per the brief of the application.

It was the first game I had ever built, as part of the first website I ever built.

Building the game was a real challenge for me. I had a clear idea of the story and what I wanted the game to look and feel like, but starting from scratch initially felt quite intimidating. I started by looking a couple of tutorials to get the gist of the standard elements needed to build a game. I initially followed some of this tutorial: https://www.codewizardshq.com/javascript-games/ to get an idea of how to set up a game environment using HTML Canvas. I also used this guide: https://www.w3schools.com/graphics/game_intro.asp to help me understand the capabilities of the canvas and how to go about designing standard game elements. I later borrowed the idea of a "toggleScreen()" function from this video: https://www.youtube.com/watch?v=FwLMz7jMRac which I found really helpful as I wanted my game to have a clear story. As I went along, I decided between different ways of implementing game elements that I had seen, and refined my code to reflect my game's actual needs. The first thing I did was code the movement of the player and the dog, and determine what happened when they collided. I then focused on my hidden items, and worked out how to randomly assign both their position and their type. I then created my starting screens, and used the same method to implement the screens that display when the items are found. Then, I created the scoring system and determined the conditions to win the game and what happened when that was achieved. I decided the game needed a tiny bit more of a challenging/competitive element so I added a timer. If I had had more time, I would have added further levels to the game, with additional dogs to make it more difficult. I also had planned to try and include a second area which the player could access via the leftmost border of the screen to make it harder to find the hidden items. The "tide coming in" screen that displays once the game has ended was also in my initial plan! I wanted to have that happen during the game, cutting off some of the game area to make it more difficult to find the items. I may make these changes at a later date! All of the code for the game is contained in the linked repository: https://github.com/phianova/mudlark/

mudlark's People

Contributors

phianova avatar

Watchers

 avatar

mudlark's Issues

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.