Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
40oz

Animating objects with dehacked

Recommended Posts

I made a new rain drop decorative object that animates using the keen death sprites, but when I put them together in one room, i noticed they all animate perfectly in sync with each other, which I found really unusual. I made a test map with this using various other animated decoration things like the twitching hanging body, and torches, and they all animate a little more randomly.

What's up with that? Does it have to do with how few frames they use?

Also what are some options that I have to make my raindrops animate a little more randomly? Is there a way I can make them asleep until they see the player, and then have them start animating after they are awake? Then I could just have the rain drop objects all facing in random directions. I just don't want all my rain drops to fall at exactly the same time, and then delay, then drop again.

Share this post


Link to post

Yeah you could have them asleep until they see the player.

Or you could replace one of the decorations that animate randomly (maybe those things are hardcoded to animate randomly?).

Or you could replace a few decorations with different rain drops. The first frame of each rain drop being different - one rain drop hasn't fallen yet, another rain drop has fallen a bit, another rain drop has almost fallen to the ground, etc.

Share this post


Link to post

I'm having a bit of trouble making the objects see the player, Not sure what I'm doing wrong. They're activated by sound though, but that still makes them animate in sync.

Hmm... well I really like most of the decorations in Doom and plan on using a lot of them. There are very few I can spare.

Maybe I could edit the sprite so that each of the 8 angles you can see the rain drops from shows the drops at a different height? Maybe that could work.

Share this post


Link to post

Okay, here's what I did...

I took commander keen, and gave his initial state (frame 763) the A_Look codepointer and gave it a duration of 1. I then assigned the death state (frame 764) as its chase state, and made the death frame sequence loop over itself. Finally, I gave the thing the AMBUSH flag to ensure it would only wake up if it saw me.

Basically, as you round a corner, they begin animating, so you'll more or less have this "wave" of downpour, which may or may not look good. Assuming the death frame durations are rather short, it might produce a random enough animation. Who knows, it might look pretty cool with your rain sprites. :)

Patch File for DeHackEd v3.0
Doom version = 19
Patch format = 6

Thing 25 (Commander Keen)
First moving frame = 764
Bits = SOLID + SHOOTABLE + AMBUSH + SPAWNCEILING + NOGRAVITY + COUNTKILL

Frame 763
Duration = 1

Frame 775
Duration = 6
Next frame = 764

[CODEPTR]
Frame 763 = Look
You will probably want to make it so the player encounters them after they have fired their weapon. Otherwise, you'll need to face them so they always see the player when he comes into view.

Share this post


Link to post

EDIT: thanks I got it working now. And it looks great! The wave of raindrops can be a little noticeable if you spend enough time looking at it, but anything is better than them all falling perfectly synchronized with each other.

Share this post


Link to post

It would be interesting to use the MBF codepointer Spawn to create the rain drops. This way, they will fall by gravity. Only sad thing is that I don't know how you can make them detect the ground and disappear, unless they're projectiles (and you can't waste a stock projectile for this unless it's Doom 1).

Share this post


Link to post

Yeah initially I wanted to make the object spawn from the ceiling and fall down with gravity, but I couldn't figure out how to make it go back up to the ceiling. I was hoping there was a way to inherit the bullet puff's behavior by floating up to the ceiling then changing its state to an object with gravity again but it couldn't be done. With the amount of frames I'm using now it's just as good.

Share this post


Link to post
printz said:

It would be interesting to use the MBF codepointer [...] you can't waste a stock projectile for this


If you're using MBF features, you have plenty of things you can waste, including two plasma projectiles.

Share this post


Link to post

Yes but probably only the frames, right? I don't think there are monster-projectile codepointers to shoot them, so in the end, all I gain is a few more frames.

40oz said:

Yeah initially I wanted to make the object spawn from the ceiling and fall down with gravity, but I couldn't figure out how to make it go back up to the ceiling. I was hoping there was a way to inherit the bullet puff's behavior by floating up to the ceiling then changing its state to an object with gravity again but it couldn't be done. With the amount of frames I'm using now it's just as good.

I was basically talking about a ceiling-hanging object that repeatedly shoots gravity-affected projectiles of 0 damage (the marine and monsters might pant, though). That doesn't require MBF, but MBF (which is supported by PrBoom and most of its basic features by ZDoom) has that Spawn codepointer which lets you spawn any other nonprojectile thing you like. I'm not sure how -complevel affects MBF Dehacked support in PrBoom though.

But your solution seems more robust as long as you have all the sprites necessary to make it smooth.

Share this post


Link to post

It might work better if it is possible to create a rain effect that follows the camera at a certain distance like in Daggerfall but that can't be done without using a compatible source port at least.

I once had an idea and desire to create a raining blood/fire/ash effect but I am too distracted to work on anything like that.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×