Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,534 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Semi-dynamic space cube script #150547
08/27/07 18:20
08/27/07 18:20
Joined: Nov 2003
Posts: 170
Tachys Offline OP
Member
Tachys  Offline OP
Member

Joined: Nov 2003
Posts: 170
I know this is a bit of a teaser, but I'm at work right now and will post the script as well as a link to a zip file with a single room demo level with all (hehe... all 3...) resources when I get home. Posting this now because I've been meaning to do so for a while, and never got a round to it.

A little background: For a while, I've been working on a kind of Ultima virtues tutorial... something for my kids to walk through and learn about the Ultima system of virtues as they go. One of the rooms was to be an Ethereal realm type of thing from the later Ultimas... with twinkling stars and such.

I tried to dig up a simple star cube that fit what I was looking for, to no avail. So I created a simple starfield texture with Photoshop and tried applying that to first a block cube in WED, then to a model cube in MED. The only problem with these solution, is that it all looked so flat, and the black just didn't seem black enough.

So, I created a few small, simple star textures, and then a script that randomly placed them in a specific area. The result was something that seemed to have a bit more depth than either of the previous static attempts. The drawback is that it's particle based, and would probably need a trigger to activate it when it is about to come in sight, and shut it down when the player couldn't possible view it to keep it from hogging system resources.

Like I said, I'll upload this later on tonight, but I am posting this to (a.) prompt me to overcome my procrastinating tendency, (b.) gauge the desire/need/etc for something like this and get tips/critiques on it, and (c.) just share something on the off chance that someone was floundering around like me and save them some time.

Some other ideas that came to mind would be to widen the random number range a bit and make it so that it placed a much greater proportion of very small stars, followed by a small percentage (~10% maybe) of medium stars, and then a much smaller percentage of starbursts (~3%) and possibly animate them so they grew in size, spun, and shrunk and faded out, and then a very small percentage of the time (~ .5-1%), generate a shooting star.

Feel free to post on this idea and I'll put it up later.

Re: Semi-dynamic space cube script [Re: Tachys] #150548
08/27/07 20:10
08/27/07 20:10
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
I'm very interested to see it.
Seems to be a nice effect!

Re: Semi-dynamic space cube script [Re: Pappenheimer] #150549
08/28/07 01:20
08/28/07 01:20
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
i cant download it. the link isnt working.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: Semi-dynamic space cube script [Re: Blink] #150550
08/28/07 02:03
08/28/07 02:03
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
He hasn't posted a link and you're already complaining about it not working. That's what I am calling fast...

The effect could be interesting. Maybe creating some static and larger objects like galaxies could even be well looking...


Always learn from history, to be sure you make the same mistakes again...
Re: Semi-dynamic space cube script [Re: Uhrwerk] #150551
08/28/07 04:13
08/28/07 04:13
Joined: Apr 2005
Posts: 3,815
Finland
Inestical Offline
Rabbit Developer
Inestical  Offline
Rabbit Developer

Joined: Apr 2005
Posts: 3,815
Finland
He's using download bot and complains for it isn't working? o_O

Feels like great effect, upload it already!


"Yesterday was once today's tomorrow."
Re: Semi-dynamic space cube script [Re: Inestical] #150552
08/28/07 13:18
08/28/07 13:18
Joined: Nov 2003
Posts: 170
Tachys Offline OP
Member
Tachys  Offline OP
Member

Joined: Nov 2003
Posts: 170
***grins*** sorry for the delay.... just a huge comedy of errors last night. I'll post it up later today, promise!

I'll edit the original post to put the links there!
Edit: weird.. will only let me edit this post...

Anyway, here is the script for the effect, along with links to the images I made for it.

The script is designed for a 3k x 3k quant area in A6, using A5 template scripts, and is made up of three actions, back, left and bottom. Just create an invisible dummy map entity and place it appropriately (2 left (left and right sides), 2 back (front and back sides) and 2 bottom (top and bottoms sides), 6 total) and assign it the correct action. Like I said, for right now, it only places the three different types of stars randomly (they also decay, so it gives it a twinkle effect)

Script:
/***************************************************
torch.wdl, created with EasyParticle 3.1.
This script can be used free and without credits.
How to use:
Implement the script via include <torch.wdl>; in your main WDL file.
The action name is: torch_action
If you recognize any mistakes in the script, please contact the support ( Support@EasyParticle.de ).
Have fun with the script
TripleX --- Hawkgames
*****************************************************/
bmap starBmap1 = <sstar.bmp>;
bmap starBmap2 = <mstar.bmp>;
bmap starBmap3 = <sburst.bmp>;
bmap starBmap4 = <sstar.bmp>;
bmap starBmap5 = <sstar.bmp>;
VAR torchAnzahlPartikel = 8.804; //number of particles used for this effect
VAR starmap = 0; //number of particles used for this effect


Function torch_spec_fun()
{
my.skill_b += 0.02;
my.skill_c = 15 - my.skill_b;
if(my.skill_c < 0) { my.lifespan = 0; }
}

Function torchspezial_back()
{
starmap=int(random(5)+1);
my.x -= int(random(2915)+1) ;
my.y += int(random(64)+1) ;
my.z += int(random(2915)+1) ;
my.blue = 128 ;
my.green = 128 ;
my.red = 128 ;
my.skill_c = 0; my.skill_b = 0;
if (starmap != 1)
{
if (starmap != 2)
{
if (starmap != 3)
{
if (starmap != 4)
{
my.bmap = starBmap5; //the effect bitmap
my.size = random(4);
}
else
{
my.bmap = starBmap4; //the effect bitmap
my.size = random(4);
}
}
else
{
my.bmap = starBmap3; //the effect bitmap
my.size = random(48);
}
}
else
{
my.bmap = starBmap2; //the effect bitmap
my.size = random(16);
}
}
else
{
my.bmap = starBmap1; //the effect bitmap
my.size = random(4);
}


my.gravity = 0 ;
my.streak = off;
my.flare = off;
my.bright = off;
my.beam = off;
my.move = on;
my.transparent = off;
my.function = torch_spec_fun;
}


Function torch_back()
{
while(1)
{
torchAnzahlPartikel = max(1,random(1));
effect(torchspezial_back,max(1,torchAnzahlPartikel*time),my.x,nullvector);
wait(1);
}
}

Function torchspezial_left()
{
starmap=int(random(5)+1);
my.x += int(random(64)+1) ;
my.y += int(random(2785)+1) ;
my.z += int(random(2915)+1) ;
my.blue = 128 ;
my.green = 128 ;
my.red = 128 ;
my.skill_c = 0; my.skill_b = 0;
if (starmap != 1)
{
if (starmap != 2)
{
if (starmap != 3)
{
if (starmap != 4)
{
my.bmap = starBmap5; //the effect bitmap
my.size = random(4);
}
else
{
my.bmap = starBmap4; //the effect bitmap
my.size = random(4);
}
}
else
{
my.bmap = starBmap3; //the effect bitmap
my.size = random(48);
}
}
else
{
my.bmap = starBmap2; //the effect bitmap
my.size = random(16);
}
}
else
{
my.bmap = starBmap1; //the effect bitmap
my.size = random(4);
}


my.gravity = 0 ;
my.streak = off;
my.flare = off;
my.bright = off;
my.beam = off;
my.move = on;
my.transparent = off;
my.function = torch_spec_fun;
}


Function torch_left()
{
while(1)
{
torchAnzahlPartikel = max(1,random(1));
effect(torchspezial_left,max(1,torchAnzahlPartikel*time),my.x,nullvector);
wait(1);
}
}

Function torchspezial_bottom()
{
starmap=int(random(5)+1);
my.x -= int(random(2785)+1) ;
my.y += int(random(2785)+1) ;
my.z += int(random(64)+1) ;
my.blue = 128 ;
my.green = 128 ;
my.red = 128 ;
my.skill_c = 0; my.skill_b = 0;
if (starmap != 1)
{
if (starmap != 2)
{
if (starmap != 3)
{
if (starmap != 4)
{
my.bmap = starBmap5; //the effect bitmap
my.size = random(4);
}
else
{
my.bmap = starBmap4; //the effect bitmap
my.size = random(4);
}
}
else
{
my.bmap = starBmap3; //the effect bitmap
my.size = random(48);
}
}
else
{
my.bmap = starBmap2; //the effect bitmap
my.size = random(16);
}
}
else
{
my.bmap = starBmap1; //the effect bitmap
my.size = random(4);
}


my.gravity = 0 ;
my.streak = off;
my.flare = off;
my.bright = off;
my.beam = off;
my.move = on;
my.transparent = off;
my.function = torch_spec_fun;
}


Function torch_bottom()
{
while(1)
{
torchAnzahlPartikel = max(1,random(1));
effect(torchspezial_bottom,max(1,torchAnzahlPartikel*time),my.x,nullvector);
wait(1);
}
}

material mat_torch
{
diffuse_red=255;
diffuse_blue=255;
diffuse_green=255;
specular_red=100;
specular_blue=25;
specular_green=150;
emissive_red=0;
emissive_blue=0;
emissive_green=0;
ambient_red = 25;
ambient_green = 25;
ambient_blue = 25;
power = 10;
}

action staraction_back
{
my.material = mat_torch;
torch_back();
}


action staraction_left
{
my.material = mat_torch;
torch_left();
}


action staraction_bottom
{
my.material = mat_torch;
torch_bottom();
}



Images:

Small star:



Medium star:



Starburst:




Yes, I know it could probably be cleaned up a bit and optimized, but it was originally a quick and dirty hack of an older script I used easy particle to generate (obviously ), and, being pleased with the results, I felt like sharing. If you have ways it can be improved upon, feel free to comment, since coding is the direction I'm headed as a second career, and I'd like to improve where and when I can in the mean time.


Here's a shot of it working in it's intended environment:



I'll finish a quick demo level later and upload it... have fun with this for the time being.

Last edited by Tachys; 08/28/07 22:44.
Re: Semi-dynamic space cube script [Re: Tachys] #150553
08/31/07 12:46
08/31/07 12:46
Joined: Nov 2003
Posts: 170
Tachys Offline OP
Member
Tachys  Offline OP
Member

Joined: Nov 2003
Posts: 170
Anyone messed around with this?

If so, please let me know how useful/interesting it was, and where I could improve, both the script and my scripting.

Also, for anyone that chooses to use it and the simple star pics, feel free, credit would be appreciated.

Thanks,

Tachys

Re: Semi-dynamic space cube script [Re: Tachys] #150554
08/31/07 14:18
08/31/07 14:18
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Still waiting for the quick demo, because I have no time to test it on my own!
Quote:

I'll finish a quick demo level later and upload it




Re: Semi-dynamic space cube script [Re: Pappenheimer] #150555
08/31/07 14:20
08/31/07 14:20
Joined: Nov 2003
Posts: 170
Tachys Offline OP
Member
Tachys  Offline OP
Member

Joined: Nov 2003
Posts: 170
lol... k... maybe I need to redefine 'quick'...

***grins***


Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1