I have no idea about performance. But it is possible to draw shapes in images that you can create. As far as I know every shape command can be used inside images. You can then use drawimage to draw these images.
Being that the language is so new and not thoroughly tested, Can you just create some test to determine what is faster?
I suspect that DrawRect is faster than Drawing a bitmap since each pixel is not scanned for color content.
I usually don’t test to see which is faster but just test if what I am doing is fast enough for my purpose. if it is, I stick with it else I find an alternative if possible.
On my game that I am making “Mission patrol” I use DrawPoly and is fast enough to draw all of the backgrounds of the game so I never bother to test if drawing images is faster.
If you’re just drawing rectangular shapes, there’s likely to be little to no difference speedwise. Unless your trying to draw a gazillion things, I’d stick with images just ‘coz they’re simpler and more flexible, ie: you can draw anything you want!
Have a look at the rendertoimage banana for a simple example of how to pre-render shapes to an image.
You must be logged in to reply to this topic.
Monkey2 is an easy to use, cross platform, games oriented programming language from Blitz Research.