From: Dave M. <da...@mi...> - 2010-03-24 18:06:21
|
<html><HEAD><LINK rel=stylesheet type=text/css href="/webmail/static/deg/css/wysiwyg-3451203449.css" media=all> <META name=GENERATOR content="MSHTML 8.00.6001.18882"></HEAD> <BODY> <DIV>I've built this code in my VB 1830 game years ago.</DIV> <DIV> </DIV> <DIV>You have to solve a lot of the problems to get this far, and the information can be use to validate tile lays.</DIV> <DIV>Is that hex reachable? What tiles can I use? In what rotations? Does the track connect? (permissive or strict upgrade rules?)</DIV> <DIV> </DIV> <DIV>There are many track connectivity, token location (look out for XX tiles), and tile drawing issues to conquer just getting this much done.</DIV> <DIV>But I did it with a simple iteration and evaluation stack to flatten the recursion problem.</DIV> <DIV>(push the tokens; pop a location, mark connected edges; push edges it connects to that is new, repeat)</DIV> <DIV> </DIV> <DIV>Without an route suggestor; you can then build a simple "connect the dots" route interface that lets you point at a route on the map, it color's the connecting track, and total's the revenue for you. Do it in a list for multiple trains. That's as far as I got. The interface was buggy as heck, most due to using lousy route list structures.</DIV> <DIV> </DIV> <DIV>Even with a route suggestor, the UI will get "interesting".</DIV> <DIV> </DIV> <DIV>Dave.</DIV> <DIV><BR><BR>Mar 24, 2010 01:25:51 PM, <A class="parsedEmail parsedEmail" href="mailto:rai...@li..." target=_blank>rai...@li...</A> wrote:<BR></DIV> <BLOCKQUOTE style="BORDER-LEFT: rgb(102,153,204) 3px solid">On Wed, Mar 24, 2010 at 10:20 AM, Aliza Panitz <<A class="parsedEmail parsedEmail parsedEmail" href="mailto:ali...@gm..." target=_blank>ali...@gm...</A>> wrote:<BR>> This is something we could implement incrementally:<BR>><BR>> (1) Have a button that users can click to highlight every bit of track<BR>> that their trains can reach from their tokens. This will be useful<BR>> even without route calculation, though it will require Rails to learn<BR>> about track, routes, tokens, etc.<BR>><BR>> The algorithm I'm thinking of would be a simple flood-fill that gets<BR>> blocked by foreign tokens if the circles are filled.<BR><BR><BR>I agree. This is a great starting point.<BR><BR>It provides useful information to players almost immediately, even<BR>before route calculation is feature complete.<BR><BR>---Brett.<BR><BR>------------------------------------------------------------------------------<BR>Download Intel® Parallel Studio Eval<BR>Try the new software tools for yourself. Speed compiling, find bugs<BR>proactively, and fine-tune applications for parallel performance.<BR>See why Intel Parallel Studio got high marks during beta.<BR><A class=parsedLink href="http://p.sf.net/sfu/intel-sw-dev" target=_blank>http://p.sf.net/sfu/intel-sw-dev</A><BR>_______________________________________________<BR>Rails-devel mailing list<BR><A class="parsedEmail parsedEmail parsedEmail" href="mailto:Rai...@li..." target=_blank>Rai...@li...</A><BR><A class=parsedLink href="http://https://lists.sourceforge.net/lists/listinfo/rails-devel" target=_blank>https://lists.sourceforge.net/lists/listinfo/rails-devel</A><BR></BLOCKQUOTE></BODY></html> |