Alien Trampoline Model

Moderator: Rex Claussen

User avatar
Enjay
Developer
Developer
Posts: 4720
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Alien Trampoline Model

Post by Enjay »

Seeing as how I was messing around with the Xen trampoline texture thingy, I thought "why not make a model".

Again, feel free to use or discard as you see fit.

Image

The ones in the starting room are just placed so that you can see what they look like. The ones outside have been placed on lines that run a script so that they actually appear to do something.

I apologise for the sound effect (and the music). I couldn't remember what these things actually sounded like in game - but I bet is wasn't like this. :P


I tried to get them to be a size that I thought felt about right. If, however, you like them but feel a need to alter their scaling, this will affect how well the wall and ceiling versions align with the wall and ceiling respectively. I can, of course, modify things if you need.

At present, the ceiling one sits pretty well in line with the ceiling simply by placing it in a map. Altering the scaling will lower it below the ceiling or push it above it slightly. It's just the way that ceiling decorations work.

The wall one is setup so that placing it 8 units in front of a wall works pretty well but, again, changing the scale would alter that.

Both of these things can be addressed if you do want to change the scale.

The only disappointment is that model translucency in a skin is either fully transparent, or fully opaque. So the edges of the skin look a bit abrupt. If you look at the skin PNG itself, you can see that the edges are smoother than they appear in game. Of course, if you didn't want a 3D model, then the skin could just be used as a texture I guess.

[edit]the edges can be fixed by making the renderstyle of the actor Translucent with an Alpha of 1.0, but that introduces some other minor visual anomalies (due to back face culling I think) so I went back to the hard edges which, IMO, look better than the anomalies caused by making the model translucent. [/edit]

[edit2]Oh, and, just to mention it, the model skin is slightly hi-res. If you want it to look a bit more consistent with Doom pixel-sizes, resizing the skin to 128x128 gets it pretty close. (Using a smart sampling/blending method works better than pixel resizing.)[/edit2]

[edit3]OK, I just improved these things. I forgot to give them an animation - they have one now. It's nothing fancy: just a three-frame flexing animation. The trampolines can be activated/deactivated with a script. They actually spawn and go into in their dormant (lowered) position when placed in a map. Activating them makes the middle part rise up a bit (quite quickly). Deactivating them returns them to their lowered position (which happens a bit more slowly).

A looping script randomly activates and deactivates the ones in the start room of the test map.

This movement currently doesn't make a noise, but it would be trivial to add some kind of squelchy sound for the activation/deactivation.

Anyway, I think these are done to beta standard at least now.
Bouncy_HL.pk3
(112.06 KiB) Downloaded 56 times
Just load with Doom2.
[/edit3]

[edit4]Just a note that the DECORATE is a bit copy/pastey simply because I wanted each one to be stand alone. It would, of course, be possible to define just one of them and then inherit to make the others, changing only the relevant items. It's only a few bytes of text anyway. :P [/edit4]
User avatar
Enjay
Developer
Developer
Posts: 4720
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: Alien Trampoline Model

Post by Enjay »

Enjay wrote: Mon Sep 13, 2021 15:59 They actually spawn and go into in their dormant (lowered) position when placed in a map. Activating them makes the middle part rise up a bit (quite quickly). Deactivating them returns them to their lowered position (which happens a bit more slowly).
I thought I might as well explain/clarify this, as much for my own note taking as anything.

I originally set them so that their active state was actually their resting appearance and their inactive state was the raised appearance. This worked, but it was counter-intuitive to "deactivate" them in a script to effectively activate them from a player perspective.

So, I reversed things to be set out more logically and set the actors to have the DORMANT flag in their DECORATE. This worked, but had an unfortunate (albeit minor) side effect: they jumped straight to their inactive state on spawning (ignoring the spawn state entirely) so if you were near one when the map started, you could see them appear in their raised position and then fall down to their flatter appearance. Not the biggest problem in the world, but undesirable.

Final fix: remove the DORMANT flag to allow the actors to use their spawn state. The spawn state has been set to simply contains an instruction to jump to the last frame of the inactive state. This means that they first appear lowered (which is what was wanted) and activating them makes them jump to their active raising state sequence - also desired.

The only unknown that I have here is whether when they spawn they are truly DORMANT or not. i.e. does jumping straight to the inactive state actually set them as dormant or not? I suspect not but in the case of a simple, non-interactive actor where the main difference between active and inactive is just the actors appearance, I don't think that it will matter.

However, for a "belt and braces" approach, I added a single frame into the spawn state sequence with A_ChangeFlag in it to set the dormant flag before the item jumps to the last frame of the inactive state. It seems to work as intended. So, these items will always set themselves as DORMANT when placed in a map and will need to be activated to flex (which is the intention) but they do it via setting a flag in their spawn state rather than using the DORMANT flag in the general actor parameters.

Ultimately, I'm really just using the active and inactive states as convenient state labels that use the activation/deactivation system built in to GZDoom. I could almost as easily just given them arbitrary state names and used SetActorState in scripts instead. So I really don't think it matters in this case but I'll keep an eye on things and ponder some more just until I either a) come up with something better or b) simply forget it. :P
User avatar
Rex Claussen
Developer
Developer
Posts: 2597
Joined: Tue Jul 11, 2006 18:36
Contact:

Re: Alien Trampoline Model

Post by Rex Claussen »

Wow! Those models are spectaular! And not just in the way they look and are animated, but the way they work. Incidentally, the edges look fine, and will be even less noticeable when used on the Xen dirt textures.

When I first stepped into the outdoors area I saw the soulsphere on the ledge and wondered how in heck was I supposed to get it. Then I took the steps up to the wall-mounted trampoline and et voila! Just as effective as rocket-jumping. And producing far less wear and tear.

The wall-mounted trampolines give me so many wicked ideas for maps!

There is just one minor point: Paranoiac already uses a trampoline texture (xenflr06). It blends with a quasi-rocky texture (xenflr05). I have used the same textures with the trampoline jumps in the Xen maps of Parallax. The jumps are activated when the player steps on the trampoline and uses the jump key (not the way they were set up in Half-Life and how you've set it up - stepping on/next to it activates it). I'd rather not go back and redo the texturing & scripting of all the previous and current maps. Therefore, what I propose is that we use the trampoline models only in the Deimos episode and in the "temple" map in Xen, which is still WIP. (It will be a shame not to use them throughout the Xen maps.) I might create a map themed entirely on using these jumps to progress.
User avatar
Enjay
Developer
Developer
Posts: 4720
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: Alien Trampoline Model

Post by Enjay »

Glad you like them. :)

Feel free to use them however you wish. If you don't want to go back and edit stuff, fair enough. This just gives you options.

Much like I imagine the texture based ones are, the actual thrusting of the player in the map was all done via scripting. So each trampoline can easily be given its own thrust characteristics to suit whatever is needed. The trampoline itself is merely a visual effect with the animation being triggered via activating/deactivating the item.
User avatar
Rex Claussen
Developer
Developer
Posts: 2597
Joined: Tue Jul 11, 2006 18:36
Contact:

Re: Alien Trampoline Model

Post by Rex Claussen »

I finally have an opportunity to catch my breath, and I have been mulling ideas for a trampoline-based map. I have studied your scripts and they appear straightforward to implement. However, when I went into the TEXTMAP I was unable to find the things associated with the TID numbers in the scripts (namely, 1 & 2) that actually thrust the player. I spent a little while looking and finally gave up (although, of course, I could easily correlate the TIDs to the relevant parts of the script based on the direction of thrust). Would you please send me the map in DooM/HeXen format?

[Yes, yes, I know. I need to emerge into the 21st century. One of these days I promise to do so.]
User avatar
Enjay
Developer
Developer
Posts: 4720
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: Alien Trampoline Model

Post by Enjay »

OK, Hexen Format map attached. I think it's OK. It's easy to convert from Hexen to UDMF but going the other way is more difficult. Even in a tiny demo map like this, it's surprising how many things weren't right or didn't transfer properly.

Like I said, I think it's done though. If there are problems with it, let me know.
HexenFormat.zip
This only contains the map, so load it on top of the other file if you want to actually run it.
(8.01 KiB) Downloaded 42 times

I took a long time - far too long - to start using GZDoomBuilder (now UltimateDoomBuilder) and the UDMF map format. However, now that I do use them, I'm not sure I could go back. Obviously the format allows many things but the core abilities to align upper/middle/lower separately, set offsets on floors/ceilings, scale textures, rotate floor/ceiling flats, set wall and floor brightnesses, set light and fog colours all directly in the map with a few easy keystrokes are real game changers. So much of that either wasn't possible at all or involved clumsy ACS work. Now it's just part of the editing flow.

A mapper of your calibre and style could make so much use of these features. I don't know if your laptop is up to running UDB but when you do finally get the time (and possibly the hardware, if needed) I really think you will do fantastic things with this mapping format.

Oh, and working with models in UDB is a breeze too because a wireframe of the model is shown in the 2D map - so you know exactly where the model vertices etc will actually be in the map (and, of coourse, you can see it in the 3D mapping screen in all its glory too).
User avatar
Rex Claussen
Developer
Developer
Posts: 2597
Joined: Tue Jul 11, 2006 18:36
Contact:

Re: Alien Trampoline Model

Post by Rex Claussen »

I've downloaded your HeXen-formatted map and am reviewing it now. Many thanks.
User avatar
Enjay
Developer
Developer
Posts: 4720
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: Alien Trampoline Model

Post by Enjay »

No problem. Obviously there really isn't much to the map and I didn't spend much time honing the scripts - they are certainly not a universal solution and I just coded the scripts for the two jump pads separately and in a way that made them do what I wanted - but perhaps it will give you some ideas.
Post Reply

Return to “Models”