Jump to content

Photo

Idea for OoT's Ocarina:


  • Please log in to reply
9 replies to this topic

#1 ShadowTiger

ShadowTiger

    The Doctor Is In

  • Members

Posted 03 October 2007 - 08:47 AM

I had an interesting idea how how to make a fully functional, playable Ocarina, just like in OoT.

[09:24][09:25] <ShadowTiger> You could make a global script that would take in variables from the totally separately scripted ocarina item, which, upon use, would let you use all eight buttons (Left, right, up, down, L, R, A, and B.) to play the Ocarina notes,
[09:25] <ShadowTiger> using Enter to stop,
[09:25] <ShadowTiger> and the notes that you play would be recorded to certain variables within a script.
[09:26] <ShadowTiger> Each time you'd play the Ocarina, it'd set a primary, opening variable to 1, indicating the new play session with the Ocarina.
[09:26] <ShadowTiger> then the six or eight notes that you'd play would be documented in individual variables within the script as booleans.
[09:27] <ShadowTiger> Then it'd pass those variables to the global script, and it'd check to see if they're the right notes in the right sequence,
[09:27] <ShadowTiger> and if they are, it'd activate the screen's secrets or something after you hit enter.




So. To reiterate:
  • There would be a global script which would do the following:
    • Take in the sequence of notes that you just played from the Ocarina script.
    • Check the list of allowable songs to see if you've learned the song that you just played or not.
    • Pass it back to the screen that you're allowed to reap the rewards from playing the song.
  • There would be an Ocarina Script which would perform the following actions:
    • When you use the Ocarina, it'd enter the script. Pressing Enter again would leave the script and put away the ocarina, and if you chose to change Link's graphics to Link playing the Ocarina, it'd revert his tiles. This means storing his LTM data for this purpose.
    • The script will utilize the Playsound data to allow the Left, Right, Up, Down, L, and R buttons to play Ocarina notes. (Though I believe there are only five notes, but whatever.)
    • Each note you play will be stored in eight different variables. If you play more than eight, it will have to perform the task of remembering only the most recent eight notes, which implies that it'll have to bump the contents of each variable down to its predecessor on each successive note after the eighth. That'd be the part I'm sure we'd be dreading. Or, if worse comes to worse, we could just end the ocarina session prematurely at the eighth note, preventing a ninth.
    • It would then pass the contents of the eight variables into the Global Script. I just hope that we have enough variable holder capacity. I really don't know. icon_unsettled.gif
  • A screen script which would do the following:
    • Would first take in ZQuester user input to request an appropriate song. We could pre-script songs in there in the form of variables acting as the order and kind of the notes played, and allow them to simply input the number of the song, or, we could actually state the number (1 = A, 2 = B, etc.) of the note in the order you must play them in. I'm not sure how this will work with the interaction of the global script checking the song for validity or not though, since it's more on-the-spot.
    • Could probably also state the actual spaces you must occupy to achieve the desired results from playing the song. Could be four values to be within, like the four coordinates of the corners of a rectangle, or, could even be two values, being two opposite corners of a rectangle and assuming the other two points by mathematically completing the rectangle within the script itself.
    • So when the correct notes are played, it'll trigger the screen's secrets, or any other effect that you'd like.
  • I'm really not sure how multiple songs being played on the same screen would work though.


#2 Twilight Knight

Twilight Knight

    Tell all with glee, Argon's on PureZC

  • Members
  • Real Name:Sven
  • Location:Rotterdam, NL

Posted 03 October 2007 - 01:16 PM

So what you mean here that you're going to make this or that you want the script?
Sounds as a good idea, anyway, but I guess this gonna be hard work before it works fine.

#3 Joe123

Joe123

    Retired

  • Members

Posted 03 October 2007 - 01:22 PM

It looked like just a thought, that might inspire someone else to do it to me.

#4 ShadowTiger

ShadowTiger

    The Doctor Is In

  • Members

Posted 03 October 2007 - 05:00 PM

I'm not that good at coding, nor am I thaaat good in the heavy math and logic involved, but one of the reasons why I'm not necessarily scripting it even right now is that I can write in pseudocode, but cannot translate it to actual C++. I do, however, sort of know how it'll appear in pseudocode, so I may as well lay out the basic functionality of it for someone who does know how to code.

It's basically like crafting an outline for an essay. icon_shrug.gif

#5 Lemon

Lemon

    Legend

  • Members

Posted 03 October 2007 - 07:15 PM

It's things like this that are gearing me to learning how to script. The only problem I can see is just that how you would re-create rythemn (gaps of time between when you press the keys). Besides that, it's a pretty good idea.

#6 Bayta

Bayta

    Follower of Destiny

  • Members
  • Real Name:Robin Evans
  • Location:Suffolk County, NY

Posted 03 October 2007 - 07:17 PM

That sounds really interesting, ST! I hope someone has the skill, time, and anti-laziness to do it! This is something I think _L_ and C-Dawg should do together. I know they're both really good at Z-Script. icon_confused.gif But that's just me thinking aloud. So I dunno. icon_confused.gif

#7 ShadowTiger

ShadowTiger

    The Doctor Is In

  • Members

Posted 03 October 2007 - 07:32 PM

QUOTE(EatinCake @ Oct 3 2007, 08:15 PM) View Post

It's things like this that are gearing me to learning how to script. The only problem I can see is just that how you would re-create rythemn (gaps of time between when you press the keys). Besides that, it's a pretty good idea.


Did we even need rhythm in OoT? icon_razz.gif

#8 Bayta

Bayta

    Follower of Destiny

  • Members
  • Real Name:Robin Evans
  • Location:Suffolk County, NY

Posted 03 October 2007 - 08:28 PM

The first Zelda game in which we needed rythem to play an instrument is The Wind Waker. So I don't think rythem should be that important. It would just sound pretty, and would also probably take a crap-load of effort to script. icon_wink.gif

#9 Lemon

Lemon

    Legend

  • Members

Posted 03 October 2007 - 08:29 PM

Eh. Mind's been warped by playing TP. I meant timing. You didn't just press down every button, you do it in a particular order.

#10 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 04 October 2007 - 04:27 AM

Heh, that's pretty neat. But ST, you forgot that item scripts only run for one frame.

You'd need to hand over control functions of the item script to the global.



...it should be doable however, with nested if statements. Here's what i'm thinking:

1) Get rid of the visuals. These will eat up your precious ffc slots. Every note = Goodbye ffc slot for the entire game....not good.

2) 5 notes? Why not make it a full 2 octave chromatic scale? L = pitch +1; R = Octave higher;
if(Link->InputL && Link->InputR && Link->InputA){ Gameplaysound(80); note17+1 }
Start would be a note. to quit you'd need to press all the buttons.

3)Songs trigger another ffc script....sounds good. Best to not **** around with trigger secrets.

4)Time delay: Super easy. Variable song = 1.
if(counter == 0){ song = 0; }
ie if link is not on the correct screen with the ffc, then nothing happens.


ST, why don't you give this one a shot yourself?


-I might give it a go, but i've just implemented EXPERIENCE POINTS! ....yeah, you heard me.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users