Well, I just ran into a stumbling block with my MM2 audio player. It seems that BGMSET has a bit more restriction than BGMSETD does. With BGMSETD, you give it a label, and the DATA lines afterwards get loaded up until the point of DATA 0. With BGMSET, you supply strings. But, it limits you on the number of strings variables you can supply, not how many string variables you can fit on a single line. I assume Petit Computer has a limit of 10 parameters with such functions, leaving 9 for actual data (the first being the song number to set the music into). A string is at max 256 characters, which means that the longest MML script can be 9*256, or 2304 bytes.
While most of my audio is under this limit, 2 of them are over. One being just barely over, and another that is over by 600 bytes. So, I have two options here. Either I find a way to trim both down to within the limit, or I default back to using BGMSETD, which means I can't use GRP files for holding the audio data. I will attempt to trim those songs down (while hoping to not lose quality), but if worse comes to worse, I will default back. Either way, I will release the audio player in due time.
Discostew
3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew
I believe 8 soundtracks can be played at the same time. I accidently discovered this the other day when I didn't understand what they were mentioning about when I was setting the volume for one of my music, which I can now play my sound effects without stopping the music.
I believe 8 soundtracks can be played at the same time. I accidently discovered this the other day when I didn't understand what they were mentioning about when I was setting the volume for one of my music, which I can now play my sound effects without stopping the music.
EDIT: I think I misunderstood
I had thought about that very idea (but with using BGMSET instead of BGMSETD, as the latter doesn't have the problem I'm facing), but I also considered that the moment the BGMPLAY command is used, the audio starts playing immediately, which if I were to use multiple PLAY statements, they might not be synced. Now, if it isn't immediate, but are triggered at some point (like at the beginning of a new frame), then I see no real problems. I will have to test this at a later point.
I think I might have a solution (outside of your suggestion) for trimming down my songs. It involves the Default Sound Duration script, character "L". In all my songs, I have not used it (in that I do C16, C#32, etc), and on the song that was just over the limit, I used that in multiple spots that had a consistent set of notes that played at the same rate, which allowed me to remove the length off each corresponding note. That song in particular has been reduced by almost 400 bytes without a change to quality. Now, to attack the song that is over by 600 bytes to see if I can reduce that. If I really wanted to, I could use this optimization on all my songs to drastically reduce the overall size, but that isn't priority atm.
Discostew
3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew
So, I'm toying around with a rogue like idea in my head. You know how in rogue like games you have that fog of war? I'm trying to figure out a way to have that in a rogue like type game I'm going to make. It would probably involve an array to keep track of the tiles you've seen, but how about your field of view? How would your field of view angle in different directions around corners and stuff? Oh, and to keep to the rogue like feel, I'm going to use ASCII characters.
Hey guys. Once again I need your help . I need a better way to move my character.
Here's my code:
@MOVE
LOCATE X, Y: PRINT "■"
BTN=BUTTON(0)
IF BTN==1 THEN CLS: Y=Y-1/20
IF BTN==2 THEN CLS: Y=Y+1/20
IF BTN==4 THEN CLS: X=X-1/20
IF BTN==8 THEN CLS: X=X+1/20
RETURN
I need to find a way to move the square without using CLS and without making it look like a giant snake .
Id just like to say two things: one. SALLY OPERATING SYSTEM will be posted wednesday. two. Morphtroid, is it ok if i use pblocks in my OS? i would not change a thing id just add a link to it in my OS and add u in the SALLY credits.
I'm currently looking for some peeps to make SALLY a website, facebook, and email. If anyone does this u will be mentioned as a producer in the SALLY OS credits! :)
Id just like to say two things: one. SALLY OPERATING SYSTEM will be posted wednesday. two. Morphtroid, is it ok if i use pblocks in my OS? i would not change a thing id just add a link to it in my OS and add u in the SALLY credits.
Awesome . I've been waiting for Sally OS (And it releases on my birthday, too )
Man, I'm suprised this tread is still going as strong as it is. I'm glad interest in this game is still going on after all this time
I had a question though regarding random dungeon generation. It's basically an area I have little to no idea of how to handle and I was hoping to get a nudge in the right direction.
If anyone's played the Windows 3.1 game Castle of the Winds, I'd like to make my own version of it (with a rule set closer to that of DnD, but I'm still tossing around my own elements) but what I really liked was the style of room generation there in. Would anyone be able to guide me to an algorithm similar to what was used there? (I think the Mysterious Dungeon series used a similar method, typically larger rooms seperated by extended coridors, although I may shorten distances between each)
After just a quick think about how you might do it, I came up with the following algorithm:
1. Generate a number of rooms to have in your dungeon/on the current dungeon floor (between some minimum, say 2, and some maximum, say 5)
2. For each room, randomly generate a length and height (again, with minimum and maximum values). This will give you rectangular rooms, like Nethack.
3. Randomly find an (x,y) co-ordinate for each room, ensuring that rooms don't overlap (or I guess they could, if you wanted). For the sake of convention, you could take this (x,y) co-ordinate to correspond to the upper-left tile of the room, or any other convention you decide on. You now have a bunch of rooms and need to connect them.
4. This could go a couple of ways. Perhaps the easiest way is, for each pair of rooms, designate an edge tile (on in each room) that will lead to a corridor connecting it to the other room in the pair. Then all you need to do is generate a corridor between those rooms. You could do that with straight lines (obviously adjusted for the fact you're on a square grid) or, to make things more interesting, you could introduce some random branching. Starting at the entry/exit tile of 1 room, generate the next tile in the corridor. You know what direction you need to head in to get to the other room (i.e. that corresponds to a particular tile that is the 'closest' to the entry/exit tile of the other room). Randomly decide if you will extend the corridor into the most direct tile, or use one either side of that (e.g. there is a 50% chance of the 'direct' tile being used next, or a 25% chance for each of the neighbouring tiles to be used instead). This will give you a wiggly path that will connect each entrance and exit room.
Of course, you could make the algorithm more advanced by not connecting every pair of rooms, but instead just making enough corridors that all rooms are accessible, etc. However, I think the basic algorithm above would work fine.
I used to have a blog link here. I'll put it back up when the blog has something to read.
I'm currently looking for some peeps to make SALLY a website, facebook, and email. If anyone does this u will be mentioned as a producer in the SALLY OS credits! :)
i can hear PTC much more clearly than before because i got a hat with built in headphones. makes programming a little easier ( not all the raspy beebs, but clear ones)
I'm currently looking for some peeps to make SALLY a website, facebook, and email. If anyone does this u will be mentioned as a producer in the SALLY OS credits! :)
shadowflash we should add eachother in oyur frend lists so we could maybe work on programs together through swapnote. id love to co-own SALLY with someone.
I'm currently looking for some peeps to make SALLY a website, facebook, and email. If anyone does this u will be mentioned as a producer in the SALLY OS credits! :)
Hey guys. Once again I need your help . I need a better way to move my character.
Here's my code:
@MOVE
LOCATE X, Y: PRINT "■"
BTN=BUTTON(0)
IF BTN==1 THEN CLS: Y=Y-1/20
IF BTN==2 THEN CLS: Y=Y+1/20
IF BTN==4 THEN CLS: X=X-1/20
IF BTN==8 THEN CLS: X=X+1/20
RETURN
I need to find a way to move the square without using CLS and without making it look like a giant snake .
@MOVE
LOCATE X, Y: PRINT "■"
BTN=BUTTON(0)
IF BTN THEN LOCATE X,Y:PRINT" "
IF BTN==1 THEN CLS: Y=Y-1/20
IF BTN==2 THEN CLS: Y=Y+1/20
IF BTN==4 THEN CLS: X=X-1/20
IF BTN==8 THEN CLS: X=X+1/20
RETURN
Huzzah! One of my songs that was 2905 bytes (~600 bytes over the 2304 byte limit set by BGMSET) is now....1915 bytes, almost a full kilobyte less. I can now work on the player.
Discostew
3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew
I'm currently looking for some peeps to make SALLY a website, facebook, and email. If anyone does this u will be mentioned as a producer in the SALLY OS credits! :)
i'm making an announcement! i'm writing a story for a zelda fan fiction. i shall call it "Zelda 3: The Story of Link (title pending)". i'm halfway through writing it. when i finish, i will modify it with the series timeline so it fits in perfectly. after it is finished, i have plans on PROGRAMMING ZELDA 3 INTO PETIT COMPUTER(now feel free to crap your pants). don't worry, it's not one of those crappy fan fictions online, i've had MANY people read over my progress(half of which, zelda fans), and most of them like it.
@Discostew You did a great job with Metal Man and Dr.Wily music. I don't think it isn't easy to reproduce those Megaman 2 music tracks on "limited system".The Game Gear composer couldn't reproduce Quickman stage very closely. And the Megaman 2 music were not in the Gameboy version. I didn't own Megaman 2 until later. I badly wanted to listen to those music.The first Megaman for the gameboy didn't include any of the robot master's stage. Megaman 2 recompose the music but set the octave to high and couldn't figure out to fix that. I just assume they are very hard to reproduce .
I can't wait to try out your music player. So I can play it and then hit stop, load up another program and work on that while listening to the music.
The reason why I was able to reproduce the audio with Petit Computer is because the DS audio hardware includes similar capabilities that the NES audio can produce. Plus, you could make instruments that sounded like them (which is what I did with the Triangle wave and the 2nd mode of the Noise generator, used in Quickman's Stage). The basics of the audio channels used were available as far back as the Gameboy, but lacked a few things, which is probably why the music wasn't translated to the GB Megaman games. As for the Game Gear audio, I can only imagine that they operated quite differently, despite having 3 square wave generators, and 1 noise generator.
I have an extremely basic interface right now that lists all the BGMs from the game that can be played, but what I would like to do is design an interface reminiscent to MM2's own design used for selection and password. It shouldn't be too hard, and won't require any real code work. I'm already using the package method to store the audio within a GRP file into the PRG file, so I can also include a CHR file for the tileset and a SCR file for the layout into the package as well.
There is one unfortunate problem with the audio player. It takes time to load, because it is having to read from the GRP section 1 byte at a time via GSPOIT, and forming strings by concatenating each byte to form multiple strings of max 256 characters each (remember, 2304 bytes max via 9 strings). I'll attempt to make it go faster, but in the end, expect it to take a number of seconds to load the entire MM2 soundtrack.
Discostew
3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew
Forums
Topic: Petit Computer
Posts 961 to 980 of 9,620
Please login or sign up to reply to this topic