DEVPPL
http://www.devppl.com/forum/

Naive newbie question about graphics in game script
http://www.devppl.com/forum/viewtopic.php?f=49&t=13584
Page 1 of 1

Author:  markgriffith [ Sat May 16, 2009 4:16 am ]
Post subject:  Naive newbie question about graphics in game script

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

Author:  markgriffith [ Sat May 16, 2009 11:04 pm ]
Post subject:  Re: Naive newbie question about graphics in game script

Sorry it's such a boring question.

Author:  rangana [ Mon May 18, 2009 7:14 am ]
Post subject:  Re: Naive newbie question about graphics in game script

Hi Mark,

It would be a lot better if you could place in the script that you are using. It will help us easily understand what you're trying to point out.

Author:  markgriffith [ Mon May 18, 2009 3:15 pm ]
Post subject:  Re: Naive newbie question about graphics in game script

.

Thanks, rangana - will do.

Gratefully,

M

.

Author:  markgriffith [ Thu May 21, 2009 1:14 am ]
Post subject:  Re: Naive newbie question about graphics in game script

Here's the code :

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

....apparently the graphics are "inside" the array loaded by the init function, though all I see resembling a graphic is
src="image0.gif";

In fact, I'm not even sure where the array is in that code. I was hoping to carefully replace the graphic images in the array..... if I could find them.

Should I just download the code to my laptop and see what gets sent along with the array?

many thanks and apologies!

mark G.

Author:  markgriffith [ Thu May 21, 2009 1:21 am ]
Post subject:  Re: Naive newbie question about graphics in game script

Gosh, just downloaded the code, and, sure enough, there all the graphics are in my folder.

I'm such a beginner.....

Author:  markgriffith [ Sat Jun 06, 2009 1:26 am ]
Post subject:  Re: Naive newbie question about graphics in game script

.

Dear rangana,

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

Author:  rangana [ Sat Jun 06, 2009 6:47 am ]
Post subject:  Re: Naive newbie question about graphics in game script

Hi Mark,

Just zip it somewhere along the web and leave to us the URL so we could take a closer look.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/