TheXTech / TheXTech

The full port of the SMBX engine from VB6 into C++ and SDL2, FreeImage and MixerX
https://wohlsoft.ru/projects/TheXTech/
GNU General Public License v3.0
287 stars 28 forks source link

Multires: bullets in kaizo-ish levels #713

Closed ds-sloth closed 4 months ago

ds-sloth commented 7 months ago

While continuing my Analogue Funk playthrough at 1280x720, I found this interesting case ("kuribo-wooden platforms hanging in the sky.lvl") where a bullet was required to finish a series of bounces. In the current main branch, bullets activate whenever they come onscreen (the normal behavior).

I think this case shows that we should probably make them activate when they would come onscreen in 800x600 gameplay (and I show an example of this below), but this raises an important issue: one of the main features of bullets is the element of surprise, and that's totally lost when they are previewed with an outline.

I'm interested to hear suggestions about what we should do here.

Scr_2024-01-30_20-31-31

Wohlstand commented 7 months ago

On such levels it's better to create a level-individual comapt.ini and disable the multires. So, they will run in 800x600 always. And, I guess, here is a "maximum resolution" feature needs :thinking: I.e. allow multires, but don't allow it be bigger than specified.

0lhi commented 7 months ago

but this raises an important issue: one of the main features of bullets is the element of surprise, and that's totally lost when they are previewed with an outline.

I think that is an excellent point for bringing the pouf back to bullets.

ds-sloth commented 7 months ago

I also like the idea of bringing back the poof appearance effect.

We could consider turning this into two npc.txt traits (in the long run): (1) do we activate it in 800x600? (2) what to do when it's onscreen but inactive? (poof, shade, show normally)

That said, we should make sure that the defaults for bullets are appropriate to make the experience of this level good in multires.

ds-sloth commented 7 months ago

How does this look to the two of you (as a default behavior for this specific case)?

Scr_2024-02-01_20-11-20

ds-sloth commented 7 months ago

I think that this works well. Can you please test the behavior with bullets and fast ghosts on your side?

0lhi commented 7 months ago

We could consider turning this into two npc.txt traits (in the long run):

Normally I am strictly against making changes to npc-txts but since it will only have an effect on non-SMBX64 resolutions in this case I think it's a good idea.

How does this look to the two of you (as a default behavior for this specific case)?

Does it use the Pouf? Hard to see with this sprite.

ds-sloth commented 7 months ago

Does it use the Pouf? Hard to see with this sprite.

Yes, but I agree it is hard to see. I just fixed some cases where the smoke effect wouldn't trigger until an NPC had despawned at least once. Here's another example where the smoke effect is more obvious.

Scr_2024-02-02_08-44-09

ds-sloth commented 7 months ago

two npc.txt traits

I have added NPC traits for using the 800x600 camera (UserDefaultCam) and the style that should be used for rendering an inactive NPC (InactiveRender).

I'd like to make the first one an npc.txt trait.

I think it's fine for the second one to be a Lua-only trait (and thus unavailable until we implement Lua scripting for TheXTech).

@Wohlstand, can I update PGE-FL to add a use-default-cam attribute to npc.txt?

Wohlstand commented 7 months ago

Ye, feel free

ds-sloth commented 7 months ago

I successfully added an npc.txt flag, usedefaultcam=1 / usedefaultcam=0, and have tested this locally. Is there some documentation that we should update for this?