Carcass, blood splatters

Discussions about Coding and Scripting
Post Reply
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Carcass, blood splatters

Post by JackGriffin »

This is a question aimed mostly at Loathe, the resident LeatherFace, but I'll take stabs from anyone with thoughts.

I'm aiming for near perfection with the MH2 update as it pertains to the canseeme crash. One of the ways I'm doing this is manually handling the carcass cleanup. I fixed the carcasses now so that they spawn correctly (your neon pink Titan will now die as a neon pink titan, not revert back to the normal skin on death) but I needed to have more control over removal. What I settled on is this:
[youtube]q9nrxlUMAPg[/youtube]
Once a monster is killed it's carcass drops, is on a short timer, then dissolves into the ground. This seems a bit extreme but it bypasses the canseeme check for all carcasses and accounts for the incredible maps like ATAA where there may be several hundred calls for carcass/chunks a second by keeping things tidy and neat. I never really liked translucent carcass so this is a solution to the problem.

So what's the issue? I dislike the way the blood splatter goes away with the carcass. What I'm thinking of doing is spawning the blood separately and letting it linger a bit longer. What's the limitations involved here and what should I watch out for? I ran MoreGore on a vanilla CTF server and setting it higher than 5 or so lagged things but I was always unsure if it was the chunks, decals, or both. What would you consider a reasonable limit/amount/setting so that I can keep some splatter but not overwhelm a weak system?
So long, and thanks for all the fish
User avatar
Feralidragon
Godlike
Posts: 5493
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Carcass, blood splatters

Post by Feralidragon »

All the decals are spawned client-side only, so you can do what I do myself with some fx of mine (the lvl4 and lvl5 nukes since they're the most heavy effects I ever did, and which I will apply to a few other things since it really works): check the client tickrate (basically 1/DeltaTime, which is equal to framerate), if it drops from a certain minimum value, start destroying *some* decals (not all, a few at a time until the framerate returns at least to a normal value, perhaps 10 or 20 of them per tick is acceptable).

The base framerate can be 50 or 60fps, so no one complains, plus this way players with stronger systems can see more and the ones with weaker see what's barely possible without cutting too much of it.
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Carcass, blood splatters

Post by MrLoathsome »

I like the carcass fading effect. Should work well for carcasses that don't get gibbed.

Which version of MoreGore were you trying out? I recommend trying my last rewrite of it
available here: http://ecoop.ucoz.com/load/moregore_lge ... n/1-1-0-35

Regarding the blood splatters/decals etc. I would recommend taking a close
look at this: http://ecoop.ucoz.com/load/moreblood_rc7_5/1-1-0-32

Full source code included with both*. Feel free to use any of it that might be useful for your project

*Except for the custom version of DecalStay included with the MoreBlood mutator that uses the "new" decals....

The original author had done some things so the source exported from the original version would not compile. It was interesting.
I still can't decide if it was just a very primitive obfuscation attempt, or if it was very clever, and he just wanted to make sure nobody would
release a modified version of it unless they knew exactly what they were doing. (Attempts to contact him were == Null)
Although I did not try to "break" the source code buried in the U file the same way, I did refrain from including the source with the release.
Don't think that code would help you anyway. It is just a client-side thing that rotates decals basically. Client has to enable it via
Mods menu before it even runs. (Wonder if there is a way to make that load automatically via an INT file tweak?)

Its been way over a year since I looked at the MoreBlood code, but it may give you some ideas if you skim thru the code.
Was going to glance at it for you, but just discovered I don't even have the source code on this PC atm...
(I got mad at the world last Nov., and unplugged my main development machine and put it under a desk. It is still there.)

If you have any questions about specific bits of the MoreBlood code let me know.
blarg
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Carcass, blood splatters

Post by JackGriffin »

Ferali hooked me up with a pretty good idea on controlling the decals, carcasses, etc. but it's not ideal. I had thought of letting carcass and blood and gibs all spawn up to where it began to impact the client then destroying enough to get it back down (thank you Ferali for the 'how' part) but the carcass has that odd bug. You know the one, where you see a dead krall, walk out of sight of it then go back and the body miraculously falls to the floor again. I think I'll leave the carcass cleanup as it is but I would like to vary up the blood splatters and let them stay as long as it didn't kill the client. If you have a full-on firefight in a small room it should look like it afterwards, if at least for a little while.

Also I'm pretty interested in the decal rotation thing. Can you control rotation on a client with that? If you can, I'd love to update Tagz:

If I could keep the tagz oriented I think the mod would catch on.
So long, and thanks for all the fish
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Carcass, blood splatters

Post by MrLoathsome »

I will PM you the version of that I have on this PC.

It doesn't do anything with rotation, but I think you may be able to add that, perhaps....
blarg
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Carcass, blood splatters

Post by JackGriffin »

Ah crap. I wish it did, I swear I tried everything to control the rotation server side but came up empty. Thanks for the PM!
So long, and thanks for all the fish
User avatar
Feralidragon
Godlike
Posts: 5493
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Carcass, blood splatters

Post by Feralidragon »

JackGriffin wrote:Ah crap. I wish it did, I swear I tried everything to control the rotation server side but came up empty. Thanks for the PM!
Decals are completely client-side, the server doesn't even acknowledge their existence at all, so perhaps:
- Actor that spawns decal > replicates rotation (roll) value to client > client version of the actor waits for the update of the roll > once have it spawn decal and setup the right rotation
(?)
User avatar
papercoffee
Godlike
Posts: 10453
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Carcass, blood splatters

Post by papercoffee »

So I can understand this... Decals in UT do always rotate?
Because I have an idea for mapping ... a kind of "decoration decal".
Where you can set this decal on a wall to project a crack in the brickwork ... or vary a Texture with additional dirt.
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Carcass, blood splatters

Post by JackGriffin »

This pertains to spawned decals on the client side like the scorch mark from a redeemer or the splatter of blood. Ferali I know we discussed this a while back but I tried a 'kitchen-sink' approach and came up empty. If anyone had any ideas to try I'd sure like to hear them. I spent a long time on getting Tagz just right player-wise, it was the rotation that ruined it. I hate getting all the way to that last step then being denied.
So long, and thanks for all the fish
Post Reply