<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Copied this fragment  from netrek-forever...</div><div><br><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">On May 6, 2015, at 7:50 PM, James Cameron <<a href="mailto:quozl@us.netrek.org" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="1">quozl@us.netrek.org</a>> wrote:<br></span></font></blockquote></blockquote><blockquote type="cite"></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">On Wed, May 06, 2015 at 05:19:33PM -0300, Lawrence Brass wrote:<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">I agree, the matrix has us all. <br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">I browsed the COW-XP client sources last night and liked what I<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">saw. It seems that the game logic is isolated from the video stuff,<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">the "W_" module implements the glue code between the classic Windows<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">API, GDI graphics, inputs and the game. Keyboard and mouse events<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">are enqueued in a (single?) event queue. Very clear and classic C,<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">even with Allman bracketing style! (tip of the hat).</span></font></blockquote></blockquote><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">Yes, in those days we did peer code reviews.  The "W_" module was<br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">added to the client on Unix before it was ported to Windows in 1996.<br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">If the "W_" module graphics functionality is reimplemented in say,<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">openGL(ES), and the proper native framework code is used to capture<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">the events and feed them into the game event queue, is very probable<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">that the "game code" could be ported almost untouched to OSX/iOS,<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">Plain C is actually a subset of objC and fits nicely.  On Android I<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">am not that sure (of the cost). The same strategy could be applied<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">using the NDK to hold the C game loop and logic, and feed the input<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">event queue from the native framework, but it may be harder. Porting<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">from the Java clients is a competitive alternative for Android.<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">The nice thing about this *hypothetical* scheme is that the game,<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">network, and video(using openGL) code would be common and game and<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">network stay almost untouched.<br></span></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">Sounds crazy?</span></font></blockquote></blockquote><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">Yes.  Especially because the input devices are entirely different.</span></font></blockquote><div><br></div><div>There should be a mapping, before queuing control events, that would convert swipes and taps into meaningful synthetic keystrokes and mouse movements and clicks that the current game code would understand. This mapping  is were the "feel" of the game would be defined.</div><br><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">The "W_" API presumes too much about the input devices and the<br></span></font></blockquote><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">underlying graphics libraries.</span></font></blockquote><br></div><div>Yes, this would be the hard part. The API should be divided into 2 modules, one for Graphics in open GL, common to all platforms and the other for the  input event handling, particular to each platform.</div><div><br></div><div>I will focus on the "W_" module. I guess that  I should look at both unix and win implementations to get more insight.</div><div><br></div><div>Regards.</div><div><br></div><div>On May 6, 2015, at 11:32 PM, Lawrence Brass <<a href="mailto:lbrass@gmail.com">lbrass@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><span>Hello again, I have just subscribed to the dev-list.</span><br><span>Should I copy content from from netrek-forever google group?</span><br><span>Regards,</span><br><span>Lawrence (LarryX).</span><br><span></span><br></div></blockquote></body></html>