Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Celebrities > Elite > Re: Jongware ->...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 14 Topic 1039 of 1103
Post > Topic >>

Re: Jongware -> Building Galaxy Generator in C#

by "[Jongware]" <sorry@[EMAIL PROTECTED] > Dec 7, 2007 at 05:06 PM

<MICHAEL.MCALEA@[EMAIL PROTECTED]
> wrote in message 
news:9b82e4ce-d10c-4ebc-bc73-2cdb974a6836@[EMAIL PROTECTED]
> I'm having a little trouble getting the star system generator
> (Generate_StarSector function) to produce the 'correct' co-ordinate
> results as seen on the ffe starsys map, does anyone have a list of
> generated star co-ordinates (Not the known system list) so that I can
> compare the co-ordinates generated by my system with the co-ords
> generated in the real system? Just a few sectors star co-ords would be
> useful. Thanks

That might be related to the bit-****fting (lrotl, rrotl(?)) in the main 
generate routine. Older compilers use 16 bit rotations (even in 32 bit 
mode), but (f.e.) the latest Visual Studio uses 32 bit rotates, so the 
routine suddenly fails.

Try this:

#define SHUFFLEWORD(x,val)   (((x) & 0xffff)<<(val)) | (((x) & 
0xffff)>>(16-val))

-- a manual 16 bit rotate -- and use it instead of the stdlib rotates. 
Invert (val) / (16-val) to rotate right instead of left :-)
<reminder>To Self: PUT IT ON THE PAGE </reminder>

As for your debugging: FFE Starsys displays the same stars as FFE. ...
I've 
checked maybe hundreds of sectors manually, and haven't even seen it
behave 
wrong once, the past 3 or 4 years. So, if your code gives different
results 
from Starsys, it will also be different for FFE.
The original code was in assembly, my conversion was to C (which
introduced 
a few artefacts), and now you're trying it in C#. There might be all kinds

of weird effects lurking in the dark ...

[Jongware]
 




 14 Posts in Topic:
Jongware -> Building Galaxy Generator in C#
MICHAEL.MCALEA@[EMAIL PRO  2007-12-06 17:18:55 
Re: Jongware -> Building Galaxy Generator in C#
"[Jongware]" &l  2007-12-07 17:06:29 
Re: Jongware -> Building Galaxy Generator in C#
Marcin Grzegorczyk <mg  2007-12-07 22:35:30 
Re: Jongware -> Building Galaxy Generator in C#
MICHAEL.MCALEA@[EMAIL PRO  2007-12-09 15:37:54 
Re: Jongware -> Building Galaxy Generator in C#
"[Jongware]" &l  2007-12-10 12:28:30 
Re: Jongware -> Building Galaxy Generator in C#
MICHAEL.MCALEA@[EMAIL PRO  2007-12-10 05:14:56 
Re: Jongware -> Building Galaxy Generator in C#
"[Jongware]" &l  2007-12-10 20:01:56 
Re: Jongware -> Building Galaxy Generator in C#
MICHAEL.MCALEA@[EMAIL PRO  2007-12-11 01:50:32 
Re: Jongware -> Building Galaxy Generator in C#
"[Jongware]" &l  2007-12-11 21:54:48 
Re: Jongware -> Building Galaxy Generator in C#
MICHAEL.MCALEA@[EMAIL PRO  2007-12-12 04:13:19 
Re: Jongware -> Building Galaxy Generator in C#
Marcin Grzegorczyk <mg  2007-12-12 20:09:06 
Re: Jongware -> Building Galaxy Generator in C#
"[Jongware]" &l  2007-12-12 22:33:24 
Re: Jongware -> Building Galaxy Generator in C#
Marcin Grzegorczyk <mg  2007-12-13 00:10:16 
Re: Jongware -> Building Galaxy Generator in C#
stevehodge@[EMAIL PROTECT  2007-12-21 15:54:14 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 5:37:17 CST 2008.