[Done] Spawn/Thing_Projectile/Aimed/Gravity/2 extension.

Moderator: GZDoom Developers

Spawn/Thing_Projectile/Aimed/Gravity/2 extension.

Postby solarsnowfall » Sun Aug 20, 2006 3:43 pm

Like the recent addition to Radius_Quake, I'd like to see Thing_Projectile and it's derivatives have the ability to treat a TID of 0 as the activator. Why? Because of the greater flexibility of being able to set a dynamic speed and vspeed. I am aware of the ability to set a random pitch via A_CustomMissile, but the base speed of the projectile will always be constant. Being able to directly use Thing_Projectile (or one of it's counterparts) directly in DECORATE one could fire off projectiles with far greater trajectory varience.
Example
Code: Select allExpand view
actor W_Drop
{
  height 4
  radius 2
  mass 1
  +MISSILE
  renderstyle Translucent
  alpha 0.75
  states
  {
  Spawn:
    DROP A 1
    loop
  Death:
    DROP A 1 A_FadeOut(0.1)
    loop
  }
}

actor W_Fountain : SwitchableDecoration 20000
{
  +NOGRAVITY +NOCLIP +NOBLOCKMAP +NOSECTOR
  states
  {
  Spawn:
  Active:
    TNT1 A 0
    TNT1 A 1 SpawnProjectile(0, "W_Drop", random(0, 255), random(0, 50), random(0, 25), 1, 0)
    loop
  Inactive:
    TNT1 A 1
    loop
  }
}

Otherwise, someone has to resort to something like this.
Code: Select allExpand view
actor W_Drop1
{
  height 4
  radius 2
  mass 1
  speed 12
  +MISSILE
  renderstyle Translucent
  alpha 0.75
  states
  {
  Spawn:
    DROP A 1
    loop
  Death:
    DROP A 1 A_FadeOut(0.1)
    loop
  }
}

actor W_Drop2: W_Drop1
{
  speed 11
}

actor W_Drop3: W_Drop1
{
  speed 10
}

actor W_Drop4: W_Drop1
{
  speed 9
}

actor W_Fountain : SwitchableDecoration 20000
{
  +NOGRAVITY +NOCLIP +NOBLOCKMAP +NOSECTOR
  states
  {
  Spawn:
  Active:
    TNT1 A 0
    TNT1 A 0 A_Jump(192, 2)
    TNT1 A 1 A_CustomMissile("W_Drop1", 0, 0, random(0, 359), 2, random(65, 115)   
    loop
    TNT1 A 0 A_Jump(128, 2)
    TNT1 A 1 A_CustomMissile("W_Drop2", 0, 0, random(0, 359), 2, random(65, 115)   
    loop
    TNT1 A 0 A_Jump(128, 2)
    TNT1 A 1 A_CustomMissile("W_Drop3", 0, 0, random(0, 359), 2, random(65, 115)   
    loop
    TNT1 A 1 A_CustomMissile("W_Drop4", 0, 0, random(0, 359), 2, random(65, 115)   
    loop
  Inactive:
    TNT1 A 1
    loop
  }
}

And even then the results are less desirable. It seems to me there have been a lot of requests for custom particle fountains. I think that DECORATE is already very well set up to make these, to some extent, without some new special custom partical features. Being able to use Thing_Projectile ect like this greatly improves the appearance of such effects while reducing the amount of code needed to create it.

[edit]Argh1! Spelling...
Last edited by solarsnowfall on Sun Aug 20, 2006 4:36 pm, edited 1 time in total.
User avatar
solarsnowfall
 
Joined: 30 Jun 2005

Postby Graf Zahl » Sun Aug 20, 2006 3:50 pm

... and brings down the performance even further... :(
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby solarsnowfall » Sun Aug 20, 2006 4:00 pm

Ah, I hadn't thought if Thing_Projectile would be more demanding than A_CustomMissile. Damn.

Oh well. Used conservatively, some nice effects can be achieved without a lot of noticeable impact to performance. Even with the current limitations.
User avatar
solarsnowfall
 
Joined: 30 Jun 2005

Postby Graf Zahl » Sun Aug 20, 2006 4:02 pm

It isn't. But your particles are. Even on my rather fast computer it brings down the performance on Enjay's Thief level to a level I no longer consider comfortable to play.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Theshooter7 » Sun Aug 20, 2006 4:27 pm

If this is added, can you say droppable weapons ;) (Though it can be done already, this would reduce the amount of work that would need to be done.)

[EDIT] Grammar.
Last edited by Theshooter7 on Sun Aug 20, 2006 5:06 pm, edited 1 time in total.
User avatar
Theshooter7
Don't talk about Fight Club
 
Joined: 05 Mar 2006

Postby Graf Zahl » Sun Aug 20, 2006 4:32 pm

You are making no sense at all.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby solarsnowfall » Sun Aug 20, 2006 4:32 pm

Graf Zahl wrote:Even on my rather fast computer it brings down the performance on Enjay's Thief level to a level I no longer consider comfortable to play.

Each one of those Thief lights had tripple the amount of projectiles being spawned than what I would consider conservative use. That may not be te best example to go by since my goal was to emulate Thief, rather than doing something very simple.
User avatar
solarsnowfall
 
Joined: 30 Jun 2005

Postby Theshooter7 » Sun Aug 20, 2006 5:05 pm

solarsnowfall wrote:Like the recent addition to Radius_Quake, I'd like to see Thing_Projectile and it's derivatives have the ability to treat a TID of 0 as the activator.


@Graf: I am assuming this could work with players as well. Thus, with a bit of scripting, you could easily have Thing_Projectile fire a weapon from the player's position, and then use TakeInventory() to take it from the player's inventory (duh). (For it to shoot in the right direction, GetActorAngle() would work) Thus, droppable weapons. The way I am doing it now is using Spawn() to drop the weapon, and then checking if it was successful. If so, it would remove the weapon from the player's inventory.

I hope that made a bit more sense. :?
User avatar
Theshooter7
Don't talk about Fight Club
 
Joined: 05 Mar 2006

Postby Graf Zahl » Sun Aug 20, 2006 5:30 pm

No, it doesn't. It sounds like a bad approach to a simple problem. If you want to drop an item from DECORATE, there's a dedicated code pointer for that already.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Theshooter7 » Sun Aug 20, 2006 8:43 pm

Well, I know. But the thing is that I do not want to write a huge code for many diffrent weapons. Unless there is someway to detemine the current weapon, or use arrays or something.
User avatar
Theshooter7
Don't talk about Fight Club
 
Joined: 05 Mar 2006

Postby Nash » Sun Aug 20, 2006 11:05 pm

I agree that there needs to be a way to randomize spawned projectiles speeds so any special effects look better. The way things are is just so montonous.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Postby randi » Thu Oct 26, 2006 7:16 pm

Done.
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003

Postby Theshooter7 » Thu Oct 26, 2006 7:48 pm

AWESOME! Thanks Randy! :D
User avatar
Theshooter7
Don't talk about Fight Club
 
Joined: 05 Mar 2006

Postby Nash » Thu Oct 26, 2006 8:20 pm

Thank you very much, Randy. You'll be sure that once the changes are commited, plus the new A_JumpSet function, I will be compiling the new version right away. ;)
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Postby solarsnowfall » Thu Oct 26, 2006 8:30 pm

Thanks again randy!
User avatar
solarsnowfall
 
Joined: 30 Jun 2005


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests