Help us plan OpenMW's future

Feel free to discuss here about news on our blog
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Help us plan OpenMW's future

Post by Zini »

Yeah, that's the one. Thanks.
User avatar
AnyOldName3
Posts: 2666
Joined: 26 Nov 2015, 03:25

Re: Help us plan OpenMW's future

Post 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.
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Help us plan OpenMW's future

Post 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.
unelsson
Posts: 227
Joined: 17 Mar 2018, 14:57

Re: Help us plan OpenMW's future

Post 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.
NullCascade
Posts: 121
Joined: 16 Jan 2012, 07:58

Re: Help us plan OpenMW's future

Post 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.
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Help us plan OpenMW's future

Post 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.
User avatar
AnyOldName3
Posts: 2666
Joined: 26 Nov 2015, 03:25

Re: Help us plan OpenMW's future

Post 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.
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Help us plan OpenMW's future

Post 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.
User avatar
Jemolk
Posts: 237
Joined: 20 Mar 2017, 02:12
Location: Sadrith Mora

Re: Help us plan OpenMW's future

Post 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.
User avatar
Okulo
Posts: 672
Joined: 05 Feb 2012, 16:11

Re: Help us plan OpenMW's future

Post 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.
Post Reply