DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

Seeker missiles
Page 1 of 1
DieHard Wolfers Forum Index -> Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
Reactor
DieHard SS
DieHard SS


Joined: 17 Mar 2005
Last Visit: 24 Jan 2013

Topics: 27
Posts: 328
Location: Hungary
hungary.gif

PostPosted: Thu Oct 08, 2009 5:40 am
   Subject: Seeker missiles
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

Just curiousity, which might be very useful in several add-ons:
We've all seen many boss enemies shooting missiles - Superclones, Rocket turrets and so on. I wonder if it would be possible to make these missiles follow the player after launched (sorta like the Revenant's projectiles in Doom 2), and trying to hunt him down? They'd be a lot harder to dodge than original missiles, which just flew away.

_________________
INCOMING TRANSMISSION
"Marine! Er....never mind..."
TRANSMISSION ENDS
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 6:34 ago.

Topics: 73
Posts: 3765

blank.gif

PostPosted: Thu Oct 08, 2009 9:11 am
   Subject: Re: Seeker missiles
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Maybe you can combine the rocket attack with the dog attack, and then make it explode when it hits doors, walls, objects or the player? Smile
Reactor
DieHard SS
DieHard SS


Joined: 17 Mar 2005
Last Visit: 24 Jan 2013

Topics: 27
Posts: 328
Location: Hungary
hungary.gif

PostPosted: Thu Oct 08, 2009 11:43 am
   Subject: Re: Seeker missiles
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Well in this case, the rocket would have a lot more frames (a dog has at least 28-30), plus it'd be extremely easy to destroy the missile. And don't forget that the dog's movement is OK, but that zigzag-ing would be a little stupid for a projectile Very Happy

I was just thinking about a missile,which will always head to the player's direction until it hits an enemy, an object or a wall. Smile

_________________
INCOMING TRANSMISSION
"Marine! Er....never mind..."
TRANSMISSION ENDS
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 6:34 ago.

Topics: 73
Posts: 3765

blank.gif

PostPosted: Thu Oct 08, 2009 11:50 am
   Subject: Re: Seeker missiles
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Well, it wouldn't be exactly a dog ofcourse, just a rocket which borrows some lines from the dogattack function. It doesn't need to be defined as a new enemy. Now, I haven't coded in a long while, so I don't know if this is possible at all, and I have no idea if you can remove the zig-zagging, but I just envisioned it that way and though it might be possible. Smile
Codetech84
Code Master
Code Master


Joined: 12 Mar 2003
Last Visit: 12 Aug 2018

Topics: 22
Posts: 1283
Location: Rauma - Finland
finland.gif

PostPosted: Thu Oct 08, 2009 11:54 am
   Subject: Re: Seeker missiles
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

We had those in Klooni. I'll try to post it here tomorrow.

_________________
Click here to visit KFH Games website!
*UPDATED* Spear of Destiny Reloaded
KFH Games on Facebook
Metalor
DieHard Mutant
DieHard Mutant


Joined: 24 Aug 2005
Last Visit: 8:31 ago.

Topics: 95
Posts: 911
Location: California
usa.gif

PostPosted: Thu Oct 08, 2009 7:17 pm
   Subject: Re: Seeker missiles
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I tried that once for Guns and Glory 1, pretty much just self-killing dogs that looked like missiles was the effect. It does work, but not to a pleasing effect.

_________________
- Taking a hiatus from Wolfenstein for a while...

...But I'll be back, you can count on it!
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 17 Sep 2018

Topics: 163
Posts: 8192
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Thu Oct 08, 2009 9:27 pm
   Subject: Re: Seeker missiles
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

ronwolf1705 wrote:
Well, it wouldn't be exactly a dog ofcourse, just a rocket which borrows some lines from the dogattack function. It doesn't need to be defined as a new enemy. Now, I haven't coded in a long while, so I don't know if this is possible at all, and I have no idea if you can remove the zig-zagging, but I just envisioned it that way and though it might be possible. Smile
It's quite possible to do it either way. To have it move more like a missile means having it shift slightly towards the player every time it's told to change its position. You'll probably have to tinker with this a while to get it to "shift" correctly; until you do, it'll either shift too quickly, and its movement won't be "missile-like", or it will shift towards the player so slowly that it's hardly more dangerous than before. Smile
Codetech84
Code Master
Code Master


Joined: 12 Mar 2003
Last Visit: 12 Aug 2018

Topics: 22
Posts: 1283
Location: Rauma - Finland
finland.gif

PostPosted: Fri Oct 09, 2009 2:02 am
   Subject: Seeker missiles
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Here it is for the Wolf4SDL platform. With minor modifications it will work in DOS version too. It was adapted from deathrotate for Klooni, why make new routines that do the same that are allready in the code. Mr Green

Add these to wl_act2.cpp above the T_Projectile code:

::: CODE :::
/*
=======================================================
=  ClipAngle:
=
=  Keeps angle in range
=======================================================
*/
int ClipAngle (int angle)
{
    while (angle>=ANGLES){ angle-=ANGLES; }
    while (angle<0){ angle+=ANGLES; }
   
   return angle;
}


/*
=======================================================
=  ObjAngle:
=
=  Returns angle from ob1 to ob2
=======================================================
*/
int ObjAngle (objtype *ob1, objtype *ob2)
{
    int32_t deltax,deltay;
    float   angle;
    int     iangle;

    deltax = ob2->x - ob1->x;
    deltay = ob1->y - ob2->y;
   
    if (deltax == 0 && deltay == 0)
       return 0;

    angle = (float) atan2 ((float) deltay, (float) deltax);
    if (angle<0)
        angle = (float) (M_PI*2+angle);

    iangle = ClipAngle ((int)(angle/(M_PI*2)*ANGLES));

    return iangle;
}

/*
=======================================================
=  TurnToAngle:
=
=  Rotates an actor towards desired angle, as efficiently
=  as possible
=
=  dest     = Destination angle
=  turnrate = Turning speed
=======================================================
*/
void TurnToAngle (objtype *ob, int dest, int turnrate)
{
   long   deltax,deltay;
   int   iangle;
   int   countercw, clockwise, change, curangle;

   // No need to turn we are heading at the desired direction
   if (ob->angle == dest) return;

   //
   // Check most efficient turning angle
   //

   // Check which way we should turn
   if (ob->angle > dest)
   {
      countercw = ob->angle - dest;
     clockwise = ANGLES-ob->angle + dest;
   }
   else
   {
     clockwise = dest - ob->angle;
     countercw = ob->angle + ANGLES-dest;
   }

   curangle = ob->angle;

   if (clockwise < countercw)
   {
      //
     // Rotate clockwise
     //

     if (curangle > dest)
     curangle -= ANGLES;

     change = tics*turnrate;
     if (curangle + change > dest)
         change = dest-curangle;

      curangle += change;
      ob->angle += change;

      ob->angle = ClipAngle (ob->angle);
   }
   else
   {
      //
      // Rotate counterclockwise
      //

      if (curangle < dest)
         curangle += ANGLES;

      change = -tics*turnrate;
      if (curangle + change < dest)
         change = dest-curangle;

      curangle += change;
      ob->angle += change;

      ob->angle = ClipAngle (ob->angle);
   }
}

/*
=======================================================
=  HomeToPlayer:
=
=  Rocket homing in to player
=======================================================
*/
void HomeToPlayer (objtype *ob)
{
   int a = ObjAngle (ob, player);
   TurnToAngle (ob, a, 1);
}


Add the blue lines to the "T_Projectile":
::: CODE :::
void T_Projectile (objtype *ob)
{
    int32_t deltax,deltay;
    int     damage;
    int32_t speed;

    if (ob->obclass == rocketobj || ob->obclass == hrocketobj)
        HomeToPlayer (ob);

    speed = (int32_t)ob->speed*tics;

_________________
Click here to visit KFH Games website!
*UPDATED* Spear of Destiny Reloaded
KFH Games on Facebook
RichterBelmont12
DieHard Wolfer
DieHard Wolfer


Joined: 14 Aug 2004
Last Visit: 13 Sep 2018

Topics: 97
Posts: 1508
Location: New Jersey
usa.gif

PostPosted: Fri Oct 09, 2009 8:29 am
   Subject: Re: Seeker missiles
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Very Interesting....I'll give this one a go

_________________
http://www.youtube.com/RichterBelmont12

https://www.facebook.com/RichterBelmont123

https://twitter.com/Richterbelmont6
Codetech84
Code Master
Code Master


Joined: 12 Mar 2003
Last Visit: 12 Aug 2018

Topics: 22
Posts: 1283
Location: Rauma - Finland
finland.gif

PostPosted: Fri Oct 09, 2009 9:13 am
   Subject: Re: Seeker missiles
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Remember if you have a rocket launcher weapon that use the same object class, those rockets would come back chasing you.

_________________
Click here to visit KFH Games website!
*UPDATED* Spear of Destiny Reloaded
KFH Games on Facebook
Lozer_42
DieHard Wolfer
DieHard Wolfer


Joined: 09 Jun 2006
Last Visit: 11 Aug 2018

Topics: 49
Posts: 1164
Location: Grand Rapids, Michigan
usa.gif

PostPosted: Fri Oct 09, 2009 9:24 am
   Subject: Re: Seeker missiles
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Codetech84 wrote:
Remember if you have a rocket launcher weapon that use the same object class, those rockets would come back chasing you.

Now, there's a brilliant idea for a mod!

_________________
Team RayCast YouTube Let's Play Commentaries
View Team RayCast on Mod DB
Reactor
DieHard SS
DieHard SS


Joined: 17 Mar 2005
Last Visit: 24 Jan 2013

Topics: 27
Posts: 328
Location: Hungary
hungary.gif

PostPosted: Fri Oct 09, 2009 9:33 am
   Subject: Re: Seeker missiles
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Great work, Codetech Smile I am truly impressed Smile

I would always want to see homing missiles in Wolfenstein 3-D/Spear games, which would make certain boss enemies a lot more challenging, especially if they bear double rocket launchers! (HYPERClone?)

I thought about this addition first, when I was playing Doom 2 (or Doom 3 for that matter), and tried to avoid the Revenant's seeking fireballs. As you probably know, the Revenant's fireballs may or may not follow you (it's like the probability for an Ultraclone to reborn), however, dodging missiles which'll ALWAYS follow you makes the game a LOT more challenging Smile

_________________
INCOMING TRANSMISSION
"Marine! Er....never mind..."
TRANSMISSION ENDS
Codetech84
Code Master
Code Master


Joined: 12 Mar 2003
Last Visit: 12 Aug 2018

Topics: 22
Posts: 1283
Location: Rauma - Finland
finland.gif

PostPosted: Fri Oct 09, 2009 12:42 pm
   Subject: Re: Seeker missiles
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

You can allready test it out in klooni, which is downloadable at www.kfhgames.com Smile

_________________
Click here to visit KFH Games website!
*UPDATED* Spear of Destiny Reloaded
KFH Games on Facebook
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 1 of 1
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts ?? Anyone know how to make wolf read .txt files ??
Author: jamez
3 1228 Tue May 30, 2006 1:29 am
Zombie_Plan View latest post
No new posts Making an actor flee (RUN AWAY!)
Author: Commodore
15 2469 Sat Jul 02, 2005 6:37 pm
Tricob View latest post
No new posts Make Bossess stop moving.
Author: andy3012
7 1601 Mon Mar 28, 2005 12:36 am
Sporb2000 View latest post
No new posts Drunk Missiles in Wolfenstein?
Author: Zero X. Diamond
5 1510 Tue Aug 17, 2004 11:20 am
Zero X. Diamond View latest post
No new posts [Info] Make a Single shot kill an enemy
Author: Guest
12 442 Sun Jun 20, 2004 3:12 pm
Guest View latest post
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
   You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group