Espozo wrote:How is it not? Just writing "LDA #RunSpeed" or "MOV AX, RunSpeed" is much easier than something that searches a whole area of memory, constantly checking values for "Runspeed:" (It would have too look for "R", and the "u" and then "n" and so on and so forth. If it encounters one wrong letter, than it starts over again, looking for "R").
Why on earth would you assume that a program is re-parsing a text file every frame? The text file doesn't change after it's loaded, so there is no reason to reparse it.
Most high level languages have a lot of ready-made text parsing libraries available, and most of them also have a lot of text parsing utilities built into the language.
In
NSFPlay, getting a value from the config file looks something like:
No, not a hassle at all. Yes, it's "slow" code that you shouldn't run in an inner loop, but this makes
zero difference at startup, and there is a lot to gain by having a human readable/editable config file.