Exploding routine
I've been mucking about with 'Explode' from YS Program Pitstop, but I can not get it to work independently of the basic program.
LET L=USR 61456 doesn't seem to work unless its from the basic program
I am basically wanting a 16 x 16 pixel object to explode full screen, but it just wont have it!
http://www.worldofspectrum.org/showmag.cgi?mag=YourSinclair/Issue39/Pages/YourSinclair3900074.jpg
LET L=USR 61456 doesn't seem to work unless its from the basic program
I am basically wanting a 16 x 16 pixel object to explode full screen, but it just wont have it!
http://www.worldofspectrum.org/showmag.cgi?mag=YourSinclair/Issue39/Pages/YourSinclair3900074.jpg
Post edited by daveysludge on
Comments
Games List 2016 - Games List 2015 - Games List 2014
Ah gotcha!
Cheers BB!
Are we going to see some 'exploding turds' in the near future then..? ;)
LOL! Yeah something along those lines!
Does anyone know of any other routines knocking around these forums that do anything similar (pixelated explosions)...???
:-)
Download the latest version of Bomb Munchies Ver2210 4th July 2020
Anyway, this is it, in case anyone needs such routine:
http://www.atc.us.es/~rodriguj/exploding_effect_zxspectrum.zip
Source code and a demo in BASIC featuring some nice explossions. The exploding effect can be constrained to a rectangular area, so multiple explossions are possible. See demo for details.
The interface to the routine is defined at line 10. It's function FN e(), which is defined as: Where:
a,b: x and y coordinates of the top left corner of the pixel block we want to explode.
c,d: width and height (minus 1) of the above block.
e,f: x and y coordinates of the center of the explossion (which should be inside the above mentioned pixel block)
g,h,i,j: define a rectangle with top left corner at (g,h) and bottom right corner at (i,j). The explossion will be constrained to this area
k: delay factor. Greater values produces slower explossions. Keep low for explossions with many pixels.
Coordinates are reffered to the top left corner, which is position (0,0). Range is to 255 and 191
Be careful. c and d must be so that: (c+1)*(d+1)<=1024
For example: to explode a capital "A", printed at the center of the screen, you can do this:
On ZX Spin the demo works until the routine is called, then it just resets...
Yeah, I have the demo working on 128 now, seems I omitted RUNning the TAP from start when loaded as it LOADs the code into memory.
I'm a bit puzzled by this routine, it says its 920 bytes long. Starts at 61440 yet it seemingly ends at 61780 (340 bytes), then something incoherrent starts again at 61953 and goes on to 63163 (1210 bytes!!!)...
In total 1723 bytes used on something!
Is there a way of re-locating the incoherent stuff (61953 on) as I cant find anything in the routine that points to that...
So its the IX register that controls that stuff?
I'm not well acquainted with the IX stuff... :???:
Yeah, the lack of sound is its only problem, I'd be interested in a version with sound if possible...