jeudi 26 février 2015

How to fill out image with a color?

I searched google, didnt find any samples of this game.


I need to make a simple game, using jQuery or HTML5 canvas or anything, except flash.


My sample image is the following labirinth:


http://ift.tt/1EukVQy


I need to with fill out a green line with an other color, step by step with mousemove. And if my mouse mouse goes in a wrong space, it should alert.


I saved all of the pixels in an array, and if its good with +-10 pixels, it would fill it with a color or an image, but I guess this logic is a wrong way. It doesnt work very well, and maybe there should be an image manipluation the good way to work this out.


I worked with this the whole week, but I am nowhere, where can I start?


Aucun commentaire:

Enregistrer un commentaire