Artificial intelligence/templates/examples/rts/rpg/strategy ect. in MonkeyX/CerberusX language. You can download the free version of MonkeyX from itch.io or Cerberus-x.com The Flash applets will stop working in around 2020.
Below code that shows you how to create an image and fill it using colors that are made up by hex values ($). $FFFF0000(red not transparent)
Code below :
Import mojo Class MyGame Extends App Field image:Image Method OnCreate:Int() SetUpdateRate(15) image = CreateImage(320, 200) Local pixels:Int[320 * 200] For Local i:Int = 0 Until 320 * 200 ' $alpha(00=fully transparent, FF = not transparent) ' folowed by red(00-FF),green(00-FF),blue(00-FF) pixels[i] = $FFFF0000 Next image.WritePixels(pixels, 0, 0, 320, 200, 0) End Method OnRender:Int() Cls() DrawImage(image, 10, 10) End End Function Main:Int() New MyGame() End
Note: Only a member of this blog may post a comment.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.