TerryCavanagh / VVVVVV

The source code to VVVVVV! http://thelettervsixtim.es/
Other
7k stars 559 forks source link

Individual translation of graphics files #860

Closed Fussmatte closed 11 months ago

Fussmatte commented 2 years ago

This is maybe a bit far off, but I think it'd be worth considering the possibility that individual languages can choose to provide custom graphics. Something similar was done with the Nicalis Japanese ports to translate each enemy into Japanese (with debatable quality).

Here are some homemade mock-up examples showing translated enemies in action in various languages (graphics mine): image

One issue that's been brought up with this is hitboxes: they're pixel-perfect in the game and changing an enemy graphic even a little could muss it up. Misa's suggested solution was to load hitboxes with the original graphics but render enemies with another.

Another is whether this is necessary or worth it at all — I personally think having the option is nicer than not (for example, I think it may help contextualise room names better), but others might (and do) feel differently, that it's rather superfluous and isn't a big deal for most players (which it probably isn't).

What are your thoughts?

InfoTeddy commented 2 years ago

One issue that's been brought up with this is hitboxes: they're pixel-perfect in the game and changing an enemy graphic even a little could muss it up.

Specifically, since the hitboxes are pixel-dependent, changing the graphics literally means changing version compatibility. This has already happened once; in 2.0, transparent pixels were counted as existing if they were colored non-black, while in 2.2 fully transparent pixels are never counted as existing, but due to a bug with the masking code, the red channel of a pixel (assuming it isn't fully transparent) is checked instead of the alpha channel. (I've used this in a level.) I have a couple TASes dependent on sprite pixels and I'm pretty sure the RTA speedrunners have a couple routes or runs based on sprite dependency too.

Fortunately, this only applies to sprites that are 32x32 or less in size; bigger sprites use a completely rectangular hitbox that isn't dependent on their pixels (these are the Maverick Bus, TRUTHs, ZZT centipedes, and the emitter in The Solution is Dilution).

I'd love to fully ditch sprite dependency but that would obviously be a huge breaking change. On the other hand, people might ask why the PC/mobile localizations don't change their sprites (I know I would), and I'd hate to pass up an opportunity to be better than Nicalis (as discussed in the VVVVVV server, the Japanese translation is already of questionable quality and the sprite changes they did even moreso) - though we're already doing quite well compared to them.

So I feel like using the hitboxes of the original graphics while simply drawing a different sprite is a reasonable solution.

Daaaav commented 2 years ago

So, I'm not entirely sure about this, and I'm not adding it to my personal localization todo list; but I can see how it makes sense. Drawing the translated graphics while using the original sprites for collision detection is what I would go with as well.

Fussmatte commented 2 years ago

I should also note that this wouldn't only apply to enemy graphics, but would allow translation of the Level/Game Complete graphics. This would probably benefit some languages like Japanese, where the text from the main font may be too thin to look nice in a large graphic like this: image image (Top: k8x12; Bottom: custom graphic.)

(OK, I may be showing off just a little. The top is still better than Nicalis', though.)

(EDIT: To be honest something like STAGE CLEAR in English would probably make more sense for Japanese, according to a speaker I asked. This still could be a benefit though.)

mothbeanie commented 1 year ago

this came up in a discussion on discord about localizing the icons for the map legend. instead of localizing the "S" (trinket) and "T" (teleporter) icons for every language, we could have a set of universal representative icons (see below) which Terry said that he liked and that it wouldn't be a big deal to just use these for 2.4 onward.

tiles tiles.png with the new icons tiles_legend icons only as an overlay use case example of them in use

i wanted to put them here for posterity, but also just some thoughts on how to proceed:

InfoTeddy commented 1 year ago

Removed the 'required for 2.5' tag (so now this is required for 2.4 by default) as discussion in the Discord has revealed we do want to do this in 2.4.

TerryCavanagh commented 1 year ago

Yep, we should do this for 2.4! I've already asked discord based translators, and will be emailing the rest this week.

regarding: https://github.com/TerryCavanagh/VVVVVV/issues/860#issuecomment-1734236469

I think this looks great, and it feels like a no brainer to me:

So if anybody objects, speak up now!

InfoTeddy commented 1 year ago

So if anybody objects, speak up now!

I have none as long as we don't have to update data.zip again.

Daaaav commented 1 year ago

My main worry is that it might be a bigger change than it seems from the technical and file management side. But this would probably have technical advantages too (not needing to worry about both a localizable 32x32 sprites.png as well as a localizable 8x8 tiles.png for example), and it'd probably be worth it for the other reasons, so let's think through our options here. :)

To recap, data.zip is locked down, and the language files and fonts are added as separate folders inside the repo (for when the user compiles the game themselves) and copied next to data.zip in distributed versions. (These should not be in a zip, because the fonts and especially the language files have to be modifiable by us as time goes on, have to be in sync with the code, and the game itself has translator options to modify the language files at runtime.)

So we need to make a decision for how to add this new map legend image, as well as other new graphics from now on:

I don't have the same question for the translated versions of the sprites (or of the oldschool S/T icons) because it makes sense to just have those bundled inside the language folders. But this new legend file is not tied to any language (including English).

Daaaav commented 1 year ago

(After a discussion on Discord, there's another option for the map legend that seems pretty reasonable and also allows us to postpone the definitive graphics file decision: add them as characters to the 8x8 font.)

Meanwhile: #1031

TerryCavanagh commented 11 months ago

Delighted to be able to say that this issue is now complete! So glad we did this for 2.4!