Digital Media Essay

A video game is played by electronically manipulating images produced by a computer program on a television screen or other display screen. Since the early 1970s, these games have became popular all around the world. Children, teenagers, and adults alike all love playing these games- even more than going outside. There has even been an incredible increase in the number of Youtube channels that feature people just playing their favorite video game. There’s also sites like Twitch to do the aforementioned.

A couple years ago, I made my own little video game. In high school, I took a robotics class where we built and programmed robots. It was fun but my teacher went on maternity leave and we eventually got a substitute for a week or two. This substitute introduced us to Scratch- a fun game maker. This was an easy way to program your own fun computer game. My game had a character that resembled a popular meme of Spongebob Squarepants. The game also had a multitude of things falling from the sky and a background that looked just like that of Spongebob’s. The goal of the game was to use the left and right keys on your keyboard to move Spongebob and catch the falling objects before they touched the ground. It was very fun to make and even more fun to play.

I hope more kids are introduced to this program and are able to make their own fun games. We need more girls especially in this field and what better introduction is there?

Animation ( a game )

<!DOCTYPE html>
<html>
<head>
<script type=”text/javascript”>
var leftKey = false;
var rightKey = false;
var upKey = false;
var downKey = false;
var spaceKey = false;
var GAME_SPEED = 1000 / 60; // game rate
var x = 100;
var y = 100;
var sideLength = 10;
window.onload = function(){
c = document.getElementById(“myCanvas”);
c.width = window.innerWidth*0.9;
c.height = window.innerHeight*0.9;
window.setInterval(“draw()”, GAME_SPEED);
}
document.onkeyup = function(event){
switch(event.keyCode){
case 37: leftKey = false;
break;
case 39: rightKey = false;
break;
case 38: upKey = false;
break; // up
case 40: downKey = false;
break; // down
case 32: spaceKey = false;
break; // space
}
}
document.onkeydown = function(event){
switch(event.keyCode){
case 37: leftKey = true;
break;
case 39: rightKey = true;
break;
case 38: upKey = true;
break; // up
case 40: downKey = true;
break; // down
case 32: spaceKey = true;
break; // space
}
}
function draw(){
var c = document.getElementById(“myCanvas”);
var cntxt = c.getContext(“2d”);

cntxt.fillStyle=”#00FFFF”;
cntxt.fillRect(x,y, sideLength, sideLength);
if(leftKey == true){
x–;
}
if(rightKey == true){
x++;
}
if(upKey == true){
y–;
}
if(downKey == true){
y++;
}
if(spaceKey == true){
sideLength++;
}
}
</script>
</head>
<body>
<canvas id=”myCanvas” style=”border:5px solid #000000;”>
</canvas>
</body>
</html>