forums

TNT Basic Forums > Programming Q&A
The case of the switched image banks
< Last Thread     Next Thread >
Author
Thread        Post A Reply

09-12-2004 15:48

Posted by:
MapMaker

Location:
Edmonton, Alberta (Canada)

Click Here to Email MapMaker   Find more posts by MapMaker

I have run across a 'minor' problem in my game.
At whatever time in the game during runtime, all of the images decide to switch around their image banks, specifically, by + 2 to their index number.
I have checked and rechecked my code, and their is no place where any image bank comand is called in the main loop.
Has anyone else expeirinced this? Or am I just going crazy?

Thanks,
MapMaker

09-12-2004 16:07

Posted by:
MapMaker

Location:
Edmonton, Alberta (Canada)

Click Here to Email MapMaker   Find more posts by MapMaker

...

Actually, It's not a +2 to the image bank number.
Numbers 130 and 131 just decide to switch to the highest numbered loaded bank.
Default bank is 128.
I have a headache.

Help is appriciated,
MapMaker

09-12-2004 20:26

Posted by:
MapMaker

Location:
Edmonton, Alberta (Canada)

Click Here to Email MapMaker   Find more posts by MapMaker

...

Well, Now I've found something else, although still no solution.
After the sprite is declared, and decides to switch image banks, it desides to use the image "-1", which, obviously doesn't show anything.
I've even set the image to be used to 0, and the line after print the sprite image. Still -1... (and yes the image bank is loaded)

Help me...
MapMaker

09-12-2004 20:29

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

ehh?

That's weird. You aren't using copy image or delete image anywhere in your code, are you?

09-13-2004 00:04

Posted by:
MapMaker

Location:
Edmonton, Alberta (Canada)

Click Here to Email MapMaker   Find more posts by MapMaker

I am, but in a currently non-called procedure.
Would it have anything to do with a bug in memory?

Thanks,
MapMaker

09-13-2004 00:32

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

I have no idea.

09-15-2004 01:56

Posted by:
MapMaker

Location:
Edmonton, Alberta (Canada)

Click Here to Email MapMaker   Find more posts by MapMaker

...

Found another bug

print sprite exists(num + 300)
sprite (num + 300),x,y,0


gives me 1, even though the sprite has not been declared yet. Could this be a bug in TNT?

Confused,
MapMaker

09-15-2004 22:44

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

I dunno, make sure it wasn't declared before, put the print case at as many places as possible to see where it begins to exist

this kind of mistake rarely happens because of a bug ( but in that case i really dunno )

09-16-2004 00:03

Posted by:
MapMaker

Location:
Edmonton, Alberta (Canada)

Click Here to Email MapMaker   Find more posts by MapMaker

*sigh*

I put "print sprite exists(300)" as the first line of my code. Naturally, it gives me 1.

Slowly loosing hope,
MapMaker

09-16-2004 04:11

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

Weird...

You mean the second line of your code? You have to be in graphics mode first.

09-16-2004 20:31

Posted by:
MapMaker

Location:
Edmonton, Alberta (Canada)

Click Here to Email MapMaker   Find more posts by MapMaker

...

Actually, it was the second line after graphics mode.
The line before that was "print sprite image(300)".
So apparently a sprite exists as soon as anything about it is called, even though the sprite itself has not been.

The sprites are still using an image of -1 though... :(

Thanks,
MapMaker

09-16-2004 22:53

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

if you use another sprite ID, does it do that? otherwise, just rely on the image?

09-17-2004 02:15

Posted by:
MapMaker

Location:
Edmonton, Alberta (Canada)

Click Here to Email MapMaker   Find more posts by MapMaker

...

It doesnt matter what ID it uses.
I've also tried switching images and image banks.

No luck so far,
MapMaker

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.