I am currently developing an audio engine for a future video game/interactive music system from scratch and while Max/MSP feels like a great tool to prototype, I am not sure whether I have enough knowledge or its Max/MSP approach that might be limiting when scaling the engine for the proper public release. I would love to hear from someone with experience in video game sound to advice me so if you are reading this, don't hesitate to drop a quick response.
My friend is developing the graphics side with Ogre3d and it'll communicate with my sound engine via tcp/udp. In the future, when we are ready to go out of prototyping, I am planning to rewrite the sound engine using a library, such as libpd, and fully embed it within the game. At this very moment I am just trying to get my head around how I want my sound engine to act therefore Max/MSP seems like a great sandbox environment.
Through my research I got obsessed with procedural audio and started experimenting with dynamic and modular programming in Max/MSP. I sort of found a way how to use object oriented logic in my patches using OO externals which made me super excited. New features of Max such as Dict and Jitter physics introduced a new perspective on how to do some things very easily. I love them. However, I am rewriting the engine for the third time now as I am constantly learning but I am not sure if the direction I am going is good or just plain stupid.
The issues that I face right now are to do with memory management in Max. As I am using poly~ objects to do my dynamic loading/unloading of patches and Dict's to keep track of those objects, memory just keeps increasing and I can't pinpoint those leaks. I am not using sprintf's to generate symbols - I am using [tosymbol @separator ] objects to avoid filling up the memory. Well, it seems that my extreme use of linked dicts and calls to them causes those leaks, but I can't figure out what happens with dicts generated by jit.phys.world collisions: do they get deleted when world updates or do they stay in memory. I have many more questions but I suppose the best way to start talking about this is first to look at my patches. My project is hosted here:
and here's a quick demo video:
I need your voices :]