Forums

Topic: Petit Computer

Posts 2,421 to 2,440 of 9,620

randomous

The game is only supposed to be played for 60 seconds, right? I hope that this extremely generic 35 second looping song is fine then:

Untitled

I know it's very repetitive, but I'm no composer; I'm more of a "transferer". I hope it's alright. If you decide to use it, just append it to your code. You'll probably want to remove the "BGMPLAY" line and put it where the song is supposed to play though, and BGMCLEAR/BGMSETD needs to be called just once at the top of the program. The data portion can go at the bottom of the program if you want. I won't be upset if you decide not to use it by the way.

randomous

ramstrong

randomouscrap98 wrote:

The game is only supposed to be played for 60 seconds, right? I hope that this extremely generic 35 second looping song is fine then:

It's in. The song is fine. I'd prefer generic type for this game, anyway. Thanks randomous! The only problem I have is that the volume is too low. The beeping from movement is much louder than the song. I pumped up the song to 127, but apparently, that's the default level. Any advice?

I'm not interested in putting that C-word in credits. I don't suppose you have a family-friendly name I can put you under, do you?

Edited on by ramstrong

Petit Computer Journal
Old site http://ramstrong.blogspot.com

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

randomous

@Ramstrong Oh, sorry about that! Uhhh... you can use limitlessinfinity, which is my other online name. Otherwise, you can just say CJ.

As for the song's quietness/beep's loudness, that's easily fixed by lowering the volume of the beep instead of raising the volume of the music (which you can also do if you like). For instance, let's say you're using beep 15. The resulting command for half volume is:

BEEP 15, 0, 64

Where 64 is the volume, and 0 is the pitch difference. 0 pitch will just play the beep normally, whereas something like 512 in that slot will raise it a couple of steps. Hope that helps!

randomous

ramstrong

Done. I'm saving and packaging everything. Will upload shortly. Thanks.

EDIT:
Uploaded. Link in QR thread. Including CORAL.ZIP. Please check it out and let me know if I made any mistake. I was in a rush in getting this done, I may have overlooked something. Hopefully not, but please check. Thanks.

Edited on by ramstrong

Petit Computer Journal
Old site http://ramstrong.blogspot.com

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

randomous

You're welcome! I'm glad you liked it enough to put it in the game!

Edited on by randomous

randomous

randomous

@MrSirr You've got something like this around line 51:

IF (SOMETHING) THEN IF (SOMETHING2) AND IF (SOMETHING3) AND IF (SOMETHING4) GOTO @SOMEPLACE

The problem is that you don't need the "IF" after "ANDs", so what you really want is:

IF (SOMETHING) THEN IF (SOMETHING2) AND (SOMETHING3) AND (SOMETHING4) GOTO @SOMEPLACE

Plus, if you have an if statement within the THEN of another if statement, you can almost always pull it out and mush the whole thing together using an AND:

IF (SOMETHING) AND (SOMETHING2) AND (SOMETHING3) AND (SOMETHING4) GOTO @SOMEPLACE

@boot Are those my songs? I'm glad you're using them! If you already have the qr code as a picture, you can post images using any image hosting service. My personal favorite is Dropbox (http://db.tt/RomXvvo), since you can store any type of file on there and then link to it (for instance, zip files or whatnot). If you choose to go with Dropbox, go to the website and go to the "Public" folder, make a new folder in there for you QR codes if you don't want to have to rename them all the time, and then drag and drop the file into the webpage. Once it appears, you select the file, go to the top and click "Copy Public Link". It'll give you this big long address, just put that within [img] tags and you're all set!
Other people use imgur (I've never used it so I can't help you there), and there are plenty of other options available. For instance, another free image hosting service is provided by Google called Picasa Web Albums, which is here: https://picasaweb.google.com/home. The neat thing about Picasa is that you can use your existing Google account (such as gmail/youtube/whatever) and you don't have to do anything extra.

Edited on by randomous

randomous

Discostew

@randomouscrap98

An interesting thing I encountered with those IFs and ANDs. Take these two lines....

IF (SOMETHING1) AND (SOMETHING2) THEN
IF (SOMETHING1) THEN IF (SOMETHING2) THEN

The only time where the first line is faster than the second line is if both SOMETHING1 and SOMETHING2 are true. In all other cases, the second line, while equivalent to the first outside of using ELSE, is usually faster. This is because in the first line, even if SOMETHING1 is false, SOMETHING2 is still parsed and examined, whereas in the second line, if SOMETHING1 is false, then it stops and moves on. Even if SOMETHING1 is true in the second line, it doesn't have to compare that condition with SOMETHING2. Though, I find it odd that if SOMETHING1 is true and SOMETHING2 is false in line 2, it is faster than line 1, yet when SOMETHING2 is true in line 2, it is slower than the first line.

Discostew

3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew

randomous

@Discostew Ahhh, I was under the impression that Petit Computer did short-circuit evaluation (that's what that phenomenon you described is called, but you probably already knew that). It says in the manual that the operators are more like C operators than BASIC, so I assumed that it included the evaluation methods of C operators as well. I guess they retained the old ways for AND and OR. That's good to know, thanks! How did you figure this out? Did you have a really tight loop that executed a bazillion times?

randomous

Discostew

@randomouscrap98 - Petit Computer (or BASIC in general) running code under interpretation is unable to make such short-circuit evaluations because it has no idea if latter evaluations would affect it. Languages that compile code to machine code examine these scenarios, and rearrange the logic so that it'll take the evaluations that would render the entire condition false first, at least I think that's how they do it. It was about a week ago when I stumbled across it. I wasn't even looking for it, but found it nonetheless, so then I did FOR/NEXT loops utilizing the frame counter (MAINCNTL), and started with 40k iterations to see how many frames it took to process one and then the other, and that's how I got the conclusion of what was faster.

So, with that, if you have an IF statement that strings a bunch of AND comparisons and you consider one of them to be false more often than true, you could test that one by itself and then follow the rest with their own IF statement.

Discostew

3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew

Hairmanban19

randomouscrap98 wrote:

Alright, I need to study for my finals instead of making these haha. But it's so much fun! Here's the original Legend of Zelda Overworld song (the one everybody knows):

Untitled

This one, although a more simple song than the Super Mario Bros 2 theme, was trickier than the rest because it seems like all the sheet music was made for a more grandiose version. Either it was someone's interpretation of the song or things were added/changed to sound more like a certain game. Oh well, in the end, I used this mostly: http://www.youtube.com/watch?v=lpEzYEoV9qY

Original song composed by Koji Kondo.

You did an awesome job on this! It sounds exactly the same as the original overworld music!

...

3DS Friend Code: 3136-7615-5907

Sgt_Cola

randomouscrap98 wrote:

Alright, I need to study for my finals instead of making these haha. But it's so much fun! Here's the original Legend of Zelda Overworld song (the one everybody knows):

Untitled

This one, although a more simple song than the Super Mario Bros 2 theme, was trickier than the rest because it seems like all the sheet music was made for a more grandiose version. Either it was someone's interpretation of the song or things were added/changed to sound more like a certain game. Oh well, in the end, I used this mostly: http://www.youtube.com/watch?v=lpEzYEoV9qY

Original song composed by Koji Kondo.

Random mouse, Do you think you can make the king DeDeDe theme? It would be great if you could... Or at least anybody who is good with MML & can translate sheet music...

Sgt_Cola

Sgt_Cola

actually, I won't join the contest. I'm not so good with BASIC. I need to practice...

Sgt_Cola

Sgt_Cola

Anonymous_Ninja wrote:

hey randomnouscrap if i can make a request, could you make the wispy woods battle music from the original kirby? my game is almost done and that is the last major thing i need. if not ill try, but mml is the only command that confuses me to no end. if i took the time i could learn it but im too lazy to do that anytime soon.

Why not king DeDeDe's theme? that was awesome! (expecially the masked DeDeDe one...

Edited on by Sgt_Cola

Sgt_Cola

randomous

@hairmanban19 Thanks again! No love for the Pokemon Bike theme? Nah, I'm just kidding.

@Petithead Kirby songs are really hard, so I don't know if I can make those yet.

@Discostew I think that in terms of Petit Computer, the reason they did not include this optimization was to keep the basic execution closer to the original language specification. Notice that BASIC is one of the few popular languages missing from this list, but other interpreted languages such as Perl include this feature: http://en.wikipedia.org/wiki/Short-circuit_evaluation . Most modern programming languages include this feature, and if it is a part of the language, it is always evaluated as such.

Either way, it's still great that you discovered this interesting exclusion. Now I can start using the faster method!

Edited on by randomous

randomous

Eel

If someone made a theme from a harvest moon game on petit computer I would totally update Petit Farm to include it °hint°°hint°

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

randomous

@Morhptorok Lol I've never played Harvest Moon. Any particular song stand out as one that you want? I can try to find a good recording and sheet music for it.

randomous

Eel

I'm particularly fond of this one but any "spring" or "fall" theme would be awesome! (the spring theme from the original snes game would be the easiest to recreate I think).

Edited on by Eel

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

randomous

@Morphtorok Having never played the game, it may not come out quite as nice as the others (not saying they're excellent, but a fair amount of nostalgia factored into their creation), but I'll try my best!

randomous

Please login or sign up to reply to this topic