Hi,
Using Blitz3D v1.90 - I'm fairly sure it's a bug, but prepared to be corrected ;)
Ran into a weird problem today whereby I wanted to use the LoadImage command to add some more graphics into a simple game I'm knocking up.
The line of code was in exactly the same format as all of my other LoadImage statements:
Global sz_gp = LoadImage("gfx/sz_gp.png"):MaskImage sz_gp,255,0,255
That line of code is just above all of my LoadAnimImage statements for the baddies.
So - the graphic loads and I'm testing the game (which has been working fine previously).
I press the P key to pause the game and I see the graphic I want and all seems ok..
However, I kill all of the baddies on level 1 and move to level 2 - This is where the problem started - If I collided with a baddie (using the ImageOverlap function) - Blitz3D crashed with a Memory Violation error.. and I'm thinking "wtf...? - I haven't changed anything to do with the collision routines because I know they're working"
Anyway, after a LOT of swearing, head scratching and comparing it to a previously saved version of the sourcecode, I took out the line that loads the "sz_gp" graphic and lo and behold, the game works fine again...
So, I decide to move all of my "LoadImage" statements to below the "LoadAnimImage" statements and the game works fine as I expected it to... - It's almost like you can only have a certain number of LoadImage statements above the LoadAnimImage statements.
Using Blitz3D v1.90 - I'm fairly sure it's a bug, but prepared to be corrected ;)
Ran into a weird problem today whereby I wanted to use the LoadImage command to add some more graphics into a simple game I'm knocking up.
The line of code was in exactly the same format as all of my other LoadImage statements:
Global sz_gp = LoadImage("gfx/sz_gp.png"):MaskImage sz_gp,255,0,255
That line of code is just above all of my LoadAnimImage statements for the baddies.
So - the graphic loads and I'm testing the game (which has been working fine previously).
I press the P key to pause the game and I see the graphic I want and all seems ok..
However, I kill all of the baddies on level 1 and move to level 2 - This is where the problem started - If I collided with a baddie (using the ImageOverlap function) - Blitz3D crashed with a Memory Violation error.. and I'm thinking "wtf...? - I haven't changed anything to do with the collision routines because I know they're working"
Anyway, after a LOT of swearing, head scratching and comparing it to a previously saved version of the sourcecode, I took out the line that loads the "sz_gp" graphic and lo and behold, the game works fine again...
So, I decide to move all of my "LoadImage" statements to below the "LoadAnimImage" statements and the game works fine as I expected it to... - It's almost like you can only have a certain number of LoadImage statements above the LoadAnimImage statements.