Choplifter (de)remake

About Monkey 2 Forums Monkey 2 Projects Choplifter (de)remake

This topic contains 20 replies, has 6 voices, and was last updated by  wiebow 2 years, 9 months ago.

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #3615

    wiebow
    Participant

    So, this is almost done!  Porting it to Monkey2 has been interesting, but overall, not a big problem! The game is completely ported and performing great!

    I have one problem though, and it’s with audio, on Linux. Sometimes, after a while, sound stops working.   Is there anyone out there with some experience with this?

    Should I reserve channels? Is there a limit to the amount of channels I can use before something craps out?

    What is interesting is that the heli reserves a channel (for the motor pop pop sound) and when all other sound stops, this sound does keep working.  Until I die and I create a new heli (and reserve a new channel) and then this channel also does not work.

    I have not yet tested this build on Windows (will do that tomorrow) but this issue is also something that nagged me when using Max on Linux.

    Any help is appreciated!!!!

    #3619

    Mark Sibly
    Keymaster

    > I have one problem though, and it’s with audio, on Linux.

    Have to see the code before I could even make a guess! Hint, hint…

    #3624

    wiebow
    Participant

    Hint understood… Here you go 🙂

    https://dl.dropboxusercontent.com/u/12644619/choplifter.zip

    You’ll need the latest repository version of my framework, I added some stuff to it lately.

    It’s a straight port from Max code, so you’ll probably see a lot of stuff that can be done better or more efficiently. I’m open for suggestions (from anyone really who also grabs this zip) 🙂

    #3626

    wiebow
    Participant

    Testing this on Windows 7 now, and I have the same issue… Sound stops working while playing.

    I hope you can replicate this, Mark 🙂

    #3636

    Jesse
    Participant

    I tried it and it works good. I didn’t have any problems on my Macbook. I was never a big fan of Chop Lifter but from what I tried it seems pretty good. No issues with sound. Tried it About 30 minutes.

    #3637

    Mark Sibly
    Keymaster

    You’ll need the latest repository version of my framework, I added some stuff to it lately.

    Can you do a module manager update for this, or is not ready yet?

    #3640

    wiebow
    Participant

    @jesse: Thanks for giving it a go!

    @Mark I uploaded the new version to the module manager!

    #3652

    Mark Sibly
    Keymaster

    OK, the main problem with the audio is that you’re not discarding channels, and it looks like openalsoft has a hard max channels limit (although not macos openal?).

    Basically, if you New() a channel, you’re also expected to Discard() it.

    The Sound.Play method does this automatically (ie: once the sound finishes playing, the channel is auto-discarded) but this doesn’t easily let you setup rate, pan etc before the sound plays.

    One option would be to add a bunch of params to Sound.Play, but this seems messy and not very future proof so a better way may be to add something like ChannelFlags that let you specify ‘AutoDiscard’ or something. Will have a look…

    Thanks for uploading the  new module too – got to make sure it works with the next ‘release’!

    #3666

    Matthew Smith
    Participant

    Very nice!! Plays very well!

    #3682

    wiebow
    Participant

    He Mark,

    Thanks for that explanation, it makes a lot of sense and it explains why sound stopped earlier once I got to the later levels 🙂

    I’ve hacked this together in my PlaySound() function and it works fine. It’s not pretty but it fixes the immediate need:

    I wasn’t in the mood to write a manager that will reserve channels and monitors them if they can be discarded yes or no, and I’ll wait for your channel parameters.

    Suggestion: make every channel auto discard by default… Makes a lot of sense to me, but possibly only after you’ve made altering the parameters possible 🙂

     

    @Matthew: Nice! Thanks man, glad you like it.

     

    Oh! I need to add the gamepad control checks!

    #3727

    cocon
    Participant

    Wow! You provided us the whole game, lots of thanks.

    #3748

    wiebow
    Participant

    @cocon: guess I did! 🙂

    It’s not 100% done yet. I need to add some joypad control checks and then I need builds for Windows, Linux and OSX. Anyone here who can build on OSX for me?

    #3751

    Jesse
    Participant
    #3778

    wiebow
    Participant

    Hi Jesse, that’s very nice of you! I will update the source though to include some final refinements. Are you will to do it again?  I will send the new source to you.

    And did you play it?  Did you use gamepads or controllers? or the keyboard?

    #3779

    Jesse
    Participant

    > Are you will to do it again?
    yes, when ever you want.

    I played it without controls. Didn’t bother to pull my controller from the box where I have all of my computer stuff so I used the keyboard.

Viewing 15 posts - 1 through 15 (of 21 total)

You must be logged in to reply to this topic.