Hi,
I want to develop a painting game released on the web and using HTML5 (canvas) and JavaScript.
This game will put yourself in the shoes of a painter which have to paint walls or areas.
The goal is to have only the inside of an area painted without painting on the outside of this area.
The score is calculated according mainly to :
- The area which is actually painted and had to be painted. (The more is painted, the higher is the score). I'll call it valid points.
- The outside of the area which had not to be painted and is painted (The more is painted, the lower is the score). I'll call it invalid points.
Due to the web platform, and for performance reasons, I approximate theses value by using the Monte Carlo Method.
The area can be a polygon so I use a rectangle which include all the area points to define the domain (I add more or less 20px each side or the rectangle to spot all possible invalid points).
I then randomly generate a certain amount of points to execute my tests and then come my problem :
I want to use a Game Engine or a Framework with basic game development functions (like Phaser or EaselJS) due to the ease of use and the performance they offers. The fact is I can't find one which allow pixel color comparison, or at least pixel selection.
Maybe I'm not searching for the right thing.
I really need you help just to put me on the track as I don't want to start developing without being sure this kind of game is feasible.
Thank you for reading this long post.
[attachment=23890:AlgoMonteCarlo.jpg]