Hey Panda gurus, I am working on a minecraft like project and I wanted to test out a performance tuning idea! I use MySQL at work all day every day and love how fast it is. I can execute a query affecting millions of rows in a matter of minutes, and a query against a handful of rows in a fraction of a second.
However, for a game that will be running on someones computer, I don’t really want to use MySQL as it would require me to package it up and install it as part of the install process, import default schema and everything else. I don’t want to do that to an end user’s computer.
I started looking to see what Panda offered natively. I created a test object that was a perlin noise function at a size of 500x500x50 and used pickle to write the dictionary I stored that into a file. The perlin noise function is used to generate terrain and store a value for every x,y,z value in the game world. When I used pickle to write this to a file, the resulting pkl file was nearly 400mb!
That’s not going to work! But, I didn’t really want to do that anyway. I would like to find a small database like python extension that I can use to quickly look up a value when I pass in an x,y,z value to look up because I don’t want to store this in memory. But if someone plays just 3 generated levels they’re already up to over a gig of space used!
Does anyone have any suggestions for something that will do the following?
- Keyed indexing
- Once the python is converted to an executable, the functionality needs to still work without external dependencies (e.g. MySQL)
- Small output file size
- Extremely fast lookup speed
Any good/bad/creative suggestions?
Thanks!
ZM