Author Topic: Version 1.3.4  (Read 3056 times)

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Version 1.3.4
« on: September 13, 2014, 08:51:01 AM »
Hi, this retro thing is still in development. I will upload the next version tomorrow evening. I added some nifty image functions like loadimage, putimage, getimage and saveimage. But since this is still based on older technology it is not possible to load images in a "normal" format, e.g. bmp, png or jpg. Images can only be used if they are in the Borland BGI format, so I added a program to first convert any image into a text file which can be loaded and drawn pixel by pixel from a ChipmonkeyLua script. It is then converted via getimage and can be saved with saveimage. To illustrate the process, here are some screenshots:







But what's the benefit over drawing pixel by pixel you might ask ... Well, it's all about speed. Here is a comparison, first screenshot shows drawing the knight pixel by pixel, second shows the putimage function. Actually, if you want to have transparency you'll need to draw the image twice as it is done in the third of the screenshots above (which is still much faster than using pixel by pixel drawing). One image needs a white background colour, the second one needs a black background colour which is done for you by the script.





The putibit in the putimage function means the following:
 
Code: [Select]
  CopyPut = 0
  XORPut  = 1
  ORPut   = 2
  AndPut  = 3
  NotPut  = 4

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: Version 1.3.4
« Reply #1 on: September 13, 2014, 09:27:05 PM »
You can now download the interpreter on http://cmb.retrogamecoding.org/