|
-
Jan 7th, 2002, 10:32 PM
#1
Thread Starter
Member
Bit Blit? Memory problem
What I have
Tile based game
64 pixel tiles, RGB color
maps that are changeable and variable in size
Problem:
Maps over 80 x 80 will not appear on the screen
Chemist not programmer
Slow brain
Thoughts:
I think its a memory thing but I am not sure.
Is keeping that big DC in memory really really bad?
I dont ever display the whole DC just what you see.
Also, if I change the picture in the DC does it create a memory
hole or pointer problem. I mean without deleting it.....
Thanks
-
Jan 7th, 2002, 10:44 PM
#2
Addicted Member
in the early stages of my rpg engine i did the same thing as you, and realized the same thing~! so all you need to do to work around that problem is ONLY draw onto your backbuffer what you need to see on the screen at the moment! it takes a bit more thinking, but it wont take too much effort to adjust your code.
To understand recursion, one must first understand the concept of recursion.
-
Jan 7th, 2002, 11:09 PM
#3
Fanatic Member
double buffer!
Blit your map on an invisible picbox, then copy (or "flip") that picbox to the end result picbox!
-MoMad
-
Jan 8th, 2002, 10:48 AM
#4
Thread Starter
Member
OK
those will work but what is the problem?
Why will the map not display...
Am I loosing memory?
More Explenation:
When I create the maps I blit the hexes one at a time in rows and cols. with every other column offset (hexes). I do this all in my backbuffer.
I then display only what is required from the backbuffer to the
display. Like I said it works for maps of up to 80 * 80 hexes but
not for larger ones.
-
Jan 8th, 2002, 10:56 PM
#5
Thread Starter
Member
Well
I am scrolling the map with a picture box behind the form, all of
the map data like player positions and hex type is stored a
data array. When the player moves from hex to hex it just
checks the array to find out whats there. The players are sepetate.... Thought this was efficiet.... guess I will have to
change it.
Scrolling offset hexes will be a pain in the but 
Time to program....
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
|