Petit Computer Wiki
Petit Computer Wiki
Advertisement

Warning: If you're prone to epileptic seizures, please do NOT use this program or any programs which may include these functions.

This program shows you how to perform text color manipulations to produce real-time effects like rainbow color-changing text and text which fades in and out. This program will utilize the last color in the BG (background tile) color palettes 12, 13, 14, and 15. That shouldn't be that big of a deal, but if you're not careful, you might find that your maps suddenly exhibit rainbow/flashing qualities too.

The Effects[]

This program works in such a way that it "replaces" some of the original text colors with these fancy new colors. The effects are:

  • Rainbow text (color 15)
  • Party text (color 14)
  • Fade in/out text (color 13)
  • Crazy text (color 12)

So to use the effects, just set the text color to the ones mentioned above.

How to use[]

The program has an initialization function, @RAINBOWINIT, which you should call at the beginning of your program ONCE. It has another function called @RAINBOW which you should call in ALL loops in which: text is visible, and: a VSYNC 1 command is called. Now you can simply print text in color 12-15 using the COLOR command to get your special text effects! Just like any old COLOR command, you can mix and match colors/effects to do whatever you want.

The Built-In Example[]

If you're not sure what the heck is going on, just run the program and see what happens. Once you've seen the effects, look at the example portion of the code (the beginning) to see what I'm doing. I'm basically just calling COLOR 15, then printing out some text, then calling COLOR 14, 13, 12, etc., each while printing text. Finally, I enter a loop, which you can think of as your "game loop". Here, I call the @RAINBOW function, which is what produces the effects.

Feel free to use this in any of your programs. You don't even have to give me credit, although it would be nice if you did

Text Effects (RAINBOW)
Advertisement