Any time you put data somewhere, organize it and give it an interface for efficient retrieval you have a database. Game state, generic data structures and practically an organization of data in software can be thought of the same way, so this is not exactly any sort of revelation.
Thinking of games as databases
41–50 of 70 posts
Re: Thinking of games as databases
#42This kind of approach maybe good for very big companies, but it absolutely kills small companies and indie devs. Indie Devs should be thinking of games as products to complete first and foremost. Don't get bogged down in articles like this, or what's the best tech. Just ship it.
Re: Thinking of games as databases
#43They're more like spreadsheets than databases.
This brings back the memory of how we used Microsoft Excel to generate the .csv files to drive the game engine in Diablo 2 and stored the .xls files in version control, by the time we started work of production on the expansion we only needed about 3 of the 10 programmers (at our studio) to support the work because most of changes could be done by adding lines to the spreadsheets. This might sound rote today but the…
I’ve set up the tech for many games over the decades where we had designers write tiny snippets of code in the cells of Excel spreadsheets. First in a custom assembly-like language (for an N64 game) then in SmallC, actual C++ and mostly in Lua.
The general theme was to use the grids to define state machines. Rows are states. Columns represent events. Cells define what to do at the intersection of an event in a certain state.
Later games also used Lua code cells as active spreadsheets in the game. The Lua statements would calculate results when queried. The charts didn’t just know about raw numbers and strings. They also could load and manipulate assets in the game. So, a designer could describe which UI asset to put next to the health bar based on the player’s current health stat without bothering a programmer or artist.
In the last case, we shipped two very different 3D mobile games using the same executable but different assets. Live hot-reloading of the Lua charts, the UI XML and all the other assets meant that we didn’t even need to bother making an editor for our custom engine. A good text editor window next to the game window was productive enough.
Re: Thinking of games as databases
#44Earlier quoted context omitted.
Diablo 2 was a lot of fun. It's cool to hear about how it was made. :)
Here's more useless trivia, my brain is cluttered with superfluous memories, I can't remember every algorithm but I remember the minutiae. I remember our producer Matt Householder telling me the bad experiences they had outsourcing the development of Diablo 1 expansion and ports meant they really wanted to make the Diablo 2 expansion in house. So at one point early in production on Diablo 2, our lead programmer, Rick…
Re: Thinking of games as databases
#45Seriously.
Compile a bunch of prepared statements at load time to take the parsing and execution planning out of it, keep it all in memory... On the surface it seems like it would work.
And of course, saving the entire game state would be as simple as just flushing the DB to disk.
Re: Thinking of games as databases
#46This kind of approach maybe good for very big companies, but it absolutely kills small companies and indie devs. Indie Devs should be thinking of games as products to complete first and foremost. Don't get bogged down in articles like this, or what's the best tech. Just ship it.
> Indie Devs should... Just ship it. "Make games that are fun to make." Sometimes that means "thinking of games as databases." 100s of games released every day across Steam and the App Store. Who cares? I guess they shipped, but then what? > Don't get bogged down in articles like this, or what's the best tech. Jonathan Blow is excited about Jai. That makes him wake up every day and commit. Secularly Jai will not make…
Yes, it's a good one. Since he started working on Jai he hardly shipped any game. Thanks for providing examples that supports the parent comment.
Re: Thinking of games as databases
#47The backend of Skyrim (and other Bethesda games) is largely a database. Bethesda calls them .esp files, but they're relational in a way. There has been a large open undertaking to produce tooling for this, such as xedit (Pascal) and z-edit (JS). When you open a container in the game, and it doesn't have a specified set of contents, the contents get loaded by picking randomly from a category linked to in the database.…
This is fascinating. Where can I read more about this architecture?
However it is not 100% documented what kind of optimization this "query engine" has implemented, there are some vibes that sometimes it could be faster than a full scan.
A serialized data format is here if you are interested https://en.uesp.net/wiki/Skyrim_Mod:Mod_File_Format
Re: Thinking of games as databases
#48Earlier quoted context omitted.
This brings back the memory of how we used Microsoft Excel to generate the .csv files to drive the game engine in Diablo 2 and stored the .xls files in version control, by the time we started work of production on the expansion we only needed about 3 of the 10 programmers (at our studio) to support the work because most of changes could be done by adding lines to the spreadsheets. This might sound rote today but the…
Game designers really like Excel —for good reason. I’ve set up the tech for many games over the decades where we had designers write tiny snippets of code in the cells of Excel spreadsheets. First in a custom assembly-like language (for an N64 game) then in SmallC, actual C++ and mostly in Lua. The general theme was to use the grids to define state machines. Rows are states. Columns represent events. Cells define wha…
Re: Thinking of games as databases
#49Re: Thinking of games as databases
#50This is the essence of MVC/MVP architecture!
When I first tried to learn ECS (recently!), I couldn't wrap my mind around how arcane it seemed to be. What "components" should there be? What properties should each Component track? How do I organize it? What if I move things around? I have to write handlers that load and unload the damn things, and a System that somehow knows where to find certain properties on the various Components enough to operate on them? Exa…