<div class="gmail_quote">On Mon, Jun 20, 2011 at 6:27 PM, Max Horn <span dir="ltr"><<a href="mailto:max@quendi.de">max@quendi.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Paul,<br>
<br>
thanks for your well-though email and arguments.<br>
<br>
Am 20.06.2011 um 06:13 schrieb Paul Gilbert:<br>
<div class="im"><br></div></blockquote><div class="im">..<br>
> It's actually a good point as to how much is enough, if we do introduce<br>
> minimum standards.<br>
<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">[...]<br>
<div class="im"><br>
><br>
> The only requirement, as I see it, would be to ensure that the C++ generated<br>
> code, in such a case, were as cleanly C++ as possible. So anything like the<br>
> suggestion made above, replacing gotos and using locals, would be advisable.<br>
> Definitely getting rid of gotos would be a positive step.<br>
<br>
</div>Yes, and I made this suggestion in two previous emails. I am still waiting to hear what Vladimir thinks about this idea :).<br></blockquote><div><br>Hopefully he'll be able to do some improvements to the converter. Looking at the code now, I can see that there's a lot of improvements that could be done. Particularly, I'd like to see if the comparison forms could be combined with the following .z() checks to be cleaner. Something like:<br>
_cmp(al, 198);<br> if (!flags.z())<br> return /* (nofog) */;<br><br>might be better presented as:<br><br> if (al != 198)<br> return /* (nofog) */;<br><br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
[...]<br>
<div class="im"><br>
> This does need discussion, I agree. From my point of view, there's little<br>
> difference between having a script engine that supports an original game's<br>
> scripts (like in the Discworld games), and having a script engine that's<br>
> based on executing game scripts in a similiar form to PC opcode<br>
> instructions. So long as what's being interpreted is only the game logic<br>
> scripts, and not the entire game itself.<br>
<br>
</div>I agree that it is OK to support a game which has hardcoded logic -- I think Touche is another example for that.<br>
<br>
But I do see a major difference: We can't touch the game scripts, they are provided by the use via data files. If they are complicated and buggy, we need to implement complicated workarounds. We can't do anything to make them more readable, heck, we usually first have to write a disassembler / decompiler for them.<br>
<br>
So, *if* we included code like this, then I really would like to take full advanage of our possibilities. And that includes making the code readable and debugable.<br></blockquote><div><br>Good point. I concur. I don't really think anyone is arguing that the code shouldn't be made as clean as possible, just that whether there's some designated 'threshold' before the code would be considered clean enough for release status.<br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
<br>
> Whilst I would have preferred seeing something like that implemented with<br>
> the scripts dumped into a data file, I don't think having the code in-engine<br>
> is any major issue so long as, as I said above, the generator makes it as<br>
> much clean C++ as possible.<br>
<br>
</div>The generator currently still does not produce code that is warning free for me. And as for clean... ;). Well, if I knew the generator was going to improve considerably, *and* if I knew I was "allowed" to recode particular terrible functions: That would mitigate most of my worries, I guess.<br>
</blockquote><div><br>I guess we'll have to agree to agree :)<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
<br>
Bye,<br>
<font color="#888888">Max<br></font></blockquote><br></div>Paul.<br>