Today, I built my first ever game from absolute scratch. i am coding Cursor Combat, a browser-based game focused on aiming training. I started off by getting my IDE (VS Code) ready and laying the basic HTML foundation. Then, I went in with CSS to create some style elements. I added a dark background, transformed my default cursor to a sniper reticle, and crafted a white ‘Arena’ using position: relative and overflow: hidden that holds our target ball, effectively trapping it in place. The real highlight, though, was writing my first snippets of JavaScript! I implemented an event listener to update the score every time the ball is clicked. My clicker ball is also instantly teleporting all over the place within the Arena thanks to the magic of Math.random(). It definitely took some fiddling with coordinates and debugging some math functions to ensure the ball remained safely within the bounds of the Arena. Day one done, next stop is a timer, challenge you all to beat my score in 30 seconds when this thing’s finished! Let’s get it. 🔥
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.