Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strings shouldnt be hardcoded in the game-engine #7

Closed
felipesanches opened this issue Feb 11, 2013 · 11 comments
Closed

Strings shouldnt be hardcoded in the game-engine #7

felipesanches opened this issue Feb 11, 2013 · 11 comments

Comments

@felipesanches
Copy link
Contributor

The drawstrings opcode receives a string id and then reads it from a list of hardcoded strings in the interpreter. I think that the strings should be fetched as game resources somehow. Any idea how was that done in the original game?

@fabiensanglard
Copy link
Owner

That was done the same in the original game. The Virtual Machine is using the exact same bytecode from the DOS version.

@felipesanches
Copy link
Contributor Author

Do you mean the strings were stored in the virtual machine executable? ANOTHER.EXE ?

@fabiensanglard
Copy link
Owner

I don't remember seeing string ressources in the banks so i assume there
were in the exe.

Can you be more explicit: Which strings are you referring to ? Can you
provide exemple/ screenshot ?

Fabien

Sent from my iPhone

On 2013-02-11, at 2:46 PM, felipesanches [email protected] wrote:

Do you mean the strings were stored in the virtual machine executable?
ANOTHER.EXE ?


Reply to this email directly or view it on
GitHubhttps://github.com//issues/7#issuecomment-13398786.

@felipesanches
Copy link
Contributor Author

I'm refering to strings such as "Good evening professor.".
In a proper game engine these would be considered game data and so it would be stored as a game resource. But I can understand that maybe Eric did not bother to implement a proper generic game engine and may have ended up hadcoding game specific strings in the interpreter.

But then, we have the demo version, that uses different strings...

@felipesanches
Copy link
Contributor Author

Additionally, there is a copyright issue here. If we ship copies of the strings in the free software game engine, then we're infringing Eric's copyright. To avoid copyright infringement we should load the strings from wherever they are in the original game files.

@fabiensanglard
Copy link
Owner

Ok I looked into the code but I would appreciate if you do this research
yourself in the future instead of asking:

In the VM you can see a method:

VirtualMachine::op_drawString

which calls:

Video::drawString

which looks for the string in

_stringsTableEng

Which can be seen here:

https://github.com/fabiensanglard/Another-World-Bytecode-Interpreter/blob/master/staticres.cpp

All those strings are from the executable.

On Mon, Feb 11, 2013 at 2:54 PM, felipesanches [email protected]:

I'm refering to strings such as "Good evening professor.".
In a proper game engine these would be considered game data and so it
would be stored as a game resource. But I can understand that maybe Eric
did not bother to implement a proper generic game engine and may have ended
up hadcoding game specific strings in the interpreter.

But then, we have the demo version, that uses different strings...


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-13399179.

@felipesanches
Copy link
Contributor Author

felipesanches commented Feb 11, 2013

But I did check all those details you mention in the code before asking.
I am asking exactly because I think it's weird that the game strings are hardcoded in the interpreter instead of loaded from the original game files.

@felipesanches
Copy link
Contributor Author

Are you sure these strings are stored in ANOTHER.EXE ? If so, have you already discovered the encoding used to store it there? Because I can't find plain strings in ANOTHER.EXE by using the unix "strings" command.

@felipesanches
Copy link
Contributor Author

There's an UNKNOWN resource:

R:0x11, RT_UNKNOWN size=25108 (compacted gain=25%)

with type=6

I have a hunch that it may contain the game-specific strings as well the font data.

@fabiensanglard
Copy link
Owner

Same comment here. Did you ever figure it out? The GBA also have the strings hard-coded.

@felipesanches
Copy link
Contributor Author

I haven't yet figured it out, but I stumbled on this question again today: felipesanches/AnotherWorld_VMTools#15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants