Little Help On Graphics

Hi All

First post and whilst I’ve hunted and found a few threads, I’ve hit a brick wall and hoped someone can maybe help me a bit here.

This thread gets me close to what I want and I can get one image to show in my game but there is no obvious way for me (non javascript coder!) to figure out how to list all my images using this method?

<script type="text/javascript">
game_options = {
image_info_map: { 3: { "image": 3, "url": "Bannes Banner.png", "width": 352, "height": 78 } },
use_query_story: false,
set_page_title: false,
inspacing: 0,     // gap between windows
outspacing: 0     // gap between windows and edge of gameport
};
</script>

Any help as to how to get ALL my images (even hand coded like this) would be most appreciated.

Note: I tried to run a python script to do that and it wont work so if I can just hand code it like this, I’d be happy…but all my images and not just one as per the above code.

Thanks for your help.

You really need to use the blorbtool script, otherwise each time you release in I7 you’re going to lose the images. Or if you re-order some source text then the images might get numbered differently and then you’ll be showing the wrong image.

The script is fairly straightforward to run; after each time you click Release in I7, also run a script that executes:

python blorbtool.py "Your Story.materials/Release/Your Story.gblorb" giload "Your Story.materials/Release/interpreter" interpreter

The quotes are important when you have spaces in your story name. This assumes you’re running it from the I7 Projects folder; if you’ve put the scripts elsewhere then you’ll have to amend the paths accordingly. (I usually run it from inside the materials folder, so I don’t include that part of the path.)

Thanks for that advice Gavin. Alas I tried running this script and for some reason, it keeps failing to run (I tried running it using terminal and cd to the The Game Name.materials so it’s being run from the same location as the gblorb but no dice. It must be something stupid - I even toyed with changing the name to remove spaces but it doesn’t seem to make a difference :frowning:

I take it there is no way to change that javascript to show the images (I only have 2 or 3 anyway) and just wanted to list them in there - I wont be changing the story much now either as its about done so the resource numbers given are clear now too…its just the syntax to get the images all showing that seems to be failing me. Thanks for your help again, much appreciated.

NB I had a wee look at vorple too - this may be interesting too…some nice effects there tho for now, I just need images on the go.

What’s the actual error you’re getting? It’s likely just an issue with the paths or something, but it’s hard to help when you’re not telling us what’s actually not working.

Yes, it’s possible to edit the file by hand; you just put in multiple of those image blocks, eg:

StaticImageInfo = {
1: {
  "image": 1,
  "url": "interpreter\\pict-1.jpeg",
  "width": 680,
  "height": 680
}
,
3: {
  "image": 3,
  "url": "interpreter\\pict-3.png",
  "width": 428,
  "height": 433
}
,
4: {
  "image": 4,
  "url": "interpreter\\pict-4.png",
  "width": 513,
  "height": 673
}
};

(Those probably should be a single forward slash instead of two backslashes. I suspect that’s a Windows quirk. But it works either way.)

But again, you really shouldn’t edit this by hand, since it’ll get lost when you click Release and it might end up mixed up, as I said before. The script should just work.

Thanks VERY much indeed Gavin! That worked a treat. I’ll have a dig around with the script again as you suggest though and see if I can get it working and that would make sense longer term. For now, this works perfect - thanks again for your help.