dMZX Forums: Need ZZT-style Explosions please? - dMZX Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Need ZZT-style Explosions please? using ANYTHING that is possible for it

#1 User is offline   smilymzx 

  • Those Goodie-Goodies!
  • PipPipPip
  • Group: Members
  • Posts: 350
  • Joined: 25-October 03
  • Gender:Male
  • Location:I.M.MEEN's book

Posted 26 September 2006 - 03:43 PM

Ok, I am making a port of a game from ZZT to MZX!
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
SmilyMZX, A.K.A. Hamtaro126 (A.K.A. AtariHacker)

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!)
0

#2 User is offline   T-Bone 

  • Wastelander
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,487
  • Joined: 16-August 02
  • Gender:Male
  • Location:Canada

Posted 02 October 2006 - 06:34 PM

If i have time, I'll try to whip something up. I'm surprized Lancer or Pyro haven't replied to this yet.
0

#3 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,943
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 02 October 2006 - 09:35 PM

Unfortunately I'd probably have to download ZZT to see how the bomb works

HOWEVER if someone could post a screenshot of a ZZT bomb explosion, I coukd probably do it.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#4 User is offline   T-Bone 

  • Wastelander
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,487
  • Joined: 16-August 02
  • Gender:Male
  • Location:Canada

Posted 02 October 2006 - 10:05 PM

Posted Image

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

0

#5 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,943
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 02 October 2006 - 10:09 PM

Hmm.. I'm at Uni with nothing really better to do for a little bit, I'll see what I can do.

EDIT:
Posted Image

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?
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#6 User is offline   T-Bone 

  • Wastelander
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,487
  • Joined: 16-August 02
  • Gender:Male
  • Location:Canada

Posted 02 October 2006 - 10:33 PM

Yeah it would place "breakables". Which are exactly the same as breakaways in physics and appearence. You can shoot them to break.

Quote

Ok, I am making a port of a game from ZZT to MZX!

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

set "commands" to "(-1>>1)"
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

0

#7 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,943
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 02 October 2006 - 11:04 PM

This is MZX so it would have to be * "Bomb activated!" or something like that.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#8 User is offline   T-Bone 

  • Wastelander
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,487
  • Joined: 16-August 02
  • Gender:Male
  • Location:Canada

Posted 02 October 2006 - 11:27 PM

Fixed. That's what i had in the robot. I think I may even use this in my ZZT 2 MZX games. This is the best ZZT-Bomb in MZX ever!
0

#9 User is offline   CHEZZY 

  • sometimes... I dream about cheese
  • PipPipPipPip
  • Group: Members
  • Posts: 996
  • Joined: 08-April 06
  • Location:New Zealand

Posted 03 October 2006 - 01:08 AM

Wowzers, I almost forgot I was using mzx! (apart from no yellow borders) Thats some nice code.
user posted image
koji: SCRUMTRELLESCENT!
0

#10 User is offline   asgromo 

  • steiner, porsches
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,842
  • Joined: 04-May 02
  • Gender:Female
  • Location:New York State

Posted 04 October 2006 - 12:36 AM

Someone try a caterpillar now. =P
0

#11 User is offline   T-Bone 

  • Wastelander
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,487
  • Joined: 16-August 02
  • Gender:Male
  • Location:Canada

Posted 04 October 2006 - 01:29 AM

That'd be tricky. I'll assume you'd have to be pretty good at using sprites in order to make it at all similar. The ZZT to MZX utility attempts it.. but i say it FAILS! Nice attempt though still. Just didn't feel very ZZT-like.
0

#12 User is offline   Spectere 

  • Resident Spectere Fanboy
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,111
  • Joined: 18-June 04
  • Gender:Male
  • Location:Struthers, OH, USA

Posted 04 October 2006 - 03:18 AM

I've thrown a few methods of doing caterpillers in MZX without using sprites and the like around in my head...one of these days I might actually draw it out and try to implement it.

Edit: And by CATERPILLER I of course mean CENTIPEDE.

This post has been edited by Spectere: 04 October 2006 - 03:31 AM

:)
0

#13 User is offline   CHEZZY 

  • sometimes... I dream about cheese
  • PipPipPipPip
  • Group: Members
  • Posts: 996
  • Joined: 08-April 06
  • Location:New Zealand

Posted 04 October 2006 - 04:53 AM

Loco said:

eww, centipedes

Didn't Loco have centipedes?
user posted image
koji: SCRUMTRELLESCENT!
0

#14 User is offline   asgromo 

  • steiner, porsches
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,842
  • Joined: 04-May 02
  • Gender:Female
  • Location:New York State

Posted 04 October 2006 - 05:53 AM

CHEZZY, on Oct 4 2006, 12:53 AM, said:

Loco said:

eww, centipedes

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...
0

#15 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,943
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 04 October 2006 - 11:32 AM

Centipedes shouldn't be hard to code. Documenting their exact behaviour in ZZT before coding can begin is where the trouble will be.

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?
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#16 User is offline   Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,966
  • Joined: 12-October 00
  • Gender:Male

Posted 04 October 2006 - 08:45 PM

Considering how much Gemini bragged about them, it'd better =D
angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe

<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users