POV-Ray : Newsgroups : povray.binaries.animations : Space Fight 4 (cool explosions) Server Time
19 Jul 2024 19:16:52 EDT (-0400)
  Space Fight 4 (cool explosions) (Message 9 to 18 of 18)  
<<< Previous 8 Messages Goto Initial 10 Messages
From: Rune
Subject: Re: Space Fight 5 (camera follows ship)
Date: 28 Sep 2002 18:58:41
Message: <3d963421@news.povray.org>
This is getting very cool. :)

Do the ships simply aim at the current position of the target, or do
they take into account the velocity of the target and try to calculate
where the target will be when the laser has reached it? The latter would
probably be more interesting and force the ships to fly in non-straight
unpredictable curves to avoid being hit. :)

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated Sep 8)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Slime
Subject: Re: Space Fight 5 (camera follows ship)
Date: 28 Sep 2002 19:03:52
Message: <3d963558$1@news.povray.org>
> Do the ships simply aim at the current position of the target, or do
> they take into account the velocity of the target and try to calculate
> where the target will be when the laser has reached it? The latter would
> probably be more interesting and force the ships to fly in non-straight
> unpredictable curves to avoid being hit. :)


That's exactly what's happening. =)

The chaser is always moving towards the place that the victim would be in
the future if a laser were to be shot from the current distance. When the
chaser has sucessfully oriented himself so that that place is in front of
him, he shoots. I purposely made the calculation of this point in space with
a more simple formula than should have been used, but it's accurate most of
the time. This gives the impression of imperfect aim.

The victim, however, is able to tell when he is being targeted, and does his
best to avoid the direction that the chaser is currently facing. This
usually means that the victim is able to get away if he's fast enough, but
if there's too much time, then the chaser usually succeeds.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Slime
Subject: Re: Space Fight 5 (camera follows ship)
Date: 28 Sep 2002 19:05:50
Message: <3d9635ce$1@news.povray.org>
> How about giving the weapons a limited range, forcing the craft to get in
> close before blasting, also tweak the AI so they 'chase' more' :)


Well, they're constantly looking for a good victim to chase, though if they
see something on a collision course with them, they give up the chase and
try to avoid the obstacle. I honestly don't know why the blue ship in this
animation went off in one direction for a long time without doing anything
else.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Timothy R  Cook
Subject: Re: Space Fight 5 (camera follows ship)
Date: 29 Sep 2002 00:29:31
Message: <3d9681ab@news.povray.org>
Slime wrote:
> I honestly don't know why the blue ship in this animation went off
 > in one direction for a long time without doing anything else.

"...damn tourists"

-- 
Tim Cook
http://empyrean.scifi-fantasy.com
mirror: http://personal.lig.bellsouth.net/lig/z/9/z993126

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Rune
Subject: Re: Space Fight 5 (camera follows ship)
Date: 29 Sep 2002 07:21:08
Message: <3d96e224$1@news.povray.org>
Slime wrote:
> That's exactly what's happening. =)

Cool! :)

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated Sep 8)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From:
Subject: Re: Space Fight 5 (camera follows ship)
Date: 30 Sep 2002 08:17:33
Message: <3d9840dd@news.povray.org>
there is an explosion in the distance when he does that. Can it be he is
firing, but that you can't see him doing so because the ship's in front?

"Slime" <slm### [at] slimelandcom> wrote in message
news:3d9635ce$1@news.povray.org...
> > How about giving the weapons a limited range, forcing the craft to get
in
> > close before blasting, also tweak the AI so they 'chase' more' :)
>
>
> Well, they're constantly looking for a good victim to chase, though if
they
> see something on a collision course with them, they give up the chase and
> try to avoid the obstacle. I honestly don't know why the blue ship in this
> animation went off in one direction for a long time without doing anything
> else.
>
>  - Slime
> [ http://www.slimeland.com/ ]
>
>


Post a reply to this message

From: Dennis Borree
Subject: Re: Space Fight 5 (camera follows ship)
Date: 30 Sep 2002 20:01:21
Message: <3d98e5d1$1@news.povray.org>
I tried your file but there are too many errors for me to fix. I am getting
lost. Can you upload a fixed version?

Dennis

"Slime" <slm### [at] slimelandcom> wrote in message
news:3d952c0c@news.povray.org...
> > Can I have an .inc file? ;)
>
> Sure, why not? =)
>
> Just use this code. Sorry if it wraps. Use it like
>
> createexplosion(explosionsize, explosionpos, explosionid)
>
> explosionpos is the place where the explosion is. explosionsize should be
a
> number from 0 to explosionlength which determines the amount of time that
> has passed. explosionid should be a number that stays constant for each
call
> of the function for the same explosion but is different for different
> explosions. (so that they look diffferent). it's really just a random seed
> that changes the orientation of the explosion.
>
> Also change numexplosionpartst (defined in the macro itself) to put more
> mini-spheres inside the explosion, and change the numbers after the
'scale'
> keyword to change the size (you should probably also change the fire and
> smoke colors when changing the size).
>
> there may be an error here or there. for instance, you'll have to define
> "shiprad" (ship radius) or change the light_source declaration at the end.
>
> And feel free to manipulate it or improve upon it, just give credit where
> due, ok? =)
>
> #declare explosionlength = 2;
> #declare firecolor = <1,.7,.3>*1.2;
> #declare smokecolor = 1.8;
> #macro createexplosion(explosionsize, explosionpos, explosionid)
>  #declare explosionrnd = seed(explosionid);
>  #if (explosionsize < explosionlength)
>   #declare overallintensity = 1-pow(explosionsize/explosionlength,7);
>   #declare overallsmokeamnt = pow(explosionsize/explosionlength,2);
>   #declare explosionsize =
pow(explosionsize/explosionlength,.3)*shiprad*6;
>   sphere {
>    0,1
>    pigment {rgbt 1}
>    interior {
>     #declare animbaseamnt = explosionsize*.1;
>     #declare thisanimbase = 0;
>     #declare numexplosionpartst = 5;
>     #declare explosionpartnumt = 0;
>     #while (explosionpartnumt < numexplosionpartst)
>      #declare theta = (explosionpartnumt/(numexplosionpartst-1))*pi-pi/2;
>      #declare explosionpartnumr = 0;
>      #while (explosionpartnumr <= numexplosionpartst*cos(theta))
>       #if (floor(numexplosionpartst*cos(theta)) > 0)
>        #declare phi =
explosionpartnumr/floor(numexplosionpartst*cos(theta))
> *2*pi + theta;
>       #else
>        #declare phi = theta;
>       #end
>       #declare thisanimbase = thisanimbase + pi/10; // pi is arbitrary
>       #declare thisanimbase = thisanimbase-floor(thisanimbase);
>       #declare animamnt = thisanimbase + animbaseamnt*3;
>       #declare animamnt = animamnt-floor(animamnt);
>
>       #declare smokeamnt = pow(animamnt,3);
>       #declare smokeamnt = smokeamnt + (1-smokeamnt)*overallsmokeamnt;
>       #declare thisintensity = overallintensity*(1-pow(animamnt,5));
>
>       media {
>        emission firecolor*(1-smokeamnt) *thisintensity
>        absorption smokecolor*(smokeamnt) *thisintensity
>
>        #declare translatedir =
> <cos(phi)*cos(theta),sin(theta),sin(phi)*cos(theta)>;
>        density {
>         spherical
>         color_map {
>          [0 rgb <1,0,0>*0]
>          [.1 rgb <1,.8,.8>*.3]
>          [.25 rgb .7]
>          [.5 rgb 1]
>         }
>         translate -translatedir*animamnt*2
>         warp {
>          turbulence .3
>          octaves 3
>          omega .8
>          lambda 5
>         }
>         translate translatedir*animamnt*2
>         scale .4 + .2*pow(animamnt,6)
>         translate translatedir*(1-pow(1-animamnt,3)) *.5 //
> (1-pow(1-animamnt,2))
>        }
>       }
>       #declare explosionpartnumr = explosionpartnumr + 1;
>      #end
>      #declare explosionpartnumt = explosionpartnumt + 1;
>     #end
>    }
>    hollow
>    rotate <rand(explosionrnd),rand(explosionrnd),rand(explosionrnd)>*360
//
> orient randomly
>    scale explosionsize
>    translate explosionpos
>    no_shadow
>   }
>   light_source {
>    explosionpos
>    rgb firecolor*overallintensity
>    fade_power 2
>    fade_distance shiprad*20
>   }
>  #end
> #end
>
>  - Slime
> [ http://www.slimeland.com/ ]
>
>


Post a reply to this message

From: James Taylor
Subject: Re: Space Fight 5 (camera follows ship)
Date: 1 Oct 2002 11:24:52
Message: <3d99be44$1@news.povray.org>
impressice yet again, but could the code be modified such that the greens
are defending something, say a space satation, while the blues attack the
station and defend themselves

jim


Post a reply to this message

From: Slime
Subject: Re: Space Fight 5 (camera follows ship)
Date: 1 Oct 2002 13:50:00
Message: <3d99e048$1@news.povray.org>
> impressice yet again, but could the code be modified such that the greens
> are defending something, say a space satation, while the blues attack the
> station and defend themselves


To change how much they defend themselves versus how much they try to kill
the enemy might be difficult, but setting up a fight outside a space station
is not too difficult (and is where I plan to take this when I get back to
it).

If I change the algorithm, they'll probably just get worse. =) However, I
could make one team really not care if they die, and then just make hundreds
of them, and that might even out.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Jeff M  Thomas
Subject: Re: Space Fight 5 (camera follows ship)
Date: 8 Oct 2002 22:08:16
Message: <3da38f90$1@news.povray.org>
Very cool indeed. Something I was thinking about doing myself (but now I
don't have to ;-).

Some ideas:

If the target is near enough, have the camera adjust to have both ships in
view without the chasing ship blocking. At other times have it 'drift'
slighly off to one side.

Dodging or 'juking' ships could rotate.

A little more inertia, especially in the green ships which look bigger.

Ships could place a premium on chasing ships that are targetting their
compatriots (unless one of the races just doesn't care, as you mentioned
elsewhere).

I don't know if ships should know their being targeted, as such, but it'd be
cool if they noticed incoming shots, once they are close enough, and tried
to avoid those.

Maybe it takes more than one shot to kill the bigger craft. Smoke and parts
trails...

Persistant wreckage.

Yeah, a base or capital class ship would be really cool.

This would make a great group project...

Good work!

- Jeff

"Slime" <slm### [at] slimelandcom> wrote in message
news:3d951f55@news.povray.org...
> Since it seems not many people have read this yet, in the interest of not
> piling up too many posts, I'll put this here.
>
> Apologies for the huge file size.
>
>  - Slime
> [ http://www.slimeland.com/ ]
>
>
>


Post a reply to this message

<<< Previous 8 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.