Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:11 17 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Sprite help!!!

Author Message
yock1960
Senior Member

Joined: 18/08/2020
Location: United States
Posts: 167
Posted: 07:48pm 11 Feb 2021
Copy link to clipboard 
Print this post

Okay, I've pulled out all of my hair and read and re-read the manual and forum to try and find an answer to this problem...not to say that I haven't missed something...but I just can't find a solution....short of placing 'on error skip' before all sprite commands. Likely that wouldn't work either. Attached is a WIP of my attempt to re-create a Qbert-ish clone. It will play (with Classic joystick) for a while, perhaps even to as far as I have levels setup, but invariably, the 'dreaded' 'sprite internal error' will strike. Since I don't know what triggers this, apart from repeated hiding/showing of sprites...I can't fix it. I don't think I'm doing anything 'illegal' since it works...but perhaps I'm just not doing things as it was imagined they would be done...I don't know.

I did try a 'trick' of vegipete's that I saw last night, of not hiding, but moving sprites offscreen...but after changing all of the 'hides' to show sprite x,mm.hres-1,mm.vres-1...strange things happened...a do loop broke and then I kept getting a weird error about an illegal character (double quote) , where I'd never seen before and just didn't make any sense!

The code is not well documented, not optimized, filled with extraneous code....and...has undergone a couple of re-thinks. On the fly re-defining of some sprites being the big one.

I'd appreciate any thoughts on a solution!

Steve

qbert.zip
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3477
Posted: 08:31pm 11 Feb 2021
Copy link to clipboard 
Print this post

Can't help about the rest, but "illegal character (double quote)" sometimes means that the non-ascii opening double-quote or closing double-quote has been copied from another source. You might try replacing that. Or sometimes it's an invisible character (e.g., em-space or en-space).
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10590
Posted: 08:49am 12 Feb 2021
Copy link to clipboard 
Print this post

It is impossible to help with a program this big. There may be a firmware bug or you may be using the firmware in a way that wasn't anticipated and isn't being trapped. If you can create a simple program that demonstrates the issue I will of course look at it.

Things to think about:

Avoid ever using ON ERROR - your code should know its own state and not do things that need error trapping. If it was up to me I would remove ON ERROR completely.

  Quote  On the fly re-defining of some sprites being the big one.

This one sounds suspicious. Are you using it on any "copied" sprites? That could be an issue that may not be being trapped
 
yock1960
Senior Member

Joined: 18/08/2020
Location: United States
Posts: 167
Posted: 11:45am 12 Feb 2021
Copy link to clipboard 
Print this post

  matherp said  It is impossible to help with a program this big. There may be a firmware bug or you may be using the firmware in a way that wasn't anticipated and isn't being trapped. If you can create a simple program that demonstrates the issue I will of course look at it.

Things to think about:

Avoid ever using ON ERROR - your code should know its own state and not do things that need error trapping. If it was up to me I would remove ON ERROR completely.

  Quote  On the fly re-defining of some sprites being the big one.

This one sounds suspicious. Are you using it on any "copied" sprites? That could be an issue that may not be being trapped




The on error statements were a crutch certainly, originally for not hidden or not shown errors, I know how to fix this now.

No, no copied sprites were involved in 'on the fly' re-definition.

Based on your response, I went back to an earlier version, before on the fly definition and the sprite internal error problem goes away, so it seems as if re-defining...repeated read sprite statements, which is not forbidden...is problematic. I've even tried closing before 're reading', it doesn't help.

The reason I do this, is because the orientation capability wasn't working for me....the sprite would be in the wrong place. If I could figure out how to make this work...it would potentially solve the issue. I guess I'll go back and look at this to see if I 'imagined it' or if I need to 'track' orientation to compensate when showing sprites or if there is another solution.

I'll work on a test program, maybe it will shed some additional light on the problem, of itself.


Steve
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025