Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 13,972 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Snow and Rain #323077
05/11/10 14:17
05/11/10 14:17
Joined: Feb 2010
Posts: 43
in Italia
RoboWarrior Offline OP
Newbie
RoboWarrior  Offline OP
Newbie

Joined: Feb 2010
Posts: 43
in Italia
how to create rain or snow in a level without using particles?


PC
processore Dual-Core Centrino 2 3.3 Ghz
video card NVIDIA 1GB
HDD 640 GB
RAM 8 GB
Windows 7
3D Game Studio A7 commercial edition
FACEBOOK: http://www.facebook.com/home.php?#!/profile.php?ref=profile&id=100000540297412
Re: Snow and Rain [Re: RoboWarrior] #323104
05/11/10 17:00
05/11/10 17:00
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
For that you NEED particles...

Re: Snow and Rain [Re: Widi] #323106
05/11/10 17:09
05/11/10 17:09
Joined: Nov 2008
Posts: 196
the wrong place
Muhsin Offline
Member
Muhsin  Offline
Member

Joined: Nov 2008
Posts: 196
the wrong place
couldn't you use sprites instead?


Come and play my new browsergame - Valley Of Wolves:

http://www.mafiacreator.com/ValleyOfWolves

Hurry and be the first to take over the different business' in the Valley Of Wolves, before anybody else does it!
And be the most feared MafiaBoss in the World!!
Re: Snow and Rain [Re: Widi] #323113
05/11/10 17:43
05/11/10 17:43
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
here´s a snow-particle code for you:
Code:
#include <acknex.h>
#include <default.c>




BMAP* SchneeBmap = "Snow.tga";
BMAP* laser_farbe6 = "Raindrop.tga";

var RegenAnzahlPartikel = 3;
var SchneeAnzahlPartikel = 10;

var schneeout = 0;
var rainout = 0;

VECTOR* pPos = {x=0; y=0; z=0;}
VECTOR* windspeed = {x=0; y=0; z=0;}


function Schnee_spec_fun(PARTICLE* p)
{
	if(p.z < (camera.z-500))
	{
		p.alpha -= 10*time_step;
		if(p.alpha <= 0)
		{
			p.lifespan = 0;
		}
	}
	else
	{
	   p.x += windspeed.x*time_step;
	   p.y += windspeed.y*time_step;
	   p.z += windspeed.z*time_step;
	}
}

function Schneespezial(PARTICLE* p)
{
	p.blue = 250;
	p.green = 250;
	p.red = 250;
	p.bmap = SchneeBmap;
	p.vel_x = random(2)-1;
	p.vel_y = random(2)-1;
	p.vel_z = -2;
	p.size = 1;
	p.alpha = 100;
	p.lifespan = 1000;
	//p.x += random(1000)-500;
	//p.y += random(1000)-500;
	p.z += random(100)-50;
	p.flags |= TRANSLUCENT | MOVE;
	p.event = Schnee_spec_fun;
}


function Regen_spec_fun(PARTICLE* p)
{
	c_trace(vector(p.skill_d,p.skill_y,p.skill_z),p.x,IGNORE_PASSABLE | IGNORE_ME | IGNORE_SPRITES);
	if(trace_hit == 1)
	{
		p.vel_x = 0;
		p.vel_y = 0;
		p.vel_z = 0;
		p.lifespan = 0;
	}
	else if(p.z < (camera.z-1000))
	{
		p.alpha -= 10*time_step;
		if(p.alpha <= 0)
		{
			p.lifespan = 0;
		}
	}
}

function Regenspezial(PARTICLE* p)
{
	p.blue = 225;
	p.green = 225;
	p.red = 225;
	p.skill_c = 0; p.skill_b = 0;
	p.bmap = laser_farbe6;
	p.vel_x = random( 5 ) - 2.500;
	p.vel_y = random( 5 ) - 2.500;
	p.vel_z = -47.125;
	p.size = 3;
	p.alpha = 50;
	p.lifespan = 1000;
	p.x += random(2000)-1000;
	p.y += random(2000)-1000;
	p.z += random(200)-100;
	p.gravity=random(1);
	p.flags |= BEAM | MOVE | TRANSLUCENT;
	p.event = Regen_spec_fun;
}









function Schnee()
{
	schneeout = 0;
	rainout = 1;
	wait(1);
	while(schneeout == 0)
	{
		vec_set(pPos.x,vector(camera.x, camera.y, camera.z+200));
		effect(Schneespezial,maxv(1,SchneeAnzahlPartikel*time_step),pPos,normal);
		wait(1);
	}
	wait(1);
	schneeout = 0;
}

function Regen()
{
	rainout = 0;
	schneeout = 1;
	wait(1);
	while(rainout == 0)
	{
		vec_set(pPos.x,vector(camera.x, camera.y+1000, camera.z+200));
		effect(Regenspezial,maxv(1,RegenAnzahlPartikel*time_step),pPos,nullvector);
		wait(1);
	}
	rainout = 0;
}



void main()
{
	fps_max = 50;
	video_mode = 8;
	level_load(NULL);
	wait(3);
	vec_set(camera.x, vector(0,0,500));
	vec_set(camera.pan, vector(90,-45,0));
	while(1)
	{
		Schnee();
		while(key_1 == 0){wait(1);}
		Regen();
		while(key_2 == 0){wait(1);}
		wait(1);
	}
}



Just replace the bitmap at the top with your own... and call the function "Schnee();"

Last edited by Espér; 05/11/10 22:08.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Snow and Rain [Re: RoboWarrior] #323219
05/12/10 13:07
05/12/10 13:07
Joined: Feb 2010
Posts: 43
in Italia
RoboWarrior Offline OP
Newbie
RoboWarrior  Offline OP
Newbie

Joined: Feb 2010
Posts: 43
in Italia
if I want to create a rain particle with the drops that forms puddles on the trenches. What I have to do?


PC
processore Dual-Core Centrino 2 3.3 Ghz
video card NVIDIA 1GB
HDD 640 GB
RAM 8 GB
Windows 7
3D Game Studio A7 commercial edition
FACEBOOK: http://www.facebook.com/home.php?#!/profile.php?ref=profile&id=100000540297412
Re: Snow and Rain [Re: RoboWarrior] #323255
05/12/10 16:47
05/12/10 16:47
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Create a waterterrain that is under your normalterrain. If it start to rain move the water up till it is visible.

Re: Snow and Rain [Re: Widi] #326892
06/03/10 17:05
06/03/10 17:05
Joined: Dec 2009
Posts: 217
Italy
PietroNifosi Offline
Member
PietroNifosi  Offline
Member

Joined: Dec 2009
Posts: 217
Italy
Just download Loopix's MystyMood. It's all there, you'll like it.


Dear Fans, to celebrate our 500.000 downloads,
Evhacon 2 is now FREE TO PLAY on Amazon Underground!
HD Version: https://www.amazon.com/gp/product/B071FKSVG2
LD Version (Optimized for lower devices): https://www.amazon.com/gp/product/B0719TXFJN
Re: Snow and Rain [Re: PietroNifosi] #326906
06/03/10 18:11
06/03/10 18:11
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
@Pietro: Please don`t re-open out to date topics, this one is more than 20 days old...

Re: Snow and Rain [Re: Widi] #326908
06/03/10 18:15
06/03/10 18:15
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
why? i've waited more than 20 days for responses before...

Re: Snow and Rain [Re: darkinferno] #326961
06/03/10 21:08
06/03/10 21:08
Joined: May 2009
Posts: 439
T
TerraSame Offline
Senior Member
TerraSame  Offline
Senior Member
T

Joined: May 2009
Posts: 439
Seriously...
PietroNifosi is totaly right...
Do a web search for Mystymood...
It's woderfull...
All the info is there and you can also use the art work...
I use the "Dynamic Sky" in my projects...
Simply Do a "Save As" and take out what you don't want and add your stuff...
It is an excelent way to start a new project...
Widi is totaly right about moving the terrain for creating puddles...
I saw it done like that, somewhere, for wave action, I think in Mystymood's shore break???
Best of luck!


Moderated by  HeelX, rvL_eXile 

Gamestudio download | 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