Your browser does not support the canvas tag.

drivingGameV3

This version addresses a few problems in porting version for Processing to Processing.js. 1. Needed to add fill(255) before every occurrence of image() call or images were colored 2. image method treats width & height args differently. Image window is resized but image is not, so args were removed. 3. Still problems displaying images at correct dimensions in P3D env. Smaller images seem to stretch to dimensions of biggest image. Tiling checkered win flag in a loop to use a smaller image helped with most of this. 4. createFont size and alias args are ignored. Instead used size arg in textFont method call.

Todo: Z-pos of road markers puts them in front of car and santa. The way image() works prevents using width and height args to move car forward and make it smaller. Also would like to add another level at some point.

Image credits: http://www.shutterstock.com/pic-53683930/stock-photo-a-cartoon-santa-claus-with-a-scared-expression.html
http://www.formula1.com/news/headlines/2011/1/11675.html
http://www.dansgraphicsworks.com/gallery/flags.html

Source code: drivingGameV3

Built with Processing and Processing.js