×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Is there any way to increase string space?

Is there any way to increase string space?

Is there any way to increase string space?

(OP)
Hey everyone.  The program I'm writing uses string space like crazy.  It's a tile based RPG and the fastest way that I've found to draw the tiles is to put all the tiles of one area into a string array and then DRAW them.  Each string for each tile can be 2000 - 5000 bytes in length and when there's 20 or so of these for each map area, it chews up string space pretty quick.
I'd like to add more tiles to each area, mainly for variety, but I'm out of string space.  Is there any way to increase how much space I can use?


I've also tried having the program access each tile file individually and load it from the file the moment it draws it.  It works just the same (and doesn't take any memory) but the time it takes to load from a file slows down the program and makes screen scrolling sluggish.  I've also just tried putting each tile into a GET and PUT type array, in which they would take up much less space than how I have them now, (each tile is a 20x20 pixel), but the problem is it's a smooth scrolling map, so as a tile moves off screen, eventually there will be an error when the program tries to PUT only half of a tile.

(If anyone knows how to PUT graphics out of the view screen area, that would be great too.)

Thanks!

RE: Is there any way to increase string space?

I thought VBDOS had a way to increase String memory, but I seem to be "out of memory" myself regarding the old DOS Basics.

RE: Is there any way to increase string space?

It appears as if the only real option is to ensure your string arrays exist in the far heap. This article, though addressing the near heap, has a pointer or two concerning the far heap.

http://support.microsoft.com/kb/101880

RE: Is there any way to increase string space?

(OP)
Thanks for the info.  It looks as if I'll have to go about it a different way and rethink my methods.  I'm putting all my tile information saved into DRAW commands and the long strings of information for each tile are stored into strings, which is chewing up the space pretty fast.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close