Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Location
    Budapest, Hungary
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Q about graphics in game script / naive newbie

    .

    I'm looking at an old Javascript script for the game Concentration, where small images of honey bees, flowers, fish etc are hidden under tiles.

    Obviously, this is very naive of me - I'm a total beginner, but I cannot see how the images are loaded into the script. I suppose they're hidden under some 'array' term in a way I don't understand.

    This is an old Brian Gosselin script for the game where he gives the script away free, so once again, my silly question is - where are the little pictures in the script!? I see only one .gif mentioned.

    Thanks and apologies,

    Mark

    .

  • #2
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Mark,

    The images are included in the starting array, and then loaded in within the init function:

    function init(){
    clearTimeout(id);
    for(i=0;i<=35;i++)user[i]=0;
    ticker=0; min=0; sec=0; ctr=0; finished=0;
    oktoclick=true;
    document.forms["f"].b.value="Resetting game table...";
    scramble();
    id=setInterval('runclk()', 995);
    for(i=0;i<=35;i++){
    document.images[('img'+i)].src="image0.gif";
    document.images[('img'+i)].alt="";
    }}

    http://gtscript.com/download-scripts...tion-5446.html

    So if you wanted to change the graphics, do so by changing the images included in the download. Hope this helps

    - Andy.
    Last edited by Andyram2k; 05-17-2009 at 12:46 AM.

  • #3
    New to the CF scene
    Join Date
    May 2009
    Location
    Budapest, Hungary
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    .

    Dear Andy, thanks - that's very kind!

    Yes, I thought something mysterious {at least mysterious to me} was happening with images being hidden in the initial array.

    I suppose I should actually download that code and see what comes with it instead of just sitting here looking at it on the internet!

    You've probably just helped me see past my own confusion there....

    Gratefully,

    Mark

    .

  • #4
    New to the CF scene
    Join Date
    May 2009
    Location
    Budapest, Hungary
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    .

    .....yes, changing the tile images was just what I was hoping to do, to build a vocabulary learning game for foreign languages....

    Anyway, to action.

  • #5
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Cool have fun

    - Andy

  • #6
    New to the CF scene
    Join Date
    May 2009
    Location
    Budapest, Hungary
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    .

    Dear Andyram,

    I wanted to thank you for your encouragement. About four days after you posted, so about 10 days ago, I downloaded the code, found the graphics file, redid the graphics into coloured Russian words with English translations, increased the size of the buttons, and got it to work.

    Now obviously, this is not much of an accomplishment in coding terms! Apart from inserting a 'not' into the text {these graphics were not designed by my wife, because of course I am not Brian} I did nothing else, and still don't really understand any of the detail.

    But I'd like to post the new script/game on this thread.... if I knew how. Do I just attach the .zip file? All terribly basic still, I'm afraid.

    I guess I must accept advancing in small steps...

    Gratefully,

    Mark


  •  

    Tags for this Thread

    Posting Permissions

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