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 =) 1 1391
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jeff Williams |
last post by:
Ok, everyone loves to talk about dynamic arrays and ptr's etc, they provide
endless conversation :) so here goes:
Will this leak memory (my intuition says yes):
void foo(vector<int*>& vec)
{...
|
by: csx |
last post by:
Hi everyone!
two quick questions relating to arrays.
Q1,
Is it possible to re-assign array elements?
int array = {{2,4}, {4,5}};
array = {2,3}
|
by: Bhalchandra Thatte |
last post by:
I am allocating a block of memory using malloc.
I want to use it to store a "header" structure
followed by structs in my application. How to calculate
the alignment without making any assumption...
|
by: Chang Byun |
last post by:
I have question about memory allocation.
I have a trouble when I run a C program.
My C program has several big double pointer(** var) variables to
structure data like 4 by 5000000.
It is...
|
by: Niels Jensen |
last post by:
In an effort to try curbing the amount of memory my application is using I
would like to ask a simple question...
I have multiple forms with multiple subs in them. does a Dim statement
clear...
|
by: kathy |
last post by:
If I have 2D array like:
int **p;
p = new int*;
for(int i=0;i<10;i++)
{
p = new int;
}
|
by: JoeC |
last post by:
I am writing a game and I am having a challenge with my combat
function. All I want to do is find out how to group pieces that are in
the same space. There are two sides and all the units that...
|
by: heddy |
last post by:
I have an array of objects. When I use Array.Resize<T>(ref Object,int
Newsize); and the newsize is smaller then what the array was
previously, are the resources allocated to the objects that are...
|
by: jason |
last post by:
Hello,
I have a question about what kind of datastructure to use. I'm reading
collumn based data in the form of:
10\t12\t9\t11\n
24\t11\t4\t10\n
.....
I now have a structure which allows me...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |