[Added] A Christmas present for ZDoom

Moderator: GZDoom Developers

A Christmas present for ZDoom

Postby Graf Zahl » Sun Dec 26, 2004 4:53 pm

First the bad news:

I am still unable to add attachments to private messages. I wasn't able to send this that way and it is the reason this ends up in Bugs, not General. ;)

Now the good news:

Since I had some time the last few days I thought I'd clean up the messier part of my Thingdef code. The flag and the code pointer handling in particular were things I was never particularly happy with.

In the process I also added full support for new inventory items (which was easy - all it required was to add the required properties to the existing table and do some class type checks.) and weapons (which thanks to the new inventory system is now a lot cleaner and better integrated into the process than the old version that never got released.)

I hope this doesn't interfere with any plans for the future but the relevant changes are restricted to the actor properties table so it shouldn't be a real problem. The rest is just internal cleanup that shouldn't matter for this.

See the included file thingdef_v2_0.txt file for more information.


EDIT (1/13/2005):

I fixed the weapon offset bug that was mentioned in the thread several times. Everybody who wants to compile the source should note that the fix was in p_pspr.cpp so you have to apply the .diff to the original .96 source again!

EDIT (1/30/2005)
As requested I added an option to A_CustomMissile to launch missiles without aiming at the target. I also corrected a mistake in this function which completely ignored the vertical part of the velocity when adjusting the angle of a missile. I also altered A_JumpIfCloser so that it can be used with weapons now and fixed a bug that would have resulted in a crash if it was called by a monster without a target.

For the new features please look here: http://forum.zdoom.org/viewtopic.php?t=4698&start=152


EDIT (5/22/05): New update:

Features include:

-Use and Pickup states. These are executed when an item is either being picked up or uses. Delays and sprites in these states are ignored!
-Obituaries for weapons.
-Some DECORATE related bug fixes.
Last edited by Graf Zahl on Sun May 22, 2005 5:36 am, edited 5 times in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Cutmanmike » Sun Dec 26, 2004 4:59 pm

In the process I also added full support for new inventory items (which was easy - all it required was to add the required properties to the existing table and do some class type checks.) and weapons (which thanks to the new inventory system is now a lot cleaner and better integrated into the process than the old version that never got released.)


*drool*

Um.... Say graf, do you live in the bugs forum or what? :)

Edit: I don't read bad news :P
User avatar
Cutmanmike
Is it hot in here or is it just ZScript
 
Joined: 06 Oct 2003
Location: United Kingdom

Postby Graf Zahl » Sun Dec 26, 2004 5:06 pm

cutmanmike wrote:Um.... Say graf, do you live in the bugs forum or what? :)

Edit: I don't read bad news :P



No, but it's an interesting place to hang out! ;)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Cutmanmike » Sun Dec 26, 2004 5:07 pm

Ok so prehaps you could tell us a bit more about the possibilities of adding inventory?

edit: typo
User avatar
Cutmanmike
Is it hot in here or is it just ZScript
 
Joined: 06 Oct 2003
Location: United Kingdom

Postby Graf Zahl » Sun Dec 26, 2004 5:20 pm

I'll write a full documentation when this is being released. It's a far too complex matter to describe it in a few sentences. It's no miracle though. You won't be able to add any stuff that is completely different than the one that already exists.

Most of what can be done with it can already be done with ACS and lots and lots of very tedious scripting so in the end it's more about saving time - except for weapons of course.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Scuba Steve » Sun Dec 26, 2004 9:55 pm

So in upcoming zdooms, you'll be able to define your own new items without needing scripts to define what they do?
Scuba Steve
 
Joined: 28 Mar 2004

Postby wildweasel » Sun Dec 26, 2004 11:30 pm

Scuba Steve: If that's so, I'm going to make a realism weapons mod for ZDoom, with manual reloading (ie. select the right clip from the inventory and use it).
User avatar
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 16 Jul 2003

Postby The Ultimate DooMer » Mon Dec 27, 2004 6:23 am

I need custom items for my next project...
User avatar
The Ultimate DooMer
Will you start the fans please!
 
Joined: 15 Jul 2003
Location: Industrial Zone

Postby Graf Zahl » Mon Dec 27, 2004 6:38 am

That doesn't surprise me. :) You might get them!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Chilvence » Mon Dec 27, 2004 6:45 am

Yay! A_TossGib!
User avatar
Chilvence
I had been waiting for Doomscript....
 
Joined: 12 Aug 2003

Postby Cutmanmike » Mon Dec 27, 2004 2:14 pm

Would high jump boots be possible? I always wanted those :)
User avatar
Cutmanmike
Is it hot in here or is it just ZScript
 
Joined: 06 Oct 2003
Location: United Kingdom

Postby Graf Zahl » Mon Dec 27, 2004 3:26 pm

No. They'd have to be coded.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Chilvence » Mon Dec 27, 2004 3:58 pm

Hey Graf, are you open to suggestions for generic weapon functions?

These are four ideas anyway, that I think would do a good service :

Random target pickers would allow you to make projectile effects similair to the Wraithverge, but with custom behaviour. The way I think it would work would be to specify a certain arc for an actor to look for new targets, and then face that target in the same way as A_FaceTarget. Then you fire a secondary projectile, which could be a wraithverge ghost, part of a homing cluster missile, grappling hook, etc. Possibly only useful for powerful superweapons, but intresting nonetheless

Force fields would allow you to throw monsters, projectiles and bits of scenery around in intresting ways. With these, you could implement rudimentary telekinetic powers, create some whirlwind or black hole type effects, and generally cause mayhem. To define them, I think the most comprehensive way is to specify three things:
1: an arc in which the force takes effect, so you can have things that only affect what is right in front of them, or behind, etc . This will be something like angle + range from object, so thats really two things, and of course some interpolation would be good so that there isnt a hard cutoff point where the force ends
2: the direction of the force (in relation to the object), so that the force can knock things to the left, right, push them away or pull them in close
3: how much force to apply :)
Also, whether the force can apply to monsters, projectiles, or both would be useful

Angle/direction modifying functions would be useful for creating projectiles with erratic flight paths, for example the bishop missile, the cleric serpent blob, or the Doom 3 revenenant missile. You can make unpredictable paths, or movement patterns, or simply something with a curved path. This is probably a mess to implement from what I've seen of the doom movement code, but it would be nice to just boil down the parameters to pitch and yaw, positive and negative ranges.

Custom pallette shifts - these would be excellent for visual effect, for example you can make rudimentary custom damage effects, or projectiles or artifacts that blind opponents, for example flashbang grenades, or octopus ink, or holy light/unholy darkness kinda stuff.

These are just a few ideas anyway, hopefully they would be as useful as I am thinking they are right now :D I'm sure I could also think of more, if you locked me in a basement and didnt feed me until I did.
User avatar
Chilvence
I had been waiting for Doomscript....
 
Joined: 12 Aug 2003

Postby Cutmanmike » Mon Dec 27, 2004 4:13 pm

Graf Zahl wrote:No. They'd have to be coded.


Aww. Couldn't you make the inventory item activate a script which uses thrustthingZ?
User avatar
Cutmanmike
Is it hot in here or is it just ZScript
 
Joined: 06 Oct 2003
Location: United Kingdom

Postby Graf Zahl » Mon Dec 27, 2004 4:40 pm

Chilvence wrote:Hey Graf, are you open to suggestions for generic weapon functions?


Right now I am waiting for this to be included (or not)

These are four ideas anyway, that I think would do a good service :

Random target pickers would allow you to make projectile effects similair to the Wraithverge, but with custom behaviour. The way I think it would work would be to specify a certain arc for an actor to look for new targets, and then face that target in the same way as A_FaceTarget. Then you fire a secondary projectile, which could be a wraithverge ghost, part of a homing cluster missile, grappling hook, etc. Possibly only useful for powerful superweapons, but intresting nonetheless


The Wraithverge is the most complicated thing ever developed in a Doom engine game. So this has very, very low priority. There are other things that are much more important to do first (like moving all the actor stuff out of the exe.) The Wraithverge consists of 23k of source code.

Force fields would allow you to throw monsters, projectiles and bits of scenery around in intresting ways. With these, you could implement rudimentary telekinetic powers, create some whirlwind or black hole type effects, and generally cause mayhem. To define them, I think the most comprehensive way is to specify three things:
1: an arc in which the force takes effect, so you can have things that only affect what is right in front of them, or behind, etc . This will be something like angle + range from object, so thats really two things, and of course some interpolation would be good so that there isnt a hard cutoff point where the force ends
2: the direction of the force (in relation to the object), so that the force can knock things to the left, right, push them away or pull them in close
3: how much force to apply :)
Also, whether the force can apply to monsters, projectiles, or both would be useful


:shock: :?

Get real, man! I don't have the time to code a completely new game, and I don't think Randy has either. Yes, it sounds nice and it is certainly not impossible but I'll tell you the same thing as I told Sphagne several times: Find a competent coder to do it for you and submit it.

Angle/direction modifying functions would be useful for creating projectiles with erratic flight paths, for example the bishop missile, the cleric serpent blob, or the Doom 3 revenenant missile. You can make unpredictable paths, or movement patterns, or simply something with a curved path. This is probably a mess to implement from what I've seen of the doom movement code, but it would be nice to just boil down the parameters to pitch and yaw, positive and negative ranges.


The functions for the Bishop's missile and the Serpent Staff missile can be easily added to the list of available code pointers. I merely forgot them.
As for a generic implementation: forget it! I don't have and desire to mess with this. Just look at the function for the Bishop's missile to see why:

Code: Select allExpand view
void A_BishopMissileWeave (AActor *actor)
{
   fixed_t newX, newY;
   int weaveXY, weaveZ;
   int angle;

   weaveXY = actor->special2 >> 16;
   weaveZ = actor->special2 & 0xFFFF;
   angle = (actor->angle + ANG90) >> ANGLETOFINESHIFT;
   newX = actor->x - FixedMul (finecosine[angle], FloatBobOffsets[weaveXY]<<1);
   newY = actor->y - FixedMul (finesine[angle], FloatBobOffsets[weaveXY]<<1);
   weaveXY = (weaveXY + 2) & 63;
   newX += FixedMul (finecosine[angle], FloatBobOffsets[weaveXY]<<1);
   newY += FixedMul (finesine[angle], FloatBobOffsets[weaveXY]<<1);
   P_TryMove (actor, newX, newY, true);
   actor->z -= FloatBobOffsets[weaveZ];
   weaveZ = (weaveZ + 2) & 63;
   actor->z += FloatBobOffsets[weaveZ];   
   actor->special2 = weaveZ + (weaveXY<<16);
}


Custom pallette shifts - these would be excellent for visual effect, for example you can make rudimentary custom damage effects, or projectiles or artifacts that blind opponents, for example flashbang grenades, or octopus ink, or holy light/unholy darkness kinda stuff.


Use ACS and the faders. It works perfectly! Of course an A_Setfade function could be added. This is rather simple by comparison.

These are just a few ideas anyway, hopefully they would be as useful as I am thinking they are right now :D I'm sure I could also think of more, if you locked me in a basement and didnt feed me until I did.


Before suggesting such stuff I stongly recommend to do at least a little research about the amount of work required to do it. Most of this is quite impractical to do compared to its usefulness.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Next

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests