Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 581 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Particle Laser #74005
05/12/06 23:26
05/12/06 23:26
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline OP
Member
NL_3DGS_n00b  Offline OP
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
Hi,

I wanted to make a realistic laser beam with particles, and then more laser beams in a row. (Like a pathway which is filled with security lasers.)

Now my questions:

1. Whats the best way to create a laser with particles? I've tried easy particle 3, but I just dont get it that good to make a laser of it.

2. If I make multiple laserbeams, will this decrease my framerate strongly?


The best games are the games you create yourself.
Re: Particle Laser [Re: NL_3DGS_n00b] #74006
05/14/06 13:32
05/14/06 13:32
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline OP
Member
NL_3DGS_n00b  Offline OP
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
Nobody?


The best games are the games you create yourself.
Re: Particle Laser [Re: NL_3DGS_n00b] #74007
05/14/06 14:01
05/14/06 14:01
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
1. Whatīs you problem? use particles with a bigger width, so you neednīt use more particles

2. Depends on the count of the beems, normaly not that much

Re: Particle Laser [Re: TWO] #74008
05/14/06 15:30
05/14/06 15:30
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline OP
Member
NL_3DGS_n00b  Offline OP
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
The point is, I am not able to create a small beam op particles so it realy looks like a laser...


The best games are the games you create yourself.
Re: Particle Laser [Re: NL_3DGS_n00b] #74009
05/14/06 23:31
05/14/06 23:31
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
try to search 'Advanced Particle Effects Programming Tutorial' (don't remeber author)
-------------------- example
(C) NOT mine
Code:

...
function ceiling(x)
{
return(int(x)+(frc(x)>0));
}

function improved_photon();

var position;

bmap photon = <novaV1.pcx>;
var n;
var photon_p = 0.2;
var velocity_dir;

action a_improved_laser
{
// define a direction/velocity for the laser
velocity.x = 50;
velocity.y = 0;
velocity.z = 0;

// loop which generates the photons
while(1)
{
n = ceiling(vec_length(velocity.x)*time/(photon_size*photon_p));

if (key_2)
{
my.skill1 = 1; // counts particles in the strip

while(my.skill1<=n)
{
// compute the unitary vector parallel the velocity
vec_set(velocity_dir.x,velocity.x);
vec_normalize(velocity_dir.x,1);

// places the n particles along a strip begining at my.x
// and ending at my.x + vel_direction*l*(n-1)
position.x = my.x +
(my.skill1-1)*velocity_dir.x*(photon_size*photon_p)
- time*velocity.x;
position.y = my.y +
(my.skill1-1)*velocity_dir.y*(photon_size*photon_p)
- time*velocity.y;;
position.z = my.z +
(my.skill1-1)*velocity_dir.z*(photon_size*photon_p)
- time*velocity.z;

// creats the particles
effect(improved_photon,1,position.x,velocity.x);

//increment the counter
my.skill1 += 1;
}

}
wait(1);
}
}

function improved_photon()
{
if (my.lifespan==80)
{
my.bmap = photon;
my.size = photon_size;
my.bright = on;
my.flare = on;
my.alpha = 100;
my.move = on;
my.red = random(40);
my.green = 255;
my.blue = random(40);
my.gravity = 0;
my.lifespan = 30;
}
...
}


P.S.
For good laser don't use images only. Try to play sound near laser, for example. Like 'electric engine' or alike. Or try to 'interrupt' some of your beams for a short time. Or place another particle effect at the beam end...
Good luck with laser!

Re: Particle Laser [Re: Lion_Ts] #74010
05/15/06 00:17
05/15/06 00:17
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline
Expert
FoxHound  Offline
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
Also check the AUM. There was one article which showed how to make lazer beams come out of a monster's eyes.

In tower what I did was to get the position I wanted to start my lazer, create the effect, and then using COS,SIN,TAN, figure out the place in front of that particle and creat another one until I had my affect.


---------------------
There is no signature here.


QUIT LOOKING FOR ONE!
Re: Particle Laser [Re: FoxHound] #74011
05/15/06 20:50
05/15/06 20:50
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline OP
Member
NL_3DGS_n00b  Offline OP
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
I will take a look.
Thank you both for your reply's.


The best games are the games you create yourself.
Re: Particle Laser [Re: NL_3DGS_n00b] #74012
05/15/06 22:22
05/15/06 22:22
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
in example above you may have errors, don't be afraid, just define needed vars, like photon_size...
that laser is good, it places only needed number of 'photons' in the laser beam and you don't need to use 'beam' flag.

Re: Particle Laser [Re: Lion_Ts] #74013
05/15/06 23:22
05/15/06 23:22
Joined: May 2005
Posts: 819
U.S.
Why_Do_I_Die Offline
Warned
Why_Do_I_Die  Offline
Warned

Joined: May 2005
Posts: 819
U.S.
Why cant u make it easy particle 3 ? it's insanely easy to make a laser with it , just mess with it , uncheck the z and the y forces , or whichever forces u dont one , and put all the strenght to once force , i.e. on the x axis or the y or the z , however u want the laser to go.


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