MMLL Development Diary

flash · 349994

Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #360 on: September 19, 2009, 01:06:42 pm
As I mentioned to Flash privately I don't want a full coder credit for this game because I've only done a minor coding part along with some code resused from Warhawk. I don't want to give people the wrong impression that we co-wrote the game when Flash has obvously spent a tonne more time on it. Unfortunately I think TDG may end up being along similar lines, but when we move to the iPhone I do hope the first game we do will be another co-production (of course I hope that Lobo and SF continue to work with us in the future too). We make a great team and I really enjoy working together on projects.

Flash has access to my source code so at least there is something that can be used as a learning tool as I think it's always easier to learn by example. But maybe you could do a small demo/experiment in C++ each week to start getting some practical experience?



Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #361 on: September 19, 2009, 01:18:22 pm
I went back to TDG soon, but its still early (I guess) and have movie music in focus correctly. Send me a mail with list, but would been easier with more gameplay. I can do 2-3 small jingles (or more if needed) as well for that game.

You  can allways get a thanks credits for the help or such that, which is not a full credits as well sverx (Xm7Play should been credited anyway, so we could have XM music).

I still not have a Iphone, and if I get it, its first next year. It mightbeen a IPod Touch instead, which I can use to test with..... But let see in the future which remake or game, it end with as first game....
« Last Edit: September 19, 2009, 01:21:19 pm by spacefractal »

The Musician for the RetroBytes Portal Projects.


Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #362 on: September 19, 2009, 02:29:52 pm
Can I make a graphical suggestion? When you start a level sometimes its a bit hard to see where you start from even with the spotlight effect. I think if there were some sort of bright yellow "teleportation waves" around the main character sprite when you start it would be clearer. Or perhaps a flashing red arrow? You could also have arrows pointing to the switches and stuff at the beginning so you know straight away where the important things in the level are.



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #363 on: September 19, 2009, 02:40:53 pm
I will give that a thought HK! That is an idea - It is easy for me because I know where we start on each level.. But a new player may find it tricky at times.

SF: Thanks for the bug report.. I will sort that (just a data error I believe mate)

Coding for the love of it!


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #364 on: September 19, 2009, 02:45:27 pm
HK...

I have compressed with -nv9 setting using gzip as Sverx suggested, and I get the same corruption? Hmmmm...
The first tune (dark.xm) does not sound right and reggae.xm have nasty clicks in it?

Any idea if there is some kind of leakage in the decompress? If the malloc enough?

Bugger!

EDIT:
I wonder if the buffer needs flushing or something?

Skipping to level 6 (dragon users...) causes corrupted music.. but setting start level to 6 in initgame.s and the levels music plays perfectly?

Does that help either Sverx or you HK?
« Last Edit: September 19, 2009, 02:51:57 pm by Flash »

Coding for the love of it!


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #365 on: September 19, 2009, 03:40:00 pm
Found it..

HK: you were passing r3 as the len of the xm in initlevel.s but not using it.

changing to this and it works?
Code: [Select]

ldr r0, =ZLibBuffer @ Uncompress module
@ ldr r1, =ZLibBufferLen
mov r1,r3, lsl #2

bl uncompress

Now, I am a bit of a dumbass, I know.. But.. Why does it make a difference? If I unpack lz'd tiles to vram, if i unpack more or less, the graphics that are uncompressed are not affected?

Wave a finger and call me dumb.... LOL

Coding for the love of it!


Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #366 on: September 19, 2009, 04:16:35 pm
When you unpack with lz77 the size of the data is stored in it's header. That's why you don't need to pass it's size.

As for zlib I have no idea why that code you posted works. I was following sverx's code so perhaps he is passing in the wrong value for the size parameter? I've made a demo based on his C code with all the MMLL songs and some of them fail to load just as in MMLL.
« Last Edit: September 19, 2009, 04:40:55 pm by Flash »



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #367 on: September 19, 2009, 04:22:27 pm
I have done a commit with the change and a new tune added for Casablanca level, this has a tiny glitch near the begining that is not present normally.

So, perhaps there is something eles???

Coding for the love of it!


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #368 on: September 19, 2009, 04:27:23 pm
The same tune in the demo that you have problems with is the one from level 6 i mentioned - something strange there?

Coding for the love of it!


Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #369 on: September 19, 2009, 05:06:49 pm
I'm pretty sure how I had the code in music.s is correct going by what I've read about the function

Quote
int uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
Decompresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total size of the destination buffer, which must be large enough to hold the entire uncompressed data. (The size of the uncompressed data must have been saved previously by the compressor and transmitted to the decompressor by some mechanism outside the scope of this compression library.) Upon exit, destLen is the actual size of the uncompressed buffer.
This function can be used to decompress a whole file at once if the input file is mmap'ed.

uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output buffer, or Z_DATA_ERROR if the input data was corrupted.

I think sverx is right I think there is a bug in the zlib port because without the change to the following

Code: [Select]
if ((state->wrap & 2) && hold == 0x8b1f) {  /* gzip header */
to

Code: [Select]
if (hold == 0x8b1f) {  /* gzip header */
But that line of code is in the offical source so there must be some introduced bug in the port.

EDIT: Reading more of sverx's posts about this it seems like it might be a problem with the "stream header".
« Last Edit: September 19, 2009, 05:30:02 pm by headkaze »



Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #370 on: September 19, 2009, 05:10:00 pm
HeadKaze came to release tunes into this forum, but is removed, even it was not that chase, but just trying to fix a problem with the uncompress rutine.

Tunes is still not credited using intrument names and the game is not officiel, so I want using email as media when passing thing (unless it officiel). Its ok doing with one or two tunes (piano peices example).

The Musician for the RetroBytes Portal Projects.


Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #371 on: September 19, 2009, 11:21:09 pm
New we have compressed all songs, since some songs was only 30-45 secs and might been short. I extend them to been around 1:00 -> 1:30 for most song. This is simply due the nature of the original short song. Of course the spectrum.xm is the shortest now. Its was not dedicated to do a full album for the game, but good short length tunes and looping so seamless as possible. But I know some tunes might require to been longer..... But for me most important its get all tunes done before polishing for now (I have still 7 movies left to do, and I are still not sure which themes should been used for all movies).

I also think 4MB is not required all to been used, as long the game is good as it are, even 2-3MB is more than fine and this is just meant a quality work for so much content on small file. That just mean its should work on more cards, so it doesn't have the memory problem Warkhawk did on launch.

Due the fact, I think SAM Coupé version (these extra 40 levels, minus these used in the Lost Levels) could been added as a bonus using the SAM Coupé graphics and the jump style of it (if it use different jump style) as a unlockable bonus (if we have the time also)? That version seen very exclusive port, but can been done after all levels is finished and there is time left.... A surprise bonus.

A another idea is a "show other games" and using a slideshow of "The Detective" as well "warhawk" (and the other way for TDG as well)? There is memory room for doing that.


« Last Edit: September 19, 2009, 11:26:35 pm by spacefractal »

The Musician for the RetroBytes Portal Projects.


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #372 on: September 19, 2009, 11:32:42 pm
I do think that to add all the glitz to the 30 levels that I already have is going to take a while, and I really do want it out by Christmas LOL...

So, perhaps using original graphics and normal music, there is a chance..

But.. I am a bit bogged down with it at the moment, and I have a Jaw that I REALLY want to rip out and burn... So.. Er.. Will see how we get on.

Coding for the love of it!


Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #373 on: September 19, 2009, 11:49:17 pm
the sam version seen to have nice improved graphics, so that could been a little bonus. How do the level designed technical and format? But its something second priotering and not required to look on.

Sad about jaw  :'(.

The Musician for the RetroBytes Portal Projects.


Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #374 on: September 20, 2009, 04:13:11 am
It would be the best to stick to original plan-20 LL and 10 movies as a bonus (plus horace somewhere in between) :D.
This alone is taking a while already so let's just do these as best as possible.

Btw, watched YF last night, hehe, yeah still funny~
"Alo, my name's inga would you like to have rollin in ze hay? "

 :P



Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #375 on: September 20, 2009, 12:03:24 pm
I just played Sam Coupe version of it (even I never have or heard about that machine), its a bloody nice version of Miner Manic. Its only suffer from some collision issues. I even like the aggressive music, so I think should do another similar tune (or a least just for fun)?
« Last Edit: September 20, 2009, 12:05:43 pm by spacefractal »

The Musician for the RetroBytes Portal Projects.


Offline sverx

  • RBP Member
  • IBM PC
  • *****
    • Posts: 516
  • "Ow!!! What's that ?!?!"
    • My NDS folder
Reply #376 on: September 20, 2009, 09:09:14 pm
I've read only now your posts, I wasn't online the all weekend...

Well, I do not understand what's wrong, actually, but I think that after that 'correction' (lol...) to the zlib port everything should work fine. If you can play the XM with no problems then you also should be able to compress it with gzip and uncompress it at run time using zlib uncompress() function. The size parameter you should provide to this function is NOT the expected size of the decompressed XM, but the size of the decompression buffer.
Then, when the function returns, it gives a return code (this MUST be ZERO otherwise it means the file is damaged) and it also sets the size parameter to the size of the uncompressed XM... this value is not interesting at all to us.
Finally, libXM7 XM loading function will load the tune from this decompression buffer.
That's it... you just have to make sure that your decompression buffer (which I think you'll malloc() in the very beginning and never ever free in your code) is big enough to hold the biggest XM in our set.

If you've got a chance to send me a beta so that I also can check it, probably I can help a little more :)

Now heading to bed, read you tomorrow.

Bye!




Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #377 on: September 20, 2009, 09:22:07 pm
I believe this have been fixed and the newest beta seen all works and dident have problems with out of sync tunes.

Hop going with your jaw? Even you need a break from the game, I would still doing the tunes finished, since I belive Im are little bit behind. I diddent have time to work on XM version of GB tune, but let see I can doing more tunes tomorrow.

The Musician for the RetroBytes Portal Projects.


Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #378 on: September 21, 2009, 06:35:01 am
I just realized I have misplayed 3 notes of most of the MMLL theme songs which was different from the spectrum. That mean I need to update the songs and mightbeen the youtube vdeo. I send later today with fixed songs.

The Musician for the RetroBytes Portal Projects.


Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #379 on: September 21, 2009, 08:39:44 am
If you've got a chance to send me a beta so that I also can check it, probably I can help a little more :)

There seems to be a corruption issue after decompressing a few songs and Flash's "fix" is really a hack to make the decompressor think the size of the buffer is 4 times the compressed data size. But it might be a clue as to why it's not working the first place. Anyway I will send you the demo with all the songs (SF asked us to remove the post of the code here because of his music included). Err, can you PM me your e-mail address?



Offline sverx

  • RBP Member
  • IBM PC
  • *****
    • Posts: 516
  • "Ow!!! What's that ?!?!"
    • My NDS folder
Reply #380 on: September 21, 2009, 08:50:16 am
Err, can you PM me your e-mail address?

Done. Btw I'm really curious about that corruption. Maybe there are other strange bugs in the zlib code?
I also think that "make the decompressor think the size of the buffer is 4 times the compressed data size" can just expose you to the risk of overflowing the buffer :| The size of the buffer shouldn't be related to the compressed data size at all...




Offline sverx

  • RBP Member
  • IBM PC
  • *****
    • Posts: 516
  • "Ow!!! What's that ?!?!"
    • My NDS folder
Reply #381 on: September 21, 2009, 09:00:19 am
I got the Terminator theme mixed in with MM theme [...]

That made "You could be MINER" tune :D :D :D




Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #382 on: September 21, 2009, 09:50:12 am
Okay I finally realised why the music is getting corrupted in MMLL!!! And I feel like a bit of an idiot about it actually hehe. But anyway it does explain why Flash's "fix" (which is still wrong but I will fix it in a minute) works. But next time instead of posting the documentation that explains how it works I should bloody read it properly myself.

This is the part that screwed up my code:

Code: [Select]
Upon exit, destLen is the actual size of the uncompressed buffer.
Can you guess what went wrong yet? That's right I placed the size of the buffer into a variable at the start but everytime it loaded a module it would write over it with the actual size of teh uncompressed buffer. So after a smaller sized module is loaded it starts thinking the buffer is too small and fails.

Still the curious thing is we still need sverx's fix for it decompress at all. That is in the official release of zlib so I have no idea what that is all about.

Okay just did a commit with the fix to music.s and all works perfect now :) One thing though Flash I don't know if you notice this but when you die just after the spotlight effect finishes the sprite of the main character moves right a pixel. Hmmm strange?



Offline sverx

  • RBP Member
  • IBM PC
  • *****
    • Posts: 516
  • "Ow!!! What's that ?!?!"
    • My NDS folder
Reply #383 on: September 21, 2009, 10:01:16 am
Can you guess what went wrong yet? That's right I placed the size of the buffer into a variable at the start but everytime it loaded a module it would write over it with the actual size of teh uncompressed buffer. So after a smaller sized module is loaded it starts thinking the buffer is too small and fails.

That's exactly what I was thinking mate :P Btw it's good we know now that this zlib+libXM7 system actually works fine, so we can be confident with that :)

Said that, I'd love to receive the current beta anyway :)

One last question for SpaceFractal: are you using MilkyTracker to save the final version of the XMs or not? Because that problem with SkaleTracker is still in the 1.00 version of libXM7 and won't go away before next library release...

Bye!

« Last Edit: September 21, 2009, 10:01:50 am by sverx »



Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #384 on: September 21, 2009, 10:05:20 am
Said that, I'd love to receive the current beta anyway :)

I was actually going to send you a demo showing the music problem based on your xm7 example anyway. I will leave Flash to send you the latest beta of MMLL.



Offline sverx

  • RBP Member
  • IBM PC
  • *****
    • Posts: 516
  • "Ow!!! What's that ?!?!"
    • My NDS folder
Reply #385 on: September 21, 2009, 10:08:46 am
I was actually going to send you a demo showing the music problem based on your xm7 example anyway. I will leave Flash to send you the latest beta of MMLL.

Perfect :)




Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #386 on: September 21, 2009, 10:34:56 am
One last question for SpaceFractal: are you using MilkyTracker to save the final version of the XMs or not? Because that problem with SkaleTracker is still in the 1.00 version of libXM7 and won't go away before next library release...

Yes, its saved by MilkyTracker in the end (and using the same software to convert samples to 8 bit, while I using 16 bit versions under creation)...

« Last Edit: September 21, 2009, 10:38:21 am by spacefractal »

The Musician for the RetroBytes Portal Projects.


Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #387 on: September 21, 2009, 09:20:40 pm
Im are not sure themes or songs for all movies, i have these left. I got Ghostbusters finished today.

2 - Gremlins
 I do that one as next movie song.

3 - Goonies
 Not sure yet (but have midi, but still not sure about style, or somewhere song from movie being used instead, but which?)

5 - Hellraiser
 Not sure

7 - King Kong 1933
 Note sure, mightbeen somewhere that midi file posted here? Its a old movie, so should sound like that.

9 - Young Frankenstien - perhaps the dance number (dancing Hunchback etc) (song 'SF' - 'Puting on the Ritz' with a hint of MM  )
 Its a jazzy song, found a midi. I like to see the style of the level first.

10 - Rock Horror Picture Show
 Not sure

PS. "crappy" forum software which delete post if wrong attachment extension... grrr
« Last Edit: September 21, 2009, 09:24:08 pm by spacefractal »

The Musician for the RetroBytes Portal Projects.


Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #388 on: September 21, 2009, 09:52:04 pm
King Kong tune sounds cool, the original score was just crescendo one after another but this can be used quite well.

Goonies, whatever midi you got, maybe post it so we hear. I have the original soundtrack though, besides Cyndi Lauper song, it's more or less 'moody' as expected.

Hellraiser..hehe, whatever horror you got there should do.

YF - not so sure, dance number sounds good but I've no idea how the level would look like. I was thinking of either Lab scene (well, classic) or the dance scene but I'm using a dance scene in Rocky Horror Show so Lab is more likely. Again, can't tell cause I'll let someone design the actual level first. 8)

Rocky picture-Well..got soundtrack for this one too..what can I say, if you can hear maybe on youtube or someplace, stuff like 'TimeWarp' would be the best.  :D

Btw, I'm doing the Goonies level so all that's left from movies is Back to the future and Young Frankie. Flash has finished King Kong (looks swell) and he'll do the Rocky Horror so some of you boys should split those two left.



Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #389 on: September 21, 2009, 10:21:27 pm
look like Im little behind, I think I need 2 weeks to do finish all tunes..... I hope that ok. But I known there is still room for polishing and testing.

I also really want to do a least loosy themes (or songs used in the movies) of the movies.

I gonna think and did a FL-Studio version of Hellraiser which only using background noise and no main melody. Its the only level without real music.
« Last Edit: September 22, 2009, 06:06:51 am by spacefractal »

The Musician for the RetroBytes Portal Projects.