PRISON BREAK

Rui Wang
Rui Wang
Published in
3 min readSep 18, 2018

This is my second week to do ICM works. After the first week, I feel a little bit more confident on my coding, however, my skills are still so weak.

First, I learn how to use the mouse control function to create changes by moving the mouse in the canvas. I think this function is really cool, for it builds more interactions with the users who play with it. Some other similar functions like mousePressed, mouseReleased. Yet I still got some mouse-related functions that I didn’t catch up with, I will try next time~

This is a demo which shows the background color is changing by moving the mouse to different positions. I enjoy the process watching the gradient color because it makes me feel relaxed.

Background color is changing by moving the mouse.

Next, I try to create different shapes every time I run the program, so I use the ‘random’ function to get random points in the Setup. Then, draw random lines by using 4 random control points. And I can get those random lines.

Get random curve lines.

And then, I start to think about something interesting that I can build by using the functions that I have grabbed. I decide to make a Maze Game~

There’re several things that I need to include in my project.

  1. A random map: the routes should be changed each time I run the program.
  2. A character : might be hero? Anyway, he or she should follow your mouse.
  3. A condition: set a rule for the game; like if …then you are fucked up~

After a few hours……(I know my code is not smart, I used a lot of stupid ways to build it. But, finally, I did my demo. I call it- PRISON BREAK.

Let’s see what happened.

Yeah, that’s my story.

Actually, you can, just go through the maze without praying to god(I won’t do that), each time you hit the wall you can get a quick view of the map to know where the exit is. And you may ask why the light is colorful, I would say god is a very mystery person, so the light you got from him may not be similar to the light you see everyday in your life.

You can hit the wall anytime you want, maybe next time, I will set a healthy bar, each time you hit the wall, your blood will bleed, that’s scary. And you should be really careful.

So, this is my first time to create a game in web. Hope you like it.

FULL SCREEM VIEW :

https://editor.p5js.org/full/B1D2fqt_X

THANKS~

--

--