Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
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
0 registered members (), 635 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
Re: Aum82 ready [Re: maslone1] #252252
02/17/09 11:34
02/17/09 11:34
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline
Serious User
VeT  Offline
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
thats not exactly what i wanted to know, maybe i badly make my sentence

i'm interested, if i'd use 2d objects (panels), that are shown on the screen(in 2d), could i use 3d particle effects...
so wouldnt particles goes through the camera?

maybe i'd need to create the explosion using vec_for_screen and moving it down from the screen
(if i write it again not understandable, i'd make screenshot smile

PS: in first time i wanted to know, if there are 2d particles, that rendered right on the screen, like panel (we colud rendre weapon on the screen using
Code:
ENTITY* shotgun_onscreen =
{
  type = "shotgun.mdl";
  layer = 2; // display above view entities with layer 1
  flags = VISIBLE;
  flags2 = VISIBLE; // visible on screen from the start  
client_id = camera; // same camera parameters as the default view
  x = 100; // place 100 quants ahead of the view
  y = -50; // 50 to the right
  z = 0; // and center vertically
}
, so maybe there is something like that for particles


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Aum82 ready [Re: VeT] #252328
02/17/09 17:42
02/17/09 17:42
Joined: Jul 2007
Posts: 424
EUROPE
maslone1 Offline
Senior Member
maslone1  Offline
Senior Member

Joined: Jul 2007
Posts: 424
EUROPE
Ok,... i think i understand what u mean.

My answere is "Obama" -> "yes, you can" wink


You only have to set the vec[2] to zero. ( vec[2] = 0; )
My goal in my little project was, to create the starfield in every direction. If i would set the vec[2] to zero,
the stars would only be created in x and y direction.


Code:
 // Hilfsfunktion: setzt den Vektor auf zufällige Richtung und Länge
function vec_randomize (var* vec, var range)
{
   vec[0] = random(1) - 0.5;
   vec[1] = random(1) - 0.5;
   vec[2] = 0;
   vec_normalize(vec,random(range));
}

// Hilfsfunktion: blendet einen Partikel aus
function part_alphafade(PARTICLE *p)
{
   p.alpha -= 2*time_step;
   if (p.alpha <= 0) p.lifespan = 0;
}

// Partikelfunktion: generiert eine verblassende Explosion in vel-Richtung
function effect_explo(PARTICLE *p)
{
   var temp[3];
   vec_randomize(temp,10);
   vec_add (p.vel_x, temp);
   p.alpha = 25 + random(25);
   p.bmap = scatter_map;
   p.flags |= (BRIGHT | MOVE);
   p.event = part_alphafade; // wechsle zu einer kürzeren, schnelleren Funktion
}

...
vec_scale(normal,10); // produziere eine Explosion in Richtung der Normalen
effect(effect_explo,1000,my.x,normal);


cu
Marcel


A8c, Blender, FlStudio, Unity3d
Re: Aum82 ready [Re: maslone1] #252375
02/17/09 22:46
02/17/09 22:46
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline
Serious User
VeT  Offline
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
and if i would move camera in 3d space ? smile

really i was asking about render particles on the screen with something like " client_id = camera;"


but anyway you're on the right way: maybe it would be effect if i change particle's [2] coordinate to camera's coordinate... interesting, i may try this smile thanks for idea smile


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Aum82 ready [Re: VeT] #252410
02/18/09 06:23
02/18/09 06:23
Joined: Jul 2007
Posts: 424
EUROPE
maslone1 Offline
Senior Member
maslone1  Offline
Senior Member

Joined: Jul 2007
Posts: 424
EUROPE
hmmm,.... whats the goal?

the camera only move on x and y direction, an the particle only exist in x and y direction. if your cam move in z direction, the particle have to move with the cam.

But i understand what you mean, and i havent tried it.... so i can't answere now.´

cu
marcel


A8c, Blender, FlStudio, Unity3d
Re: Aum82 ready [Re: maslone1] #252439
02/18/09 09:39
02/18/09 09:39
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline
Serious User
VeT  Offline
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
//if your cam move in z direction, the particle have to move with the cam.
why, if you set vec[2] = 0; ? smile

looking like you can move particles with camera if you would set vec[2] = camera.z; but what about rotating camera? smile

maybe George could help us? wink


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Aum82 ready [Re: VeT] #252458
02/18/09 11:43
02/18/09 11:43
Joined: Jul 2007
Posts: 424
EUROPE
maslone1 Offline
Senior Member
maslone1  Offline
Senior Member

Joined: Jul 2007
Posts: 424
EUROPE

deleted

Last edited by maslone1; 02/18/09 11:44.

A8c, Blender, FlStudio, Unity3d
Re: Aum82 ready [Re: VeT] #252459
02/18/09 11:43
02/18/09 11:43
Joined: Jul 2007
Posts: 424
EUROPE
maslone1 Offline
Senior Member
maslone1  Offline
Senior Member

Joined: Jul 2007
Posts: 424
EUROPE
Oh, i see,.... you need it for 3d... ?dont u?

but if you want rotate it with the cam you could use this:

Code:
 function rotate_rel(VECTOR* meentity, VECTOR* youentity, ANGLE* youangle, VECTOR* distanz)
{
	
vec_set(meentity.x,distanz);
      vec_rotate(meentity.x,youangle.pan);
      vec_add(meentity.x,youentity.x);
	
	
}


But u are in right... it would be easier with the cam-layer.
I'll take a look at this "problem". Maybe i find the answere.

... or geoerge smile....

cu marcel


Last edited by maslone1; 02/18/09 11:47.

A8c, Blender, FlStudio, Unity3d
Re: Aum82 ready [Re: maslone1] #252466
02/18/09 12:26
02/18/09 12:26
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline
Serious User
VeT  Offline
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
what about using for particles
Quote:

DECAL
If a sprites' DECAL flag is set, the sprite will be oriented in world space according to its PAN, TILT, and ROLL angles, rather than facing the player, and it's back side won't be visible.

instead of rotating ?
or, maybe, its just for sprites...

yes, i need a particle explotion, but on the camera, in 2d


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Aum82 ready [Re: VeT] #252482
02/18/09 13:57
02/18/09 13:57
Joined: Jul 2007
Posts: 424
EUROPE
maslone1 Offline
Senior Member
maslone1  Offline
Senior Member

Joined: Jul 2007
Posts: 424
EUROPE
... sorry, i don't know it (yet).
but i'll try some variations.
I'll write u, if i have an answere to this question.

Maybe George can answere faster.... George?


cu
Marcel


A8c, Blender, FlStudio, Unity3d
Re: Aum82 ready [Re: maslone1] #252588
02/19/09 06:06
02/19/09 06:06
Joined: Aug 2003
Posts: 2,008
Bucharest, Romania
George Offline OP

Expert
George  Offline OP

Expert

Joined: Aug 2003
Posts: 2,008
Bucharest, Romania
What do you want to achieve? For pure 2D explosions you can use animated sprites, just like I did it in my Invaders clone from Aum82.

Page 3 of 4 1 2 3 4

Moderated by  George 

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