Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 28 May 2012
Offline Last Active Mar 05 2015 08:15 AM

Posts I've Made

In Topic: Opinions on a tool im making

10 August 2013 - 11:17 AM

I think i want to write the tool myself, it turned out to be quite fun and its only for my personal usage.


I feel you, I do the same thing from time to time.


Do you use CMake? 
If so, have you configured it to suit your projects so you dont have to keep coming back to changing any of its settings,
or do you find that from time to time that there are some settings that you would like to change?


I do, extensively. I sometimes have to change things, for instance to account for new dependencies or changes to the way they need to be linked as new versions are released. And really, in practice, your directory structure is probably not as fixed as you'd like it to be. Also, new platforms are not as straightforward as they should be, and generally require at least a little bit of custom code. I can deploy new clean projects using my game engine to Windows, Linux, iOS (simulator AND hardware), and OSX with my current build scripts, but getting to that point was not at all trivial...although that is the intention of CMake. I gather that adding support for Android will be another big hassle.


Im wondering if this is something that i should consider or, if id just have the tool generate the default files with my settings and if the user 
wants to do any tweaks he can do it after the files have been generated.


Your approach could work, but you might as well just let them parameterize your tool in the first place with their desired settings. I use the same script to generate slightly different builds for the iOS simulator and iOS hardware:


Of course, I can put these in different build trees, and I can rerun cmake to update those trees as project settings change, which certainly happens. It's not so hard to add basic command line arguments. I don't know enough about your exact use case to comment further. I've found CMake to be tremendously obtuse, so I have a hard time recommending it, it's just that at some point you might realize that your tool is just reinventing the wheel and have to concede defeat anyway (I'm not saying that that's the case here, yet :P)

In Topic: Opinions on a tool im making

10 August 2013 - 07:08 AM

Sounds like something that can be easily accomplished with any build system. CMake comes to mind. It sucks, but perhaps less than the alternatives. Anyway, you would just write a CMakeLists.txt that will create your given directory structure as necessary and create properly configured project files with your pre and post-build hooks, compilation arguments, dependencies, library/include paths, a stub codebase, and whatever else you want. 


Keep this CMakeLists somewhere handy, copy it to your new project root, and then just run something like: 


whenever you want to generate a new project. This all depends on how you write your CMake script...it can be quite powerful if you so choose. Doing it with CMake would also grant you some key features like automatic dependency resolution, minimal rebuilds/reconfiguration, and some degree of reproducability and platform independence. If you write a script on your own, it probably won't be general enough to work anywhere but your exact environment...cross-platform or otherwise.

In Topic: Programming Music

10 August 2013 - 06:33 AM

The bulk of the crowd sounds to me like streaming the sound of the entire crowd while opening/closing a low-pass filter over the sound depending on the "excitement" level. There might also be some random little one-shot cheers for "color," and probably gain modulation running in tandem with the filter.


As far as the dynamic music goes, this wouldn't be too hard to do on your own, but you'd have to make a sequencer that can synchronize clips to some clock at a given tempo. Take a look at Ableton Live's session view. It allows you to arbitrarily cue clips synchronized to a global clock. This keeps everything running in time, all you've got to do is make clips that work together.


This little demo is OK:




He's swapping out entire songs/sections of differing granularity in real time, but if you try it yourself you'll better understand what's going on. I'm not saying to use Ableton, just copy the way that it works.

In Topic: How to store the objects in my world

02 November 2012 - 02:24 PM

If you're using C++, and not using the STL, you're doing something wrong. Yes yes, there are exceptions to this rule, but if you're in a position to ask a question like this, you are not the

Anyway, as zacaj said, use an std::vector. Or, perhaps an std::map if you want more convenient and potentially faster lookup.

In Topic: Questions About Managing Embedded Scripts in C++

30 October 2012 - 06:53 PM

I know one solution is to load the code as a string of characters from some outside file and pass that to the function. Or, if I just have the wrong attitude about this, what might be some wise options for loading up the script from some outside source?

It's not quite that complicated. What you want is luaL_dofile. No need to manage the file streams yourself.