---\\___/---
#1 posted by - on 2016/04/30 02:17:26
The closest to the Quake engine I could even possibly see this happening in is Source and using portals.
Basically you'd just have a single staircase on the deck or something, and that is where the portal is. The water plane still clips through the boat, but your interior that the portal takes you to is just built somewhere else in the .bsp.
---\___/---
Or just fake it with teleporting. Make the door to the interior of the ship teleport the player to an interior built somewhere else, much like how the portal above works but much more low-tech. Maybe you'd want some kind of cutscene or screen fading to black to cover this teleport. That's how a lot of older games would've handled this.
---\___/---
Doing proper liquid and boats you can go inside and out of is a huge tech challenge, and would be something you would base the design of an entire game's engine around. Not something any off the shelf engine is going to do AFAIK.
#2 posted by metlslime on 2016/04/30 02:42:09
it can probably be done in quake using similar tricks to Pox's moving water in the "pox extras" mod. That mod forces the player into the "in water" state using quakec. Presumably you could do the reverse by forcing them out of that state using quakec, when in your func_air entity.
#3 posted by mankrip on 2016/04/30 03:04:17
Good question. The Source engine portal method suggested by Scampie seems to be the most sane one. I'm not aware of any Quake engine that supports such a thing.
PoxR4
#4 posted by ijed on 2016/04/30 16:55:42
As Metl says has the func_watertrain, which is a trigger volume that behaves like a liquid one.
Even if you don't refactor that into a func_air, you could make a very big water train which has a hole in the middle. To steal scampie's example:
--\__/-----
---\__/----
----\__/---
You don't just move the boat, but also the water volume.
This would work pretty much seamlessly, as long as you have enough space outside the level to hide the massive fake water volume not being used currently. I never got it working properly with fish, although it does in the original.
Fish are the most broken enemy in the game though, so maybe just replace them with zombies/spawn for your water enemies. Unless you're adding new stuff of course.
Ijed
#5 posted by mankrip on 2016/04/30 17:25:02
That would make the water texture move along with the boat, breaking the illusion. At best, it would give the impression that the boat is stuck in a giant pudding that moves around.
#6 posted by Killes on 2016/04/30 18:28:53
Would a custom animated texture help there ?
@metlslime
Thanks for the reference, Pox R4 looks really nice. I'm more amazed by the gravity well that sucks in the wall-trap nails. The way the nails move into it is really smooth and mesmerising. Sadly his ladders don't work in Darkplaces, but do in Quakespasm. Anyway, on topic, yes it looks like it could be rigged to work for my purposes. Quakespasm with transparent water gives un-vised-like graphical glitches. But I'm making an entirely new game, so that doesn't matter for this project. I'll look into the quakec code tonight or tomorrow, and upload it here if it works.
@ijed
I actually tried a few variations of this, and it can't be done. As mankrip said, the water moves with the boat and causes vis problems. The other problem is, that it can only reasonably be done with one boat. I want arbitrary numbers of boats and arbitrary movement between upper and lower decks, and possibly windows :D
On A Slightly Different Topic..
What would be an elegant way to group things together. E.g. in quake/quake 2 you can use func_group, but that means you can't then set it to func_wall or func_plat or whatever. I've never mapped beyond id tech 3, so I'm not sure how Doom 3/Quake 4 will do it. For example, you can't have a moving switch on an elevator, because it will become func_plat or func_train and lose the func_button. I think the simplest way is to have a new entity property called group, which could be a list of integers which represent the groups (so that you can have multiple groups).
Does anyone know how it's done in Half Life 2?
I Think
Trenchbroom 2 allows for grouping of different things.
#10 posted by mankrip on 2016/04/30 23:20:36
Such grouping requires extra QC code to support it. There's no such thing in vanilla Quake.
#11 posted by Baker on 2016/04/30 23:28:13
DarkPlaces and similar engines can use movetype_follow to have entities stay together at all times.
#11
#12 posted by mankrip on 2016/05/01 00:08:26
0.� I forgot about that.
@baker
Ahhh Nice, thanks for that. Looks like the source engine also uses it. That's a very simple and elegant solution.
-----
I've looked at pox's code, and it's just a hack. It essentially mimics being under water. The motion isn't right and there's no underwater waves. It doesn't properly support transparency or drawing the inside textures. With messing around and thin water slices it can be done - but it's just an awful hack imho.
I think it will have to be written in the engine. I'll get around to it when I really need it.
Groups
TrenchBroom 2 allows you to have entities and even brush entities in groups, but you can't have a group inside a brush entity. However in the map file it all gets mapped to special entities and entity keys that are ignored by the compiler and game.
|