A Christmas present for ZDoom

Moderator: GZDoom Developers

User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

There is a second type of state that takes two parameters for x and y offset, but I dont think decorate weapons have access to it?

I havent really experimented much with this stuff yet, since I've been doing my own weapons in the source itself.

Some random thoughts:

It seems any given actor always contains several different pointers to lots of other actors, and I have been using these to do some intresting things.

Since these pointers are saved within the objects, how about extending certain specials like A_SetInvulnerable, etc to read these pointers as one of their parameters? For example A_SetInvulnerable(lastenemy) would read whatever pointer is in lastenemy and make it invulnerable(ok, crappy example), or even new ones such as A_CopyPointer(lastenemy, target)

Its far from being the most comprehensive way to manipulate an actors behaviour, but it is a start. For example a few pages back I suggested a pointer to set the actors tracer to the actor that spawned it, but this idea is far more flexible and generic.

Perhaps you could take that one step even further, eg a totally generic A_SetActorProperty([object_pointer], [property_name], [new_value])

eg :

A_SetActorProperty(target, angle, angle_t ANG45)
A_SetActorProperty(lastenemy, health, int 50)
A_SetActorProperty(tracer, flags4, |MF4_FIRERESIST)

Of course, I understand if that overcomplicates the parser too much, but I dont know how it works :D
Last edited by Chilvence on Sat Jan 08, 2005 7:09 pm, edited 1 time in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

They have. Add OFFSET(x,y) after the state duration and before the code pointer. I haven't tested it myself though so it may not work.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

randy wrote:I'm stickying this for the time being so that it doesn't get lost.
I don't think it will with the reply rate :P
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

Post by The Ultimate DooMer »

deathz0r wrote:new weapon stuff
Hang on...how can you be playing with new weapons if they haven't been implemented yet?
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Go to page 4 ;)
User avatar
deathz0r
Posts: 353
Joined: Tue Jul 15, 2003 4:09 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Land with them kangaroo
Contact:

Post by deathz0r »

Well, I got a friend of mine to compile a build with Graf's code, so it's a "clean" version of ZDoom without Chilvence's hacks. Enjoy:

http://deathz0r.unidoom.org/junk/96weapons.zip
User avatar
Your Name Is
Posts: 802
Joined: Sun Oct 31, 2004 5:06 pm
Location: Raleigh, NC
Contact:

Post by Your Name Is »

WOW! An early christmas present for me!
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

deathz0r wrote:Stuff about a railgun he made
Can I get that, please? Send it to my MSN adress if you do. :)
User avatar
deathz0r
Posts: 353
Joined: Tue Jul 15, 2003 4:09 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Land with them kangaroo
Contact:

Post by deathz0r »

TheDarkArchon wrote:Can I get that, please? Send it to my MSN adress if you do. :)
You want a do-tims beta, or just the railgun graphics?
User avatar
GeeDougg
Posts: 3651
Joined: Fri Jul 16, 2004 2:39 pm
Location: VanCity, British Colonies, Isolated Republic Of Canuckistan
Contact:

Post by GeeDougg »

Sounds like he just wants the railgun. But who wouldn't want the DO-TIMS beta? You'd have to be an idiot not to want that. No joke.

Edit: Unless the only reason you don't want it is because you're waiting for the full release....
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Graf Zahl wrote:
Chilvence wrote:Hmm, I just had a look at the existing blast radius code, and it seems like it checks through every actor on the map (!) to see whether it is in range and blastable... this doesnt seem to make sense. Surely there is a more efficient way to do this, eg just checking through objects that occupy nearby blockmap blocks?

Of course there is. But that's one unavoidable part of commercial game programming. If the hack works it is unlikely to be removed. There are always more important things to do.
I have a followup question; it seems they only coded it like this because of the fact that you cannot scan for missiles in the blockmap. But I think being able to scan for missiles is actually quite desirable, for one you could implement some intresting monster defenses with it. Lets say hypothetically that all missiles were linked to a blockmap block (but still obeyed the existing collision behaviour). Do you think that would impact performance much? (I'm asking this before I start mangling my zdoom source in a bizzare experiment...)

Otherwise, is there a way to find all sectors that occupy a given blockmap area, and then look through those sectors for missiles? If there is something that is similar to this in the source already, can you point me to it?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Chilvence wrote:
I have a followup question; it seems they only coded it like this because of the fact that you cannot scan for missiles in the blockmap. But I think being able to scan for missiles is actually quite desirable, for one you could implement some intresting monster defenses with it. Lets say hypothetically that all missiles were linked to a blockmap block (but still obeyed the existing collision behaviour). Do you think that would impact performance much?
In 1993 it mattered. With today's computers the performance impact is irrelevant.
Otherwise, is there a way to find all sectors that occupy a given blockmap area, and then look through those sectors for missiles? If there is something that is similar to this in the source already, can you point me to it?
That would be much more calculation intensive. The blockmap has been invented to avoid having to do it this way.
User avatar
Finalizer
Posts: 180
Joined: Fri Sep 24, 2004 6:07 am

Post by Finalizer »

I had the same problem with weapon offsets going all over the place, the knife in my game goes way up on the screen for some reason whenever custom punch is used, as if it's supposed to be a firing frame... I don't have any screenies with me, sorry.

Heh... this might as well be 2.0.96a!
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

deathz0r wrote:
TheDarkArchon wrote:Can I get that, please? Send it to my MSN adress if you do. :)
You want a do-tims beta, or just the railgun graphics?
Just the graphics. I just want something to experiment with.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

I just looked at the state offset issue. It appears to be a bug (state.Misc2 is left uninitialized.) I'll fix it ASAP. This obviously means I have to update the attachment to the first post.

Since I won't have any time for 4-5 hours anyway to do something about it I think it's a good chance to add stuff anybody here has done with this code. Feel free to send them to me by email and if it's good I'll add it.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”