Vector Ball - International Re-Colored Edition!

would it be a good idea to avoid punctuation/culturally stuff in config files anyway?

Normally you see in game configs they are flags 0/1 or enums/ints 0/1/2/3 etc.

So ultimately whats happening? He is saving as plain text a float value and some computers store/read that as 0,5 or 0.5 etc?


ok! Its fixed! I passed invariantculure on all my streamreaders, and will proceed to re-upload my game ASAP.
Very good to learn about the whole CultureInfo overload.

Thanks for every ones efforts, this has been a great bug-hunt. I certainly learned things!

-And yes, I tested it to work no matter if I set to Euro or US standards… GREAT!

Just to be clear: When you play the game now, it resembles the pictures I posted, but you still have some critique of the balls visibility?

It’s not some computers, but a locale. InvariantCulture uses a period for a decimal separator, no thousands separators, no matter where in the world you are and what regional settings you have chosen. The default behaviour of text readers and writers is to use CurrentCulture which reflects your chosen regional settings. These vary around the world, e.g. many European countries use a comma as a decimal separator and some use a period as a thousands separator. If a text file is written in one locale and read in another using CurrentCulture, you may get exceptions thrown because it cannot understand the floating point format. Using InvariantCulture ensures that text written in one locale and read in another will always work.

OK understood.

I guess he is writing the float directly to txt so something like ToString() happens and it is written with cultural separators.

Is that a way of looking at it?

yeah, so for example the text file would store
volume = 0,7
but the streamreader would disregard the comma, and read it as 7…

-That caused glitches for things like scales and alpha-values, but it caused outright crashes with sound effects volumes, which cannot exceed 1.

It would cause a FormatException because parsing a float in a US, UK, AU or other cultures expects a single period as the decimal separator, but it finds a comma.

Your installer link is dead :grin:

When I played it with the correct separator settings, I still thought it was sometimes hard to see, yes. I think I would prefer the paddle a little bit higher too, it is really close to the bottom of the screen.

holy sh*t snacks, all the trouble all the time, its funny… So my share-service took a dump, re-uploading… Done…

Bigger paddle, too near bottom, ball hard to see… Visibility issues, on it!

How about this draft? Each ball would get a halo, that is drawn on top of everything… This halo fades in and out of existence as things become cluttered… The paddle would also get a brighter finish and an eye catching halo…

See the difference?
----------------------------------------- BEFORE and AFTER…

I got results a lot better than this pic, but I didn’t want to make another montage.

Ball and paddle are more visible, and look better than before, so following up on this critique has been pretty good…!

Updated game upload is on the way now, will update main post within minutes.

1 Like