Color Coding

Monkey Forums/Monkey Beginners/Color Coding

En929(Posted 2015) [#1]
I was wondering does Monkey X have a color coding system? For example, in making a game, lets say I'd want to create an effect such as: If a character hits a certain color (and only that color), it would equal a collision.

I hope what I said above makes sense. I think Java had a color coding system as describe above but how about Monkey X? Thanks!


dawlane(Posted 2015) [#2]
The MonkeyX frame work hasn't got rudimentary bounding box/circle to circle collisions built-in. So with that in mind you can guess what the answer will be.
The closest you will get to it would be to use ReadPixels to make your own. But using these functions are slow, especially on certain platforms.


En929(Posted 2015) [#3]
Ok, thanks Dawlane


rIKmAN(Posted 2015) [#4]
It depends what type of game you are thinking of and how you implement the rendering.

For example if you used a tilemap it would be pretty easy so see what coloured tile the player was over, but if you are talking on the per pixel level dawlane has already answered and pointed out the downside.

Would a simple RectsCollide() function do what you are after?

More info needed I think.