Jump to content
The Dark Mod Forums

Messin' around again... a drawbridge this time


PranQster

Recommended Posts

  • Replies 62
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Congrats with the chain looking correctly synched. BTW what about AI crossing it? You can't bind monsterclip to it because it has to be worldspawn. I think if you build the monsterclip across the gap then the AI cannot cross it until the bridge descends into it so that should work. I'd be interested if you can confirm that unless you have some other method.

 

However what the AI do about lowering the bridge I daren't imagine!

Link to comment
Share on other sites

I'm guessing they are bound to the drawbridge but with that spawnarg that keeps them oriented in one direction (bit like the drive shafts on a locomotive engine.) could be wrong though. I'd have to look to remember the spawnarg but its something like bind_something

 

I had this problem in Thief and had to bodge it!

Link to comment
Share on other sites

Actually I don't think that would work because the chains need to rotate.

 

OK, my second guess is that the chains are also doors with their origin on the drawbridge to which they are bound. As the drawbridge opens the chains rotate the other way but at a different speed so just clever timing.

 

In the secret compartment of the big desk I had one rotating door bound to a sliding door so it opened up but slid away. I also added that to Builder's Influence. Needs trial and error but quite effective. The crystal petals in Heart also open that way.

Link to comment
Share on other sites

I'll record a video later... maybe this evening. Last night I added a portcullis which turned out pretty decent... it raises after the bridge and wooden door stop moving. I might make it so the portcullis raises and lowers first or I might just sync it with the bridge.

 

About the chains... The chains are also mover_door bound to the bridge (bound to the metal ring, actually) and have 2 more chain models bound to them (three chain models on each side, all lined up). I found that if I tried to change the origin of the chains then the whole chains moved and the origin stayed in the middle of the chain... so...

They do a 52.5 degree rotation plus they have translate set as well. I had to tinker with the translate and rotate values until I got them to be positioned correctly when the bridge stopped moving. It's not perfect though. What you do not see in the screenshot is that the ends of the chains get a bit off position with the bridge during the rotation and translation. Having the portcullis stay closed until the bridge stops helps with that because the player cannot see that problem from their position while the bridge is in motion.

 

When the bridge is in its start position, vertical, the walking surface faces what I consider to be north (top of screen) in the DR editor. With that in mind the following settings are used.

The bridge plank is 232 tall and rotates around its bottom edge with a simple rotation:

rotate 0 0 90

move_time 15

stop_when_blocked 0

 

The chains connected to the bridge (with /dungeon/metal_ring.ase embedded in the bridge):

move_time 15

rotate 52.5 0 0

translate 0 50.5 25

 

In the wall, just below where the chains emerge, is a windlass made from a 2 gear models (one is a mover_door) and 2 cylinders all bound. Inner cylinder has an iron texture and the outer cylinder has a chain texture (needs updating, chains aren't linked in that texture). The windlass is simply for decoration, but it rotates in sync with the bridge. I might not keep the windlass... it should be hidden behind the wall anyway... no need to see it unless from the inside of the castle.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Congrats with the chain looking correctly synched. BTW what about AI crossing it? You can't bind monsterclip to it because it has to be worldspawn. I think if you build the monsterclip across the gap then the AI cannot cross it until the bridge descends into it so that should work. I'd be interested if you can confirm that unless you have some other method.

 

However what the AI do about lowering the bridge I daren't imagine!

 

Those are all things I need to work on. I think I'll put an AI on the opposite side of the span (like an invader).

As far as an AI opening the bridge, I have an idea of sneaking up outside, shooting an arrow (maybe gas arrow?) through a cannon port to hit a guard inside. The guard falls, unconscious or dead, and triggers the bridge lever when he falls.

That's how I see it happening.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Videos:

No audio this time... my desktop recorder either records video with no audio (ffmpeg-recorder), or audio with completely crappy botched video (RecordMyDesktop default recorder). So if I want the audio I need to use a separate audio recorder and then do a bunch of trimming and mixing :(

Besides, the door movers still have the default door open and close sounds in addition to the chains and stone-door loop plus mechanical noise4 for the portcullis.... so the audio is a bit busy and needs attention.

 

Bridge Opening

Bridge Closing

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Those vids look pretty cool, impressive that you worked out the chains so well.

 

(both clips are 30 seconds - you might try the free version of FRAPS which allows 30 second clips - it records very well with sound and probably at a better framerate than those avi's)

shadowdark50.gif keep50.gif
Link to comment
Share on other sites

Ran out of time tonight but I'll have a look tomorrow. I'm wondering if you might have a problem with rotate and translate on the same door (if that's what you mean.) I believe it works first frob but then goes strange. But it can be done with two separate doors bound.

 

I don't know if any player would think to drop an AI onto the lever. What is more 'expected' by old timers anyway is the possibility of shooting an arrow at the lever. I'm not sure if this yet works but it could be made to work with a damage stim or something.

Link to comment
Share on other sites

Those vids look pretty cool, impressive that you worked out the chains so well.

 

(both clips are 30 seconds - you might try the free version of FRAPS which allows 30 second clips - it records very well with sound and probably at a better framerate than those avi's)

 

 

Thank you.

Yeah, the framerate was set to 30fps but was a bit chunky... possibly since doom3 was in a window and DR was on my second monitor, fullscreen and both making use of antialiasing. I don't think ffmpeg recorded as well as it could have. Plus I then used avidemux with mplayer-resize filter to resize the vids to 50% horiz. and vert. and then re-encoded into MPEG4/AVI.

I could post the original videos which look much better, but are about 67Megs apiece.

 

I'll check out FRAPS, if it is a winderz app then I'll see if it will run with Wine.

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Ran out of time tonight but I'll have a look tomorrow. I'm wondering if you might have a problem with rotate and translate on the same door (if that's what you mean.) I believe it works first frob but then goes strange. But it can be done with two separate doors bound.

 

I don't know if any player would think to drop an AI onto the lever. What is more 'expected' by old timers anyway is the possibility of shooting an arrow at the lever. I'm not sure if this yet works but it could be made to work with a damage stim or something.

 

The rotate and translate works fine with multiple frobs. What was weird at first was climbing on the bridge while it was being raised... the bridge stopped rotating but the chains did not and pointed up at too high an angle. Using stop_when_blocked 0 fixed that problem and the bridge and chains stay rotating properly together.

The very end links of the chains translate a bit out of place during the rotation, but by the end of the rotation they are where they should be.

I'm thinking of having a wench winch/windlass system in that room which could be triggered with an arrow hit. Will work on that.

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Also, how can I set a lever to be non-frobbable for a set amount of time after being frobbed?

I tried 'move_time' '15' in combination with 'interruptable' '0', but that only worked nicely for opening the drawbridge. It would work fine if 'trigger_on_close' did what it sounds like it should do, instead of behaving like what should be 'trigger_when_closed'.`

 

LOL, I just discovered the wonderful world of 'trigger_relay' combined with 'wait'. Now all movers and speakers trigger properly and do not get interrupted, so now no weird positioning of chains or sounds looping when they should be silent due to a premature frobbing. Though I'd still like to make the lever non-frobable for a set amount of time after each use.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Use Func > Movers > func_rotating for cogs. They can be stopped started by triggering. Give it start_on 0 so it is not rotating at start. Give it either x_axis 1 or y_axis 1 or leave it to default to the z axis rotation. These rotations are relative to the model so you don't need combos or funny angles; once you have got the right one for eg, a cog model, then even if you rotate that model to a funny angle it still works. (unsure about brush entities though!)

 

Drag a small brush around a lever and make it atdm:target_set_frobable. Give it start_frobable 1 so the lever starts frobable. You must now add two more targets to your lever. One direct to this so when you frob the lever it becomes unfrobable. The other target goes to a relay with a delay and from that to the atdm:target_set_frobable to re-enable it again.

Link to comment
Share on other sites

Use Func > Movers > func_rotating for cogs. They can be stopped started by triggering. Give it start_on 0 so it is not rotating at start. Give it either x_axis 1 or y_axis 1 or leave it to default to the z axis rotation. These rotations are relative to the model so you don't need combos or funny angles; once you have got the right one for eg, a cog model, then even if you rotate that model to a funny angle it still works. (unsure about brush entities though!)

 

Drag a small brush around a lever and make it atdm:target_set_frobable. Give it start_frobable 1 so the lever starts frobable. You must now add two more targets to your lever. One direct to this so when you frob the lever it becomes unfrobable. The other target goes to a relay with a delay and from that to the atdm:target_set_frobable to re-enable it again.

 

Thanks for the tips :) I'll try doing those tomorrow.

 

I got the AI to cross the bridge (no path set up yet, just the AI attacking), but had to put a nodraw solid door on the other side to prevent it from walking out onto the monsterclip before the bridge was lowered all the way. The AI still tends to try to jump onto the monsterclip from the sides before the invisible door is lifted, often landing in the water. I guess I'll bind a couple extensions to the sides of the door to prevent it from doing that.

Here's another vid, this time with sound mixed in.

 

Bridge plus AI

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Very cool!

 

What app did you use under linux to record a video of doom3? I could use something even if it has no audio!

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Looking good. Might make a nice prefab when polished off.

 

Thanks, I'll plan on doing that then.

 

 

Very cool!

 

What app did you use under linux to record a video of doom3? I could use something even if it has no audio!

 

I used RecordITNow http://recorditnow.sourceforge.net (maybe only for KDE4??) configured to use ffmpeg-recorder (set to .avi), set a capture frame to match my game resolution and placed it around my doom3 window. I set it for a 30 sec. clip and a 15 second pre-record countdown. I then opened Audacity and pressed 'pause' and 'record'. I pressed record in RecordItNow and when the timer got down to 5 seconds, I deselected 'pause' in audacity, then switched to the doom3 window in time for the recording to start. After that I cut the first 5 seconds from the audio recording and trimmed the rest to a 30 second clip. Avidemux came next to merge the audio and video. In Avidemux I used an audio filter to offset the audio track timing (used Time shift = 500ms) until I got it to sync (roughly) with the video. And I used the mplayer resize video filter in avidemux to scale the video to 50%. In the main Avidemux window I chose 'MPEG-4 ASP (lavc)' for video and 'MP3 (lame)' for audio and then 'AVI' for format and saved the video.

 

Very cool stuff, and great attention to detail. The recessed portcullis holes made me grin. ^_^

 

 

Thanks :) I made a little brush the same shape as the bars (and same texture as the stone) and cloned it to place where each recess was needed and then used CSG Subtract and all holes were made in one go.

 

is this gonna be released to the community as a prefab at some point..?

 

I'll give it a little more TLC and do just that (after I learn how to make a prefab). My firing cannon (both lever and fire-stim activated) will be included. Maybe someone can help with my cannonball translate timing... it can be seen to hover briefly at the end of its translate (while the lever trigger resets) and then return to the cannon, lol. The magical Homing Cannonball. Also, if I fire the cannon before opening the bridge, it takes 4 shots to kill that AI. I will need to up the damage the cannonball does at least 4x.

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

 

I couldn't find recorditnow for (K)ubuntu, but then, it sounded way to complicated anyway :)

 

So I googled and found this:

 

Use "recordmydesktop" but make sure you enable audio capture:

 

http://ubuntuforums.org/showpost.php?p=8734341&postcount=363

 

Also, note this trick (it worked here, too, but produces much worse quality than recordmydesktop):

 

ffmpeg -f oss -i /dev/audio -f x11grab -s 320x240 -r ntsc -i :0.0 capture.mpg

 

(Adjust -s accordingly :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

What kind of entity is the cannonball? I was wondering if it could be made a func_static with hide 1 and bound to a nodraw translator. Target the cannonball at each end would hide/unhide it.

 

[edit] so when fired it is made visible but at the end of the translate it is made invisible while it returns.

Link to comment
Share on other sites

I couldn't find recorditnow for (K)ubuntu, but then, it sounded way to complicated anyway :)

 

So I googled and found this:

 

Use "recordmydesktop" but make sure you enable audio capture:

 

http://ubuntuforums....1&postcount=363

 

Also, note this trick (it worked here, too, but produces much worse quality than recordmydesktop):

 

ffmpeg -f oss -i /dev/audio -f x11grab -s 320x240 -r ntsc -i :0.0 capture.mpg

 

(Adjust -s accordingly :)

 

I tried recordmydesktop and xvidcap. Unfortunately those did not do the trick.

Xvidcap proved to be AWESOME at recording desktop applications and the desktop itself, with perfect framerate and mouse cursor capture.

But both of those failed to capture changes within the doom3 window... I'd get a video stuck on the first captured frame. Only RecordItNow was able to capture changes within the doom3 window. Recorditnow can capture audio, but not when using the ffmpeg plugin. I'll see if I can tweak it for including audio with ffmpeg. The above ffmpeg command proves that it can capture audio... perhaps it is defaulting to /dev/audio instead of /dev/dsp, which would be necessary for it to grab my audio.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • nbohr1more

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 4 replies
×
×
  • Create New...