Page 1 of 1

Short and fun!

Posted: Sat May 02, 2015 5:26 am
by rrTea
Here are some experiments I composed while either researching various ZGE features or during lunch breaks etc. Nothing spectacular (neither artistically nor technically) but maybe it'll be of interest to non-programmers new to ZGE (like me). I think there can never be enough of fun snippets to study - and I'd like to see others post theirs in this thread!

So the first one just draws colorful lines on the screen, that's it!
Here is the code on Pastebin. If anybody sees some glaring mistakes... I'd like to know if it can be done in a simpler / better way!

Posted: Tue May 05, 2015 1:08 pm
by Imerion
Nice! Could indeed be fun to learn from and so.

Funny rainbow

Posted: Wed May 06, 2015 5:26 am
by rrTea
This one draws a rainbow that reacts to mouse position. I actually saw someone do something like this in some other programing language and thought it'd be fun (and easier probably) to make it in ZGE. Change the "NumberOfBars" constant for different number of Rainbow fields!

There's even some plink plonky sound so don't forget to turn the sound on!

Uses Kjell's HSV library (see here for the current version, which is also used in this example).

(Code on Pastebin)

Compass

Posted: Thu May 07, 2015 2:35 am
by rrTea
Here's an old one! I think this one was written while I was studying the relationship between the mouse position and the screen? It's pretty awkward (I'd do it differently if I were to write it now) but works.

Posted: Sat May 09, 2015 8:25 am
by rrTea
Another one imitating something similar I saw somewhere. Here the effect is achieved by spawning Models - considering it's just a few tens of them it doesn't have any serious effect on framerate, but if it were part of a bigger project (a game or something) I'd probably try to do it with particles instead.

Alright I guess it's time to stop constantly bumping this thread for now :)

Posted: Sat May 09, 2015 11:33 pm
by Imerion
Nice effects! I'm interested in the compass one. Could you post the code for that?

Posted: Sun May 10, 2015 12:49 am
by rrTea
Here it is (->). Looking back at it... it's not very good. Still, it works so I like it.

"Congratulations Player one!"

Posted: Fri Jun 26, 2015 10:09 am
by rrTea
A simple effect for animating text. I always forget the exact numbers to achieve this effect so here goes! (code on hastebin)

Uses Amiga fonts from Daniel's collection.

Posted: Mon Jun 29, 2015 7:31 am
by VilleK
Always nice to see old Amiga fonts (although I was more of an Atari ST guy but those fonts appeared on both machines). :)