Venture into "The Shadow of Luminara," where epic battles await against gremlins and dragons. Gather gold from your conquests to upgrade your gear at the shop and prepare for the climactic battle with the Shadow Emperor. Can you defeat the tyrant and save Luminara?
Link to project: https://myfirstgameishere.netlify.app/
Tech used: HTML, CSS, JavaScript
This was my first real attempt at combining all the little tid bits of JavaScript I've learned so far. To start, I've used 'let' to create variables that I intended to change and 'const' for variables, objects, and arrays that I knew were going to be... well... constant. I got really good practice using the document.querySelector method, I've heard this is a much more simple process in react and I look forward to getting to that point. I really let myself get lost in encapsulation. I was able to create a locations array, from there I was able to store objects inside that array, and each object contained values I could send to the dom depending on which location the user was in. This was wonderful and really saved me from having to re write functions that would change the dom depending on the location of the user. I wrote functions that would change the location and update the dom accordingly. This gave me the ability to change the story text, the background color, the image, and the button values. There are also functions that update the health and gold values, giving the game some interaction that users can actively keep track of and watch change. There is a clever little easter egg hidden as well for users to come across. I can't let myself spoil the surprise of how it works here.
I'm very happy everything works great. I don't get any erros and I've given key value pairs to everything possible to avoid using document.querySelector over and over again.
I got wonderful practice working with arrays and using their indexes. I got insight into how useful objects can be and how great it is to be able to keep code organized with them. I've also developed a pretty solid understanding of how to grab things in the DOM with JavaScript.
