Inspiration
Minecraft is one of my favorite games, and I thought why not I make a simpler version using programming.
What it does
This game I made is a 2d version of Minecraft, and the player can move with arrow keys and place blocks with different letters.
How I built it
First I did the basic html web designing part, in which I added some bootstrap links, text elements, uploaded a background, and then added a canvas. Then I worked on css where I positioned my background, gave a style to the canvas, and other elements. I added the fabric.js library. Fabric.js is a javascript library that basically adds an interactive platform that works with the html canvas. Finally, I worked on the javascript, where I added the height and width of the blocks. I used addEventListener, e.shiftKey, and if conditions to enable the user to control the player and add different blocks using different keys. I downloaded the image blocks from google.
Challenges I ran into
Sometimes I received errors in the console, mainly from the javascript code. Sometimes I had incorrect syntax, in which I inspected the console, and debugged the code.
Accomplishments that I am proud of
Whenever I made syntax errors, or errors of any such, I persisted and didn't stop until it was fixed. I am proud of the output, and the input.
What I learned
I learned many new concepts along the way such as javascript, html, and css properties. I also learned to persist and keep going in order to accomplishing your goal.
What's next for Minecraft 2.1
Once my users get familiar with this app, I will eventually add mobs such as monsters, chickens, and more. I will also add different biomes.
Log in or sign up for Devpost to join the conversation.