|
-
Oct 12th, 2002, 09:15 AM
#1
Thread Starter
Junior Member
Graphics Memory Problem
i wander if anyone can help, i am making a map editor for a RTS game, at the moment i am loading each of the 2000 differnt tiles (32x32 pixels per tile) into an array and name each tile according to the tile value in the map file, this way as the map file is processed all the editor has to do it load the same name as what is highlighted in the map file, i did it this way to save it checking other values and it works out much faster. I have had this editor workin 100% in win NT win 2k and win XP but on win 9x and win ME it wont even load half of the 2000 images into the array before it has a memory problem i know nt based operating systems and 9x based systems handle memry differntly but i was wandering if there is a differnt method i could use to load them into the array that will solve my 9x memory problem
-
Oct 12th, 2002, 09:44 AM
#2
Addicted Member
You have 2000 different tiles?!?! Is there anyway you can group them by type (terrain, structures, natural objects, etc) and only load them when necessary?
-
Oct 12th, 2002, 10:09 AM
#3
Thread Starter
Junior Member
the problem comes when loading the map, if they are already in memory then it loads the map very quick, but with so many variations it will take an age to load all necisary tiles
-
Oct 12th, 2002, 10:11 AM
#4
Good Ol' Platypus
Restrict your maps to, say, 100 different tiles. Then, each map can have its own 'tile set'. Then, upon loading a new map, change the tileset and load the tiles.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Oct 12th, 2002, 11:11 AM
#5
Thread Starter
Junior Member
it isnt a game i made, its for a game that has already been released by an actual company
-
Oct 12th, 2002, 11:16 AM
#6
Good Ol' Platypus
Well, how much space do the tiles take up on the HD then? Are they compressed?
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Oct 13th, 2002, 05:46 AM
#7
Thread Starter
Junior Member
they are only a couple of meg, but when loaded in 32x32 sections it runs outta mem
-
Oct 13th, 2002, 08:19 PM
#8
Frenzied Member
Don't load the tiles all at once; sacrifice a bit of speed and load each tile into memory when it is used, and then destroy it if it is no longer being used.
-
Oct 14th, 2002, 01:02 AM
#9
Thread Starter
Junior Member
some maps use nearly all 2000 tiles, is there a fster way to load than loadpicture? ill b there for hours otherwise
-
Oct 14th, 2002, 01:03 AM
#10
Frenzied Member
If the tile pictures aren't changing, you can load them into a DLL using the resource editor, and then have a simple function in the DLL that returns a picture based on an ID; it would take some work but not too bad if you write a script to build the .RES file for you.
-
Oct 14th, 2002, 10:57 AM
#11
Thread Starter
Junior Member
hmm res files might work, can u bitblt image data from, resource files?
-
Oct 14th, 2002, 12:12 PM
#12
Addicted Member
Originally posted by martynd
they are only a couple of meg, but when loaded in 32x32 sections it runs outta mem
How can that be?
-
Oct 14th, 2002, 12:18 PM
#13
Frenzied Member
Originally posted by martynd
hmm res files might work, can u bitblt image data from, resource files?
No; but you can use LoadResPicture to return a StdPicture just like the LoadPicture function does.
-
Oct 14th, 2002, 01:31 PM
#14
Thread Starter
Junior Member
cheers, loading it then using bitblt mite make it a little slower but having it working in the 1st plaec is my main goal
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|