Need ZZT-style Explosions please? using ANYTHING that is possible for it
#1
Posted 26 September 2006 - 03:43 PM
not that I am trying to be a total jerk, I just needed to figure out how
to make a ZZT explosion out of a robot or somthing!
I know how to make a ZZT bomb, but I could not make a Explosion
like ZZT's random-colored one, Either sprite or math-circular ones can
be my choice, I could not get 'em right!
So i need you guy's help to soup somthing up using either a
MZB board, MZX world, or 2 or 3 of those ROBOT codes!
Go ahead,
-SmilyMZX
I am at:
Z2 - ZZT forums, NESDEV Forums, SMW Central (Super Mario World)
Other interests:
Museum of ZZT, NESDEV Wiki, Wiki of Weavers (ZZT-related!)
#2
Posted 02 October 2006 - 06:34 PM
#3
Posted 02 October 2006 - 09:35 PM
HOWEVER if someone could post a screenshot of a ZZT bomb explosion, I coukd probably do it.

<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#4
Posted 02 October 2006 - 10:05 PM

What I'd suggest. Make a sprite that looks like that and then whenever it is called in (by a bomb or by something exploding), have it send the lable "bombed" to all robots that it overlays.
This post has been edited by T-bone6: 02 October 2006 - 10:11 PM
#5
Posted 02 October 2006 - 10:09 PM
EDIT:

Not sure if that looks quite right or not, hm..
Now, if I recall correctly, ZZT bomb explosions drop breakaways (or whatever the ZZT equivalent was) then clear them away afterwards, right? I'll modify my code to use thoses, then.
EDIT 2:
There we go. It obviously needs tweaking, but this should be okay as a starting point.
set "commands" to "(-1>>1)" end : "touch" zap "touch" 1 loop start char "(57-'loopcount')" wait for 10 loop for 8 char '' set "exp_rad0" to 7 set "exp_rad1" to 6 set "exp_rad2" to 6 set "exp_rad3" to 5 set "exp_rad4" to 4 set "local" to -4 : "exp_loop" loop start set "local2" to "('exp_rad('abs&local&')'-'loopcount')" send at "('thisx'+'local2')" "('thisy'+'local')" to "bombed" if player at "('thisx'+'local2')" "('thisy'+'local')" "#hurt_player" if c?? Breakaway p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#place_explosion" if c?? CustomBreak p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#place_explosion" if c?? Space p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#place_explosion" if c?? Floor p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#place_explosion" if c?? Carpet p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#place_explosion" if c?? Fake p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#place_explosion" if c?? CustomFloor p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#place_explosion" : "continue" loop for "('exp_rad('abs&local&')'*2)" inc "local" by 1 if "local" <= 4 then "exp_loop" wait for 3 set "local" to -4 : "clear_loop" loop start set "local2" to "('exp_rad('abs&local&')'-'loopcount')" if c?? Breakaway p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#clear_explosion" loop for "('exp_rad('abs&local&')'*2)" inc "local" by 1 if "local" <= 4 then "clear_loop" die : "#place_explosion" set "local3" to random 4 to 15 put "local3" Breakaway p00 at "('thisx'+'local2')" "('thisy'+'local')" goto "#return" : "#clear_explosion" put c07 Space p00 at "('thisx'+'local2')" "('thisy'+'local')" goto "#return" : "#hurt_player" take 10 HEALTHS goto "#return"
EDIT 3:
Some things that might need to be changed:
- Better handing of player being hurt by explosion--should generate sound and hurt message.
- Clipping the explosion so that it doesn't go over the board edge etc.
- Code to destroy / hurt builtins, as well as things like bullets and maybe lasers.
- Timing issues
- Sound effects and other graphical effects I might be missing.
- Code to stop fake/floor/carpet etc. from being cleared by the explosion possibly?

<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#6
Posted 02 October 2006 - 10:33 PM
Quote
I'm actually doing the exact same thing with a few of my ZZT games. I'm doing this because these games won't open in ZZT due to the file size limitations ZZT has. I hate having to split a game in half in order for it to fit.
EDIT: Why does Megazeux ALWAYS crash when i paste code from the clipboard? It crashes whenever i test anything thats been pasted. Weird. Got it to work after just moving the code around a bit. Strange... maybe a MZX bug. Anywho, Fantastic job Lancer! This brings back memories!
The ZZT Bomb Explosion:
play "t+++c-c-c-c-c-c"
Here, I dropped this command just before the command die, it should sound pretty close to the same ZZT bomb explosion sound. There are two other sounds you'd have to emulate yourself: Tick and Tock.
I've also added the message that ZZT displays after touching the bomb.
Quote
end
: "touch"
zap "touch" 1
* "Bomb activated!"
loop start
char "(57-'loopcount')"
wait for 10
loop for 8
char ''
set "exp_rad0" to 7
set "exp_rad1" to 6
set "exp_rad2" to 6
set "exp_rad3" to 5
set "exp_rad4" to 4
set "local" to -4
: "exp_loop"
loop start
set "local2" to "('exp_rad('abs&local&')'-'loopcount')"
send at "('thisx'+'local2')" "('thisy'+'local')" to "bombed"
if player at "('thisx'+'local2')" "('thisy'+'local')" "#hurt_player"
if c?? Breakaway p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#place_explosion"
if c?? CustomBreak p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#place_explosion"
if c?? Space p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#place_explosion"
if c?? Floor p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#place_explosion"
if c?? Carpet p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#place_explosion"
if c?? Fake p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#place_explosion"
if c?? CustomFloor p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#place_explosion"
: "continue"
loop for "('exp_rad('abs&local&')'*2)"
inc "local" by 1
if "local" <= 4 then "exp_loop"
wait for 3
set "local" to -4
: "clear_loop"
loop start
set "local2" to "('exp_rad('abs&local&')'-'loopcount')"
if c?? Breakaway p?? at "('thisx'+'local2')" "('thisy'+'local')" then "#clear_explosion"
loop for "('exp_rad('abs&local&')'*2)"
inc "local" by 1
if "local" <= 4 then "clear_loop"
play "t+++c-c-c-c-c-c"
die
: "#place_explosion"
set "local3" to random 4 to 15
put "local3" Breakaway p00 at "('thisx'+'local2')" "('thisy'+'local')"
goto "#return"
: "#clear_explosion"
put c07 Space p00 at "('thisx'+'local2')" "('thisy'+'local')"
goto "#return"
: "#hurt_player"
take 10 HEALTHS
goto "#return"
Hopefully your not using built-in enemies. Because they can't be sent the "bombed" lable from a robot. You'll have to create your own enemies if you havn't already, using robotics. Give them a ":bombed" lable.
This post has been edited by T-bone6: 02 October 2006 - 11:26 PM
#7
Posted 02 October 2006 - 11:04 PM

<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#8
Posted 02 October 2006 - 11:27 PM
#9
Posted 03 October 2006 - 01:08 AM

koji: SCRUMTRELLESCENT!
#11
Posted 04 October 2006 - 01:29 AM
#12
Posted 04 October 2006 - 03:18 AM
Edit: And by CATERPILLER I of course mean CENTIPEDE.
This post has been edited by Spectere: 04 October 2006 - 03:31 AM
#13
Posted 04 October 2006 - 04:53 AM
Loco said:
Didn't Loco have centipedes?

koji: SCRUMTRELLESCENT!
#14
Posted 04 October 2006 - 05:53 AM
CHEZZY, on Oct 4 2006, 12:53 AM, said:
Loco said:
Didn't Loco have centipedes?
what in the... good god, you're right!
They're not perfect, though. The decapitated segments should turn into heads, I think...
#15
Posted 04 October 2006 - 11:32 AM
No matter how nonstandard the code has to be, they would be quite doable in MZX.
EDIT: Hey, what about Gemini's Town of ZZT port? Did that have decent centipedes?

<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#16
Posted 04 October 2006 - 08:45 PM
<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111