Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - GlaDOSik

#1
Modules, Plugins & Tools / MODULE: RGB filter
Sat 28/12/2013 20:28:25
This module makes very nice effect of an old computer screen. But it's pretty slow, so it's recommended to use it on smaller pictures. How to use it?

- download RGBfilter.zip
- in project tree, right click on Scripts, choose Import script... and choose RGBfilter.scm
- in RGBfilter.ash is written everything you need to know
- still don't know what to do? Open the tutorial project.
- yes, you can use it and modify it as you want

Updates:
- parameter ColorFilter is added to the function RGBfilterRenderer. It allows you to suppress colors you want. There is an opportunity to design really cool puzzles based on filtering colors. Tutorial is updated.





DOWNLOAD (source and demo)

You can try executable demo:
Download
#2
Advanced Technical Forum / Fonts and FontForge
Wed 11/12/2013 22:51:36
Hi,

I know. Another topic about fonts. This character limit is killing me. My question is simple. How to find out in FontForge, which characters AGS uses? I know it's first 255. But when you open this font: http://www.fontsquirrel.com/fonts/Caviar-Dreams - character with number 165 is this Â¥, but AGS shows unknow character (this one Ã,, has number 272 and it shows correctly) so I guess that numbering doesn't match.
#3
Hi,

I'm working in AGS on RGB filter. It uses GetPixel on small sprite (160x100) and then render images (16000) made of 3 colors like pixel on monitor does. It uses 2 functions. The first one iterates through all AGS colors (0-65535), separets RGB colors, renders dynamic sprites (pixels) and save them into the dynamic sprite array. And here is the problem and I can't find the solution. It looks like my function works to number 29998. All above that (29999-65535) throws null pointer error. Code is here:

Code: ags

function initScreenRen(){                    //initScreenRen() is called once in room_AfterFadeIn()
  
  int pixelCounter;                         //pixel counter
  pixelImg = DynamicSprite.Create(3, 3);    //creates dynamic sprite for pixel 3x3 px
  
 while (pixelCounter <= 65535){                     //iterates through all AGS colours and makes pixels for them
  
  bool highBit = true;                              //AGS color to RGB
  if (pixelCounter > 65535) pixelCounter -= 65536;
  rgb[0] = ((pixelCounter >> 11) & 31) << 3;
  rgb[1] = ((pixelCounter >> 6) & 31) << 3;
  rgb[2] = (pixelCounter & 31) << 3;
  if (highBit)
  {
    rgb[0] = rgb[0] | 7;
    rgb[1] = rgb[1] | 3;
    rgb[2] = rgb[2] | 7;                            //end AGS color to RGB
  }

 DrawingSurface *pixelSurface = pixelImg.GetDrawingSurface();               //draw subpixels into pixelImg      //CO KDYBYCHOM VYKRESLOVALI PŠ˜àMO DO BANKY PIXELŠ®?
    pixelSurface.DrawingColor = Game.GetColorFromRGB(rgb[0], 0, 0);
      pixelSurface.DrawLine(0, 0, 0, 2);
    pixelSurface.DrawingColor = Game.GetColorFromRGB(0, rgb[1], 0);
      pixelSurface.DrawLine(1, 0, 1, 2);
    pixelSurface.DrawingColor = Game.GetColorFromRGB(4, 4, rgb[2]);          //end draw subpixels into pixelmg 
      pixelSurface.DrawLine(2, 0, 2, 2);
  pixelSurface.Release();    
  
  pixelBank[pixelCounter] = DynamicSprite.CreateFromExistingSprite(pixelImg.Graphic);     //move pixelIMG to array of dynamic sprites pixelBank 
  
  pixelCounter++;           //iterates the color to 65535
 }
 
  object[0].Graphic = pixelBank[29999].Graphic;   //null pointer? why? it iterates to 65535
  }


Header is here:

Code: ags

DynamicSprite *pixelBank[65536];
DynamicSprite *pixelImg;
int rgb[3];
import function initScreenRen();


Any help is appreciated. Thanks.
SMF spam blocked by CleanTalk