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, 7 months ago.
- 
		AuthorPosts
 - 
		
			
				
September 2, 2016 at 6:31 pm #3615
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!!!!
Attachments:
September 2, 2016 at 10:46 pm #3619> 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…
September 3, 2016 at 7:35 am #3624Hint 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)
September 3, 2016 at 9:16 am #3626Testing this on Windows 7 now, and I have the same issue… Sound stops working while playing.
I hope you can replicate this, Mark
September 3, 2016 at 8:11 pm #3636I 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.
September 3, 2016 at 9:05 pm #3637You’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?
September 4, 2016 at 8:22 am #3640September 4, 2016 at 8:19 pm #3652OK, 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’!
September 5, 2016 at 7:23 am #3666Very nice!! Plays very well!
September 5, 2016 at 6:08 pm #3682He 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:
Monkey1234567891011If channel = Nullchannel = sound.Play()channel.Volume = volumechannel.Rate = ratechannel.Pan = panElsechannel.Volume = volumechannel.Rate = ratechannel.Pan = panchannel.Play(sound)EndifI 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!
September 7, 2016 at 5:21 am #3727Wow! You provided us the whole game, lots of thanks.
September 7, 2016 at 4:49 pm #3748@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?
September 7, 2016 at 7:24 pm #3751here is a link to the Mac binaries:
https://www.dropbox.com/s/7cdbqrmls0euhuj/Monkey%202%20Game.app.zip?dl=0September 8, 2016 at 3:07 pm #3778Hi 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?
September 8, 2016 at 4:22 pm #3779> 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.
 - 
		AuthorPosts
 
You must be logged in to reply to this topic.
