Page 1 of 1

If this game isn't open source...

Posted: Mon Mar 25, 2013 2:47 pm
by Bigcheecho
...then where would the script for the game be kept? The script has to be stored SOMEWHERE in our computer for our closed-source game to work.

Re: If this game isn't open source...

Posted: Mon Mar 25, 2013 2:54 pm
by rakiru
No, it doesn't. The code (not script) is compiled into machine code (binary data), and that's what's in EXE and DLL files. This is exactly the same reason you don't have Call of Duty or Team Fortress source code on your computer. The reason people can easily mod some games, such as Minecraft, is because they are written in a language that doesn't compile to machine code, allowing them to partially convert it back into code. This is not the case for Ace of Spades.

Re: If this game isn't open source...

Posted: Mon Mar 25, 2013 7:35 pm
by Articsledder
rakiru wrote:
No, it doesn't. The code (not script) is compiled into machine code (binary data), and that's what's in EXE and DLL files. This is exactly the same reason you don't have Call of Duty or Team Fortress source code on your computer. The reason people can easily mod some games, such as Minecraft, is because they are written in a language that doesn't compile to machine code, allowing them to partially convert it back into code. This is not the case for Ace of Spades.
yeah, basically what rakiru said. It's there, but it would be impossible to translate it back into something you could edit.

Re: If this game isn't open source...

Posted: Tue Mar 26, 2013 3:29 am
by Handles
It might be possible if we could get our hands on the original open, (but it's also illegal) Green_Crying

Re: If this game isn't open source...

Posted: Tue Mar 26, 2013 1:27 pm
by topo
Articsledder wrote:
rakiru wrote:
No, it doesn't. The code (not script) is compiled into machine code (binary data), and that's what's in EXE and DLL files. This is exactly the same reason you don't have Call of Duty or Team Fortress source code on your computer. The reason people can easily mod some games, such as Minecraft, is because they are written in a language that doesn't compile to machine code, allowing them to partially convert it back into code. This is not the case for Ace of Spades.
yeah, basically what rakiru said. It's there, but it would be impossible to translate it back into something you could edit.
Not as true as you think. There are several freely available tools that will translate this machine code into asm, which you can read fairly easily. You can write to the game's code+memory fairly easily at runtime, too. Editing the program's disassembly directly and recompiling it into an executable is a little harder (I haven't managed the patience required to learn what I need to know to be able to do it yet), but still doable and not without its drawbacks (GM did this with 0.60). You won't be able to have it translated into a higher-level language unless you do it manually, though, and to be honest it would probably be easier to just rewrite the game from scratch.

Re: If this game isn't open source...

Posted: Tue Mar 26, 2013 2:35 pm
by HoboHob
Yes what Topo said, I can think of atleast a couple tools.

Re: If this game isn't open source...

Posted: Tue Mar 26, 2013 8:16 pm
by GreaseMonkey
topo wrote:
Editing the program's disassembly directly and recompiling it into an executable is a little harder (I haven't managed the patience required to learn what I need to know to be able to do it yet), but still doable and not without its drawbacks (GM did this with 0.60).
It required a shitload of scripts written in Python, which required me to read up on the Portable Executable format. It also required that I fix up some of the things it misappropriated as "labels".
I know it's possible to not have 20MB .exe files, but I abandoned that project before I even got around to modifying the scripts.

Re: If this game isn't open source...

Posted: Wed Mar 27, 2013 2:14 am
by rakiru
topo wrote:
Articsledder wrote:
rakiru wrote:
No, it doesn't. The code (not script) is compiled into machine code (binary data), and that's what's in EXE and DLL files. This is exactly the same reason you don't have Call of Duty or Team Fortress source code on your computer. The reason people can easily mod some games, such as Minecraft, is because they are written in a language that doesn't compile to machine code, allowing them to partially convert it back into code. This is not the case for Ace of Spades.
yeah, basically what rakiru said. It's there, but it would be impossible to translate it back into something you could edit.
Not as true as you think. There are several freely available tools that will translate this machine code into asm, which you can read fairly easily. You can write to the game's code+memory fairly easily at runtime, too. Editing the program's disassembly directly and recompiling it into an executable is a little harder (I haven't managed the patience required to learn what I need to know to be able to do it yet), but still doable and not without its drawbacks (GM did this with 0.60). You won't be able to have it translated into a higher-level language unless you do it manually, though, and to be honest it would probably be easier to just rewrite the game from scratch.
Well, yes, you can do that, but I was putting it simply, and as you said, it's not really worth the effort, compared to just rewriting it.

Re: If this game isn't open source...

Posted: Wed Mar 27, 2013 3:37 am
by topo
rakiru wrote:
Well, yes, you can do that, but I was putting it simply, and as you said, it's not really worth the effort, compared to just rewriting it.
I was responding more to the word "impossible" than to anything else. :P

Re: If this game isn't open source...

Posted: Wed Mar 27, 2013 6:49 pm
by Sonarpulse
All you (besides rakiru and GreaseMonkey of course): http://en.wikibooks.org/wiki/X86_Assembly