×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    11

    Large data blocks

    Hello,

    I am working on a game for the 7210. What I was doing was building an object that held data for a mission in an array. I declared and defined it as follows:

    private byte _mission_data[][][] =
    {
    the data
    };

    This happens to be a few K worth of data. The first problem I ran into was that this forced the class to span the 32K block code limit. So I moved this out into a separate file. The only problem is that the program now seems to crash when trying to access the data. Is there a problem when accessing large chunks of data? I suppose I could have blown the heap. Since I am using two back buffers in addition to my graphics.

    Any ideas?

    Thanks.

    Ben

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    UK
    Posts
    229

    RE: Large data blocks

    If you have large static arrays (of ints especially) then you're much better off moving the data into a resource file and reading it in at runtime. This will saves lots of class file space.

    There shouldn't be a problem with large arrays, certainly not a few k worth. I've got some pretty large ones in some games.

    You just have to double check the loading routines to make sure they are loading data correctly.

    Hope this helps,

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×