By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,433 Members | 1,643 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,433 IT Pros & Developers. It's quick & easy.

Question about massive arrays and memory

P: n/a
Hello. Im working on a game, (mud actually) (socketmud for anyone who
cares ;) and ive decided on a very large array to hold my world data.
(Nethack style, every cord == number == represents a charater/sector).
Im using gzread/gzsave to store/load the array from file, which is
nice, im using about 230k disk space when the world is filled. However,
in memory its roughly 35megs ([1000][750][11]). Ive googled around, and
asked people, and theres no answer thsus far. My question is, is there
some sort of way, to easily compress, or reduce my memory requirements
for this?
Im planning on adding another 8 maps of this size to the world, and
8x35megs is not good. Appreciate any help =)

Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

Cyhawk wrote:
Hello. Im working on a game, (mud actually) (socketmud for anyone who
cares ;) and ive decided on a very large array to hold my world data.
(Nethack style, every cord == number == represents a charater/sector).
Im using gzread/gzsave to store/load the array from file, which is
nice, im using about 230k disk space when the world is filled. However,
in memory its roughly 35megs ([1000][750][11]). Ive googled around, and
asked people, and theres no answer thsus far. My question is, is there
some sort of way, to easily compress, or reduce my memory requirements
for this?
Im planning on adding another 8 maps of this size to the world, and
8x35megs is not good. Appreciate any help =)

This is OT for c.l.c. Try comp.programming.

OT: You'll probably want some sort of tree or sparse array structure.

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.