Results 1 to 10 of 36

Thread: Introduction / my efforts

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Post

    Quote Originally Posted by Midgardsormr View Post
    Thats cool Mid but I cant see any clear sources for that name generator. Its hidden in the assembly of the main game I think and that requires considerable effort to decode - to the point that he mentions that one guy has done it and recoded it and how hard it was. What I am hoping to find is a name generator in any modern language like 'C' or something like that. Maybe its not possible without all the game code too as a means of hashing up the name.

    This is the closest I have but even this one reckons that its not the original code for it.

    http://www.parallelrealities.co.uk/p...domNameGen.php

    Maybe its impossible to get the original generator any more. Isomage - do you think you have the original Elite name generator or something approximately like it.

  2. #2

    Post

    Ian Bell has released C source code for a text-version of Elite, and it contains the name generator: http://www.iancgbell.clara.net/elite/text/

    I think I might have worked from Christian Pinder's reverse-engineered C code, which doesn't seem to be available from that site anymore.

    Here's my Python version. If you set ELITE = True, successive calls to name() will generate the sequence of names used in the game -- look for Lave on call 7 (starting from 0); otherwise you'll get a random sequence.

    Code:
    ELITE = False
    
    if ELITE:
        seed = [0x5A4A, 0x0248, 0xB753]
    else:
        import random
        seed = [random.randint(0, 0xffff), random.randint(0, 0xffff), random.randint(0, 0xffff)]
    
    def tweakseed():
        temp = (seed[0] + seed[1] + seed[2]) % 0x10000
        seed[0] = seed[1]
        seed[1] = seed[2]
        seed[2] = temp
    
    digraphs = "..lexegezacebisousesarmaindirea.eratenberalavetiedorquanteisrion"
    
    def name():
        longnameflag = seed[0] & 0x40
    
        name = ""
    
        for n in range(4):
            d = ((seed[2] >> 8) & 0x1f) << 1
    
            tweakseed()
    
            if n < 3 or longnameflag:
                name += digraphs[d:d+2]
    
        return name.replace(".", "").title()
    Last edited by isomage; 12-04-2008 at 04:35 PM.
    My random map generators and GIMP scripts: http://axiscity.hexamon.net/users/isomage/

  3. #3
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Post

    Wow that's excellent and totally rep worthy if I haven't already. I actually remember 'Lave' too. I think I might just try this to see what the names were and if I remember any more. Did you see all of our November challenge entries ? I think mine would have been improved with better names. Although our stars are named with Arabic, for some reason I think the ones in the sky sounded better than the ones I had used.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •