dMZX Forums: "What's the command that does X" questions - dMZX Forums

Jump to content

  • (8 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

"What's the command that does X" questions Post them here.

#61 User is offline   Exophase 

  • Laughing on the inside.
  • Group: DigiStaff
  • Posts: 7,155
  • Joined: 23-October 00
  • Gender:Male
  • Location:Cleveland, OH

Posted 04 January 2007 - 08:41 PM

About reading the overlay, I think if you have the need to you might be designing something in a less than desireable way.
~ ex0 has a kickass battle engine, without it you sux0rz! without it you sux0rz! ~

"The fact that I say I've one of the best, is called honesty." -Akwende
"Megazeux is not ment to be just ASCII, it is ANSI!" - T-bone6
"I hate it when you get all exo on me." - emalkay

Exophase can what Rubi-cant.
exoware is ware ur ware is exoware
ps. not loking 4 new membrs kthx
0

#62 User is offline   CHEZZY 

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

Posted 06 January 2007 - 01:27 AM

How do I make overlay that stays at the same position on the viewport when the player moves around? For status bars etc.
user posted image
koji: SCRUMTRELLESCENT!
0

#63 User is offline   Goshi 

  • I'm dreadful of DRAGON.
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 4,146
  • Joined: 23-April 01
  • Gender:Male
  • Location:Hihoukan

Posted 06 January 2007 - 01:38 AM

Static Overlay >_>;
0

#64 User is offline   CHEZZY 

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

Posted 06 January 2007 - 02:09 AM

thanks.
What do you do if you want to have overlay that stays on the board AND static overlay at the same time?
user posted image
koji: SCRUMTRELLESCENT!
0

#65 User is offline   Dr Lancer-X 

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

Posted 06 January 2007 - 05:27 AM

1) Use normal overlay for everything, and copy a piece of overlay to an area based on scrolledx and scrolledy, but first copy the overlay at that point somewhere save. Then copy that back on the next cycle and repeat the process.

2) Use normal overlay, and put your static overlay on a static sprite.

3) Use static overlay for everything, keep your normal overlay outside the screen portion of the static overlay, and then copy appropriately-sized amounts from some location based on scrolledx and scrolledy to the display portion, then clear it and repeat next cycle.

2 is by far the best and easiest, and there is no reason whatsoever why you would use one of the other two options. But they're still available to you =p
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#66 User is offline   T-Bone 

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

Posted 06 January 2007 - 06:00 AM

T-bone6, on Dec 28 2006, 03:45 AM, said:

Here's my question for everyone or anyone that knows the answer; how can i make this work with the vlayer:

Quote

set "vch&thisx&,&thisy&" to 2
set "vco&thisx&,&thisy&" to 31

Perhaps I CANT use this?

This post has been edited by T-bone6: 06 January 2007 - 06:01 AM

0

#67 User is offline   Revvy 

  • Jeez guys, there's no need to be narky.
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,520
  • Joined: 05-March 01
  • Gender:Male
  • Location:Ontario, Canada

Posted 08 January 2007 - 02:33 AM

T-bone, have you see the vlayer width/height first?
<+AFK> Bringing whisky to my mother is like irrigating a lake.

<+AFK> dormando's apathy is palpable.
* AFK palpates
<dormando> stop that

<Malwyn> undressing with revvy a little over a metre away. new definition of awkward.
0

#68 User is offline   Dr Lancer-X 

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

Posted 08 January 2007 - 03:28 AM

The vlayer has a default size of 256x128, so unless you go over those you do not need to set it
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#69 User is offline   T-Bone 

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

Posted 09 January 2007 - 01:16 AM

omg omg omg! I now completely understand sprites and vlayers! Thank you guys! The vlayer is basically a massive pattern table that sprites can refer to. So I should just make the the vlayer a pattern table for my sprites and have them refer to section in the pattern table just like Nintendo! AWESOMENESS!

Thanks a bunch! I was completely looking at vlayers in a different way. Glad to finally be on track... was about time! I want to especially thank Exophase for implementing these features to MegaZeux. I've finally be able to do 99% of everything I've ever wanted to with MZX and it wouldn't of been possible without your help. Everything you've done with MZX has been amazing and I hope you continue to help us MZX game developers. You deserve a shit load more respect than you receive in this community for all you've done for it. Funny to see how most of those that disrespect for you the most haven't done jack-shit for this community nor have they done any true MZX work that contributes to this website and forum.

I think your awesome guy who goes the extra lengths to fore-fill our needs and (personally more importantly) mine; with all of the help you've given me in the years with MegaZeux, PSP Homebrews and just about anything programming related. So, I strongly hope you keep up the good work with MegaZeux, not just because your such a valuable asset but because i personally think you are a very helpful "friend".

This post has been edited by T-bone6: 09 January 2007 - 01:35 AM

0

#70 User is offline   Padz 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 393
  • Joined: 02-October 02
  • Gender:Male
  • Location:England IOW

Posted 11 January 2007 - 02:45 PM

Is there any way to control the volume of sams/wavs in robotic?
He who has not faced death can never understand life
0

#71 User is offline   Dr Lancer-X 

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

Posted 11 January 2007 - 03:26 PM

No.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#72 User is offline   Padz 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 393
  • Joined: 02-October 02
  • Gender:Male
  • Location:England IOW

Posted 11 January 2007 - 04:38 PM

Damn! cheers anyway lancer
He who has not faced death can never understand life
0

#73 User is offline   YapokJr 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 8
  • Joined: 12-January 07
  • Location:Somewhere in the Midwest

Posted 12 January 2007 - 05:06 PM

Although Lancer's way works fine, there's another way of dealing with overlays:

The kinematics of surface swimming of the Virginia opossum (Didelphis virginiana) and water opossum (Chironectes minimus) were studied to determine locomotor changes associated with the evolutionary transition from terrestrial to semiaquatic existence. Films of individual animals swimming across an aquarium were made and analyzed. Didelphis swam with a modified quadrupedal gait similar to a diagonal sequence run. Besides providing propulsive forces, this gait generated an upward force allowing the nasal apertures to remain above the water for breathing. In contrast, Chironectes paddled exclusively with the hind limbs in a manner similar to other semiaquatic mammals. The non-wettable fur of Chironectes seemed to provide sufficient buoyancy so that no additional forces were required to maintain the nares above the water surface. Transition to exclusive hind limb paddling in semiaquatic mammals appears to be associated with development of non-wettable fur for increased buoyancy and with increased swimming effectiveness resulting from lack of interference between forelimbs and hind limbs during the stroke cycle. Eliminating use of the forelimbs in paddling also permitted unrestricted movement of the hind limbs.
0

#74 User is offline   Castlevania 

  • Veteran Member
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,493
  • Joined: 27-October 00
  • Gender:Male

Posted 12 January 2007 - 05:47 PM

Who are you and why aren't you funny? :p
0

#75 User is offline   Goshi 

  • I'm dreadful of DRAGON.
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 4,146
  • Joined: 23-April 01
  • Gender:Male
  • Location:Hihoukan

Posted 12 January 2007 - 11:42 PM

I think this guy is a biology teacher...

D:
0

#76 User is offline   NoahSoft 

  • DMZX Fo' Life
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,552
  • Joined: 14-May 01
  • Location:Canada

Posted 13 January 2007 - 01:37 AM

is there a command that can alter fire burns space, fire burns fake, etc?

:p
<=D I AM A ROCKER. I ROCK OUT.<=D
0

#77 User is offline   YapokJr 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 8
  • Joined: 12-January 07
  • Location:Somewhere in the Midwest

Posted 13 January 2007 - 05:55 AM

Goshi, on Jan 12 2007, 11:42 PM, said:

I think this guy is a biology teacher...

D:

Close. I am a disciple of Bee Fly Ptarmigan, the blessed lamb of cod. Smelly dried cod reconstituted in lye.

To answer NoahSoft's question, the fire burning question can be resolved by lifting up thy cares to Bee Fly Ptarmigan and receiving Its lint. The global editor will then receive second degree burns to the space, although they can be recovered to fake given prompt emergency care and three days in the ICU.

May you have rosy phlox in frocks on rocks. And a good day to you, sirs.
0

#78 User is offline   T-Bone 

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

Posted 13 January 2007 - 06:45 AM

YapokJr, on Jan 12 2007, 12:06 PM, said:

Eliminating use of the forelimbs in paddling also permitted unrestricted movement of the hind limbs.

Your commands didn't work for me.
0

#79 User is offline   Pyro1588 

  • wojtek
  • PipPip
  • Group: Members
  • Posts: 145
  • Joined: 20-October 02
  • Gender:Male
  • Location:Minnesota

Posted 14 January 2007 - 08:03 PM

Goshi, on Jan 12 2007, 05:42 PM, said:

I think this guy is a biology teacher...

D:

or perhaps someone with an unquestionable mastery of ctrl+c and ctrl+v. for instance, look at what i can copy and paste: http://cat.inist.fr/?aModele=afficheN&cpsidt=4741469
at any rate, i'll go with emalkay on this one.
<Tox> bah. I may as well give in and shop australia. D:
<pyro1588> "welcome to australia, can i help you find what you're looking for?"
<Tox> pyro1588, I'm giving you the most reproachful of glares right now.
--------
Go show those nutty Koreans what us crazy Europeans are made of pirate.gif pirate.gif pirate.gif - Saike
<exophase> The old Commodore strategy of, "Go friggin' bankrupt!"
<wervyn> Go away! I'm writing the same engine I always do!
0

#80 User is offline   CHEZZY 

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

Posted 15 January 2007 - 04:26 AM

Yapok that was hilarious :p
user posted image
koji: SCRUMTRELLESCENT!
0

#81 User is offline   Goshi 

  • I'm dreadful of DRAGON.
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 4,146
  • Joined: 23-April 01
  • Gender:Male
  • Location:Hihoukan

Posted 15 January 2007 - 04:44 AM

YapokJr, on Jan 13 2007, 03:55 PM, said:

Goshi, on Jan 12 2007, 11:42 PM, said:

I think this guy is a biology teacher...

D:

Close. I am a disciple of Bee Fly Ptarmigan, the blessed lamb of cod. Smelly dried cod reconstituted in lye.

Does that mean you smell funny?
0

#82 User is offline   nooodl 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 735
  • Joined: 28-October 06
  • Gender:Not Telling
  • Location:Belgium

Posted 06 February 2007 - 06:01 PM

I know this won't be teh easy to answer and requires a whole code instead of 1 command, but...

How the hell do you work with sin, cos, and tan. I can't get to do anything with it, so someone has to make a tutorial or whatever IMO. I want to draw one freaking circle already. :p
0

#83 User is offline   Val 

  • ring ring zap
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,233
  • Joined: 19-February 04
  • Gender:Female
  • Location:Bartholomew

Posted 06 February 2007 - 08:18 PM

set "c_divisions" 360
set "multiplier" 10
set "xpos" 40
set "ypos" 12
loop start
rel counters
put c0f '@' overlay "sin&loopcount&" "cos&loopcount&"
loop 360

See, you just need to remember to set the right counters. C_DIVISIONS is how many, er, points are on the circle or something. Multiplier what the outputs of sinN, cosN, etc. are multiplied by. You can't usually do things like drawing circles very well if you don't set those counters (because if I recall correctly, by default, they're set to ridiculously high values).

Also, when you work with trig, things tend to go pretty slow, so usually you should SET "COMMANDS" 32767.

This post has been edited by Guy: 06 February 2007 - 08:28 PM

0

#84 User is offline   Terryn 

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

Posted 06 February 2007 - 08:43 PM

Why set commands to 32767? If you can, go higher. <3
Also, setting multiplier to higher numbers results in higher precision, especially since MZX will truncate the results of trig functions instead of round. I recommend the default (10000) for normal usage.
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

#85 User is offline   Dr Lancer-X 

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

Posted 06 February 2007 - 11:29 PM

set "commands" "(-1>>1)"

I often like to set "multiplier" 65536 and multiply then divide the answers to get the multiplier I want. This isn't so much for higher precision as it is to avoid setting 'multiplier' every time I want a trig value.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#86 User is offline   nooodl 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 735
  • Joined: 28-October 06
  • Gender:Not Telling
  • Location:Belgium

Posted 07 February 2007 - 06:54 AM

ZOMG, thanks everyone! I'll go check it out riiight now. (I pretty much knew Guy would know it - a lot of his games I have used it which is why I asked it anyway. Trying to get the info from the robot itself is a pain in le butt :p)

EDIT

1. That was the coolest thing ever.

2. It's awesome fun to mess around with the multiplier and whatever you put infront of &loopcount&. :D

EDIT 2

I just messed around. This looks cool with a pallete that goes from dark to bright - but it's also cool with the default one.

: "start"
inc "local2" by 1
set "c_divisions" to 360
set "multiplier" to 5
set "xpos" to 40
set "ypos" to 10

loop start
set "local" to random 176 to 178
rel to counters
put "local2" "local" overlay to "(('cos&loopcount&')*&local2&)" "sin&loopcount&"
loop for 360
goto "start"


Or with the cool pallete (no shading though):

: "start"
inc "local2" by 1
set color 0 to 0 0 0
set color 1 to 8 8 8
set color 2 to 16 16 16
set color 3 to 24 24 24
set color 4 to 32 32 32
set color 5 to 40 40 40
set color 6 to 48 48 48
set color 7 to 56 56 56
set color 8 to 64 64 64
set color 9 to 56 56 56
set color 10 to 48 48 48
set color 11 to 40 40 40
set color 12 to 32 32 32
set color 13 to 24 24 24
set color 14 to 16 16 16
set color 15 to 8 8 8
set "c_divisions" to 360
set "multiplier" to 5
set "xpos" to 40
set "ypos" to 10

loop start
set "local" to 219
rel to counters
put "local2" "local" overlay to "(('cos&loopcount&')*&local2&)" "sin&loopcount&"
loop for 360
goto "start"

This post has been edited by HappyFoppy: 07 February 2007 - 07:37 AM

0

#87 User is offline   Baby Bonnie Hood 

  • Neatsome!
  • PipPipPipPip
  • Group: Members
  • Posts: 811
  • Joined: 16-August 00
  • Gender:Male
  • Location:Philippines

Posted 15 February 2007 - 07:35 AM

Wow, a noob really is me. Is it possible to search for the existence of a Robot with a specific name?

Stupid centipedes that aren't native to MZX...
Posted Image
0

#88 User is offline   Terryn 

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

Posted 15 February 2007 - 02:00 PM

Yeah, sure can. Use the RID<name> counter, and if no Robot with that name exists, Robot ID returned will be -1.

IF RIDCenty = -1 "nihil"
* "You have a bot named Centy on-board! =o"
end
: "nihil"
* "You don't have a bot named Centy on-board >:("
end

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

#89 User is offline   nooodl 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 735
  • Joined: 28-October 06
  • Gender:Not Telling
  • Location:Belgium

Posted 19 February 2007 - 08:43 AM

Oh dear, I'm almost annoyed by this one.
set "spr1_refx" to 1
set "spr1_refy" to 0
set "spr1_width" to 2
set "spr1_height" to 2
set "spr1_cx" to 0
set "spr1_cy" to 0
set "spr1_cwidth" to 2
set "spr1_cheight" to 2
put c?? Sprite p01 at 10 5
set "spr2_refx" to 1
set "spr2_refy" to 0
set "spr2_width" to 2
set "spr2_height" to 2
set "spr2_cx" to 0
set "spr2_cy" to 0
set "spr2_cwidth" to 2
set "spr2_cheight" to 2
put c?? Sprite p02 at 10 10
: "lop"
: "collision"
lockplayer
if uppressed then "#up"
if downpressed then "#down"
if leftpressed then "#left"
if rightpressed then "#right"
wait for 1
goto "lop"

: "#up"
if c?? Sprite_colliding p01 at 0 -1 then "collision"
dec "spr1_y" by 1
wait for 1
goto "#return"
: "#down"
if c?? Sprite_colliding p01 at 0 1 then "collision"
inc "spr1_y" by 1
wait for 1
goto "#return"
: "#left"
if c?? Sprite_colliding p01 at -1 0 then "collision"
dec "spr1_x" by 1
wait for 1
goto "#return"
: "#right"
if c?? Sprite_colliding p01 at 1 0 then "collision"
inc "spr1_x" by 1
wait for 1
goto "#return"


Argh, I hope someone can read that all. So anyway, on this board, theres this little 2x2 smiley (a large one) and I want it to move with the player keys and collide with everything the player collides with. I have a 2nd sprite for testing collision too, but the sprite that moves only collides with the other sprite and not with Solid, Customblock, etc etc. I still can't find how to solve this. :p
0

#90 User is offline   asiekierka 

  • ??
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,268
  • Joined: 06-April 06
  • Gender:Male
  • Location:Poland

Posted 19 February 2007 - 09:09 AM

I have my own 2x2 player engine. PM me your MSN contact if you have, and i will send you it.
Huh.
0

Share this topic:


  • (8 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

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