Page 3 of 4

Re: Help us plan OpenMW's future

Posted: 04 Jul 2018, 14:06
by Zini
Yeah, that's the one. Thanks.

Re: Help us plan OpenMW's future

Posted: 04 Jul 2018, 14:56
by AnyOldName3
NullCascade wrote: 04 Jul 2018, 02:35 $0.02 from someone who uses the crap out of bytecode, while OpenMW ignores it: 100% go for the bytecode. You have two (now three) compilers with different output. mwscript is an ugly bastard where coders complain constantly that they have to do crazy things like compile most scripts in one compiler, then some other script in another compiler. If mwscript were consistent and reliably interpreted throughout the last decade and a half of modding, I'd be looking directly at that and doing some fancier things. But it's not, it's a nightmare.

It's very simple. You go code -> bytecode -> engine's "VM".

Step one (code -> bytecode) is inconsistent because of multiple shitty compilers.

Step two (bytecode -> VM) is always consistent. How you got there might not be, but it's what the content file shipped and expects to run.

So, you favor step 2, where you know what you have is completely unambiguous.
In an ideal world, we'd like all mods ported to NewScript or otherwise cleaned up by a human, so always using the bytecode isn't the best solution as an automated translation of a high-level language into another high-level language will be prettier than an automated translation of a low-level language into a high-level one. For example, I don't think the bytecode keeps variable names around. Bytecode translation should be reserved for quick-and-dirty automated ports that are never supposed to be edited by a human.

Re: Help us plan OpenMW's future

Posted: 04 Jul 2018, 15:07
by psi29a
IDA, for example, allows retargetting decompilation from machine code to assembly and from assembly to C, but the result isn't pretty. It will make a best effort but give you things like: variable_467, sub_function_6634

You lose all context given to function names and variable names which means you'll just have to read what the code does and assume that that was the intent of the modder which isn't always the case.

I can see bytecode to bytecode happening though, reading in ESM/P data and translating it to the nearest equivalent that would run via newscript engine.

Re: Help us plan OpenMW's future

Posted: 12 Jul 2018, 01:12
by unelsson
That document is really nice, and sets great post 1.0 goals. These goals help to push the engine towards my hopes. I think the coolest thing about OpenMW, even better than being able to play Morrowind, or developing Morrowind-like rpg's, is that the code is open source and can be further developed into anything, even far from the original. I hope to see cool projects using OpenMW engine as a base to build on. Good world editor and support for custom models, animations etc. goes a long way, not to mention basic systems for combat, magic and so on.

Re: Help us plan OpenMW's future

Posted: 12 Jul 2018, 05:19
by NullCascade
psi29a wrote: 04 Jul 2018, 15:07IDA, for example, allows retargetting decompilation from machine code to assembly and from assembly to C, but the result isn't pretty. It will make a best effort but give you things like: variable_467, sub_function_6634
In reality this isn't much more complicated than a really hard, comp-sci sudoku puzzle. You learn that v467 is totally someImportantVar. And then once you know it, you can poke at nearby things. You find a nearby thing, and look at its vtable. Oh, now you know more about its type, and what other types (and related variables) attach to it. Once you have a critical mass, like in sodoku, it gets progressively more and more easy, and IDA's decompiler ends up looking like normal source code.

Re: Help us plan OpenMW's future

Posted: 12 Jul 2018, 07:25
by psi29a
You're right, that is usually how it works.

Does the average modder have the skill set and patience however? I mean, not all modders are programmers for example.

Re: Help us plan OpenMW's future

Posted: 12 Jul 2018, 12:13
by AnyOldName3
That concern goes away if the from-bytecode converter is just a CS tool for quick, dirty and unmaintainable ports and not the default option for anything.

Re: Help us plan OpenMW's future

Posted: 12 Jul 2018, 12:23
by psi29a
AnyOldName3 wrote: 12 Jul 2018, 12:13 That concern goes away if the from-bytecode converter is just a CS tool for quick, dirty and unmaintainable ports and not the default option for anything.
Agreed.

Re: Help us plan OpenMW's future

Posted: 13 Jul 2018, 00:51
by Jemolk
NullCascade wrote: 12 Jul 2018, 05:19
psi29a wrote: 04 Jul 2018, 15:07IDA, for example, allows retargetting decompilation from machine code to assembly and from assembly to C, but the result isn't pretty. It will make a best effort but give you things like: variable_467, sub_function_6634
In reality this isn't much more complicated than a really hard, comp-sci sudoku puzzle. You learn that v467 is totally someImportantVar. And then once you know it, you can poke at nearby things. You find a nearby thing, and look at its vtable. Oh, now you know more about its type, and what other types (and related variables) attach to it. Once you have a critical mass, like in sodoku, it gets progressively more and more easy, and IDA's decompiler ends up looking like normal source code.
That actually sounds kinda fun. :D

I really need to find a chance to learn more coding. Even if it's only ever just a hobby for me, it's something I'd quite enjoy, I think.

Re: Help us plan OpenMW's future

Posted: 15 Jul 2018, 10:34
by Okulo
Go for it. If you want to be creative, but you can't write, paint or play any instruments, programming is a great way to still create something beautiful. Start out with something dirt easy like Python. Write small scripts that automate tasks on your PC. Dip your toes into some web development. Write an application that is centred around an object oriented design pattern (you'll know what it is once you get to this point, don't worry).

It's a long road, but there's a lot to discover.