Dougal - I

By Dougal Henken
/* One of the things i loved most when I was younger was playing the video game Pokemon. The pixel art style of the scenery and architecture has always been something I can identify with and appreciate. So I wanted my buildings to resemble the buildings found in the original Gameboy Pokemon games. Simple, office building like structures. Since these buildings are so basic (2 Squares), to signfy them as buildings, two "for" structures draw in windows, dependent on the width and height of the building. Pixel art grass has been added in the background simply for nostalgic effect. */ PImage grass; void setup(){ size(400, 400); grass = loadImage("grass_full.png"); } void draw(){ strokeWeight(1); image(grass, 0, 0); building(38, 45, 50, 50); building(140, 30, 78, 100); building(260, 30, 118, 130); building(23, 150, 78, 130); building(150, 180, 58, 90); building(270, 200, 98, 70); building(23, 320, 78, 70); building(133, 320, 98, 72); building(300, 310, 38, 85); } //building + roof void building(int x, int y, float bw, float bh) { float wx = 170; float wy = 263; fill(252, 409, 206); rect(x, y, bw, bh); fill(193); rect(x, y, bw, -30); for (int i=x; i<x+bw; i+=20){ for (int j=y; j<y+(bh-54); j+=20){ windows(i, j); } } } //windows void windows(float wx, float wy) { fill(62, 188, 193); rect(wx, wy, 18, 13); }

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*