Path: chuka.playstation.co.uk!news From: Andrew Partington Newsgroups: scee.yaroze.freetalk.english Subject: Re: Hi Score Code System Date: Mon, 29 Dec 2003 20:42:01 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 62 Message-ID: References: NNTP-Posting-Host: public2-ward1-6-cust140.manc.broadband.ntl.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en In-Reply-To: I guess a hash function is what you are after? http://www.rsasecurity.com/rsalabs/faq/2-1-6.html http://burtleburtle.net/bob/hash/ There are many ways to compute one, e.g. you might add up all the ascii values in the name, multiply by the last 4 digits of the score, then divide by 11 or some other prime number (for example, off the top of my head, though it probably isn't the best choice), or you may do something a bit more secure - the trick is to choose an algorithm which generates more unique codes than collisions. Right, back to F-Zero GX (aieee, my eyes!) Hope this helps Andy P Andrew Murray wrote: > Erm, I'm not asking anyone to disclose their code generation algorithms or > anything, just merely give me some tips and ideas on how to implement such a > system. I idealy want to generate as short a code as possible. > > Andy M. > > "Andrew Murray" wrote in message > news:bs9ckf$io21@www.netyaroze-europe.com... > >>I have recently finished a clone of tetris for the PC, I have a hi score >>system in place but I want to add hiscore codes that are encoded by the > > game > >>sent to me, decoded by a proprietry app and entered on a web site (for >>example). >> >>I have seen this done by several games in the Yaroze community (most > > notably > >>by Matt). I was thinking of having a code that contained the score and the >>name of the person who achieved it (entered when a high score is > > achieved). > >>Can anyone shed some light and share their secrets? >> >>I remember seeing something about this not too long ago but I can't > > remember > >>where I saw it. >> >>Thanks, >>Andy M. >> >> > > >