In a subious attempt to maybe make the game look better, I've added a bit of code that allows us to show several graphical overlays.
What he have for now are blood spatters on full walls if someone takes a significant (> 15) amount of damage. This works on all things that have, well, blood. Vehicles and robots are excluded, as are the bugs, because their blood has a different colour and I couldn't be bothered.
Additionally, structural damage to walls is shown as well.
For the moment both only work on full walls, but theoretically you can do this on any wall you want. If there is enough interest I might expand this to half-sized walls and doors.
This also doesn't have to be restricted to walls. Any structure would work.
I have a few ideas on what else we could show:
burn marks from fire on the floor and walls
bullet holes. It would require us to save each and every location hit per map, and apply some finicky business adding pixels to the right spot, but nothing insurmountable.
spent shells and empty mags on the ground whenever we fire or reload. But those things would be 1 pixel each, which is going to look very stupid.
Add a spray can and graffiti the place?
In order for this to show, the Blood & Gore option needs to be active in the game options. Additionally, set
;------------------------------------------------------------------------------------------------------------------------------
; If set to TRUE, additional decals can be seen on some objects (cracked walls, blood spatters etc.).
; Also requires the 'Blood & Gore' option to be toggled ingame.
;------------------------------------------------------------------------------------------------------------------------------
ADDITIONAL_DECALS = TRUE
in JA2_Options.ini. I might remove this option later, for now it's in until someone finds a bug and wants to deactivate it.
The next post will detail how to set up your own graphics.
This is fully savegame compatible.
This has been added to the trunk in r9113 & GameDir r2595. Using the new exe without the new GameDir data will... not show anything, because then I simply won't display anything. Sucker!
[Updated on: Sun, 27 June 2021 15:21]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Q: This is nice and all, but the graphics look terrible. Any way you can fix that?
A: Well, yeah. My drawing skills are limited at drawing single pixels at MS Paint. To improve that, take a look at the .sti libraries for the new decals in Data/Tilecache, bloodspatter_wall.sti, walldamage0.sti and walldamage0.sti.
That's how the images look in the editor. The vaguely beige colour is the transparency colour in the colour palette used (it's the same one as in some animations), the blood is the exact colour used for the blood as in corpses. Of course now the question is: where to paint so that it's in the proper place ingame?
That's the template I used for the left and rightside walls. It's a simple 24x62 pixel box, the bright green parts are everything that isn't the wall, the beige part is the wall. Use the above pictures, add your decal of choice, fill the green part with the beige part to make it transparent, done.
Note that there is no x/y offset in the .sti file. While we can do that, it seems a lot easier to me to just use the above pictures and not have to worry about that, I add the proper offset ingame.
Now, every one of these .sti libraries has an even number of pictures. The first part is for walls from upper left corner to lower right corner, the second part is for wall from lower left to upper right.
In the case of blood spatters, the picture in question is
(number of tile where wall is sitting on % pics per side) + pics per side if wall goes from lower left to upper right
It is advised that the number of pics per side does not divide the map length per side - 160 or 360 - without remainder. Otherwise if, say, you have 8 pics per side, neighbouring walls might always get the same pattern, which looks odd!
In the case of structural damage, we obviously want to see the damage expand. It wouldn't to to have cracks disappear, we want them to increase!
Thus each .sti contains two 'sets' of damage, with the first pic starting with the most damage, the last with the least and so on.
The pic is selected as
( wall hitpoints / maximum wall hitpoints) * pics per side + pics per side if wall goes from lower left to upper right
The picset itself is chosen depending on whether the number of the tile the wall is sitting on is odd or even. As that's only two sets there is a lot of repetition. But as my drawing of the structure damage is especially ugly, Im very happy you offered to provide better .stis, dear questioner!
Wow, hold on there. I said your pictures suck, not that I'm going to provide something better. I mean, I obviously can, but I won't.
You know, you're like the distilled essence of what annoys me about this community.
Q: Why u no bullet holes?
A: Because that requires storing each and every bullet hit with the exact coordinates they hit with (which are less varied than one would think) and the holes would be what, 1 pixel? Storing that requires requires altering the savegame format (which the feature until didn't require, which is neat) and the result will likely look like dirt anyway.
Q: You should all an overlay that adds holes to the wall!
A: You mean you want me draw a picture over another picture that then reveals what was below that picture?
Yes.
That's... sort of magic.
What are you, a chicken?
No. But I'm also not Marty McFly, so dream on.
[Updated on: Sun, 27 June 2021 16:03]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Would it be possible to have scorch marks on the ground after explosions?
Burn marks from explosion are already in the code, just disabled.
I enabled them in +AI, seems to work well.
Because that seems pretty cool, this has been committed in r9139.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.