For my conference project, I decided to keep working on the game I’d started working on for the Black & White Exercise #2 assignment. I wanted to expand on the game and make it more interactive and playable. I want this game to be more exploratory – I want the player to have multiple choices and goals and outcomes. Since I want the game to invite users to explore I’m titling the game “Come and Play.” (I also think that title is a little bit creepy, and I want this monster game to be a little creepy.)
For the next lab I wanted my race to the end monster lab to be a simple game where you avoid objects moving up and down the screen to reach a safe zone. Basically it is the idea of the world’s hardest game. (if you don’t know what that it, google it and you’ll get the idea). So for my game I had 4 elements. I had the player, a circular dragon (at the top of the screen), a town(bottom left of the screen), and a number of squares that would be bouncing from the dragon to the bottom of the screen. The goal is to get your player across the fire and into the town without being killed and then eaten by the dragon. And so after getting the interface down, the next part was motion. Getting the squares to move and bounce was simple and so it was time to get to collision. This is where I had the most trouble and still have trouble today. When I write the collision code in and I declare all of its necessities. The game just ends up lagging/going slower and the collision is still non existent. I am not sure what exactly I am doing wrong, but one thing is for sure and that is that there is no working collision in this game :/.
For my second game I included a ‘monster’ and three ‘children’. The monster comes out at night and disappears in the day. At night it chases the children represented by circles and attempts to eat them. There is an element of player choice insofar that they can choose when to instigate night. Clicking or tapping on the right side of the screen slowly transitions the screen to night and the monster appears. To reverse this and bring about daytime, the player taps and holds the left side of the screen. To handle the monster eating the children. I had to add collision detection and constantly check for hits. In addition, mouse x values were necessary to trigger the transition from day to night. the ‘children’ and Monster’s movement was handled by a bounce function which simply reversed the velocity when the object reached the edges of the screen. If I do add to the game, I think it would be interesting to have more ‘children’ and then when the player starts the night phase I could randomly select one of them to become the monster. It might also be interesting to play with the Monster’s movement and have a more aggressive but controlled area for it to patrol. Then the actual timing of night and day phases will matter more for the player.
When I first approached the prompt for this exercise, I was stumped as to how I could possibly represent all the different events of the narrative using only simple shapes and little color. After tinkering with the code for quite some time, I ended up with a simple game that relies timer-driven animation to portray a narrative. I drew my ideal narration in my sketchbook: And from there, I made this game: State 1: Day Turns to Night The game actually begins with a totally white sky, rather than a light grey sky (as in the picture), but it’s been hard to screen shot the white “day” background before it begins to change color. Each second after the game starts, the sky darkens until, on the fourth second, the sky reaches its darkest grey. State 2: The Monster and the Moon Appear After the sky has stopped changing color – and also after the fourth second – the Monster appears from within the village, and the Moon descends from the sky. You can just see the Moon peaking out of the top of the screen in this picture, and the curve of the Monster traveling through the village. State 3: The Moon Becomes Moveable Once the Monster has reached a certain point on the screen (about two thirds of the way across), it stops. The Moon also stops after its vertical descent. Once both objects have stopped moving, the player can move the Moon by touching the screen. This change is a timed event that happens sixteen seconds after the game begins. I’ve debated how to make the player aware of the movability of the Moon, but right now I’m relying on the player to find out just by playing with the interface a bit. State 4: The Monster Eats the Moon & Breathes Fire If the player moves the Moon inside of the Monster, both the Monster and the Moon become red, and the Monster spits out a fireball, which moves towards the village. State 5: The Monster Burns the Village Once the fireball reaches the village, the village buildings become red as the fireball passes through them… …until all the village is on fire, and the game is over. Eventually, I’d like to add more fireballs that each burn a building in the village separately, and a better win state. This prompt really inspired me to create a story, and I think that ultimately drove me to focus more on coding an animation, rather than a true game. I have four classes in the game: a Monster class, a Fireball class, a Moon class, and a Village class. I think that my next step will be to use the classes to create more objects and obstacles that make the goal of burning the village harder to accomplish. -Annie
The Son of Thomas was originally based on me naming the first square that I coded, Thomas. However, as the story goes, the square coded as Thomas is actually a monster that shoots out fire that can hit the real Thomas, or his son, which are at the bottom of the screen (the monster is at the top). Thomas’s son bounces along the x axis, and Thomas is controlled by the mouseX coordinates of the player, with a fixed Y value. When Thomas collides with his son, the son bounces against him, and gains a small value of movement speed. As the game progresses, Thomas’s son gets more frightened, and runs quicker and quicker. The monster first shot fire out of only one x location, at 400, but I coded it to shoot at a random position, and then an approximation close to Thomas and his son. If the fire hits Thomas or his son, the score counter stops, and the game ends.