Kids these days with their allocations and virtual memory. shakes fist
You don't need std::vector if you don't need dynamic memory allocations. Game programming and systems programming is a whole lot different than web or desktop development.
You can statically allocate at the start of a game, level, and frame.
From the original article: OpenAL appears to have a limit of 1024 sound buffers, which we bumped into. We could dynamically create and destroy the static buffer mappings without too much trouble, but that is a reasonable number for us to stay under.
It also sounds like Carmack is loading an entire level as a memory mapped file and then doing reads into specific indexes within the file.
Take a look at the source code that id has open sourced. That's the best way to get a feel how this style of development works. I believe RtCW is their last release.
ftp://ftp.idsoftware.com/idstuff/source/
http://github.com/monoid/rtcw-rebirth
Actually, I'm 38...bit of a late starter :) Thanks for the reply and link. Modeling and simulation is my area of interest (I work in civil and environmental engineering), so it will be interesting to see what patterns will work best.
You don't need std::vector if you don't need dynamic memory allocations. Game programming and systems programming is a whole lot different than web or desktop development.
For games, you create a memory budget up front. You decide how much memory sound, textures, models, AI will consume up front and then statically allocate that memory up front. http://gamesfromwithin.com/start-pre-allocating-and-stop-wor...
You can statically allocate at the start of a game, level, and frame.
From the original article: OpenAL appears to have a limit of 1024 sound buffers, which we bumped into. We could dynamically create and destroy the static buffer mappings without too much trouble, but that is a reasonable number for us to stay under.
It also sounds like Carmack is loading an entire level as a memory mapped file and then doing reads into specific indexes within the file.
Take a look at the source code that id has open sourced. That's the best way to get a feel how this style of development works. I believe RtCW is their last release. ftp://ftp.idsoftware.com/idstuff/source/ http://github.com/monoid/rtcw-rebirth