Results 1 to 5 of 5

Thread: Bit Blit? Memory problem

  1. #1

    Thread Starter
    Member Keger's Avatar
    Join Date
    Jun 2001
    Location
    Detroit (Hell)
    Posts
    57

    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

  2. #2
    Addicted Member DarkMoose's Avatar
    Join Date
    Jul 2000
    Location
    in a box
    Posts
    185
    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.

  3. #3
    Fanatic Member MoMad's Avatar
    Join Date
    Oct 2000
    Location
    Seattle, WA
    Posts
    625

    double buffer!

    Blit your map on an invisible picbox, then copy (or "flip") that picbox to the end result picbox!

    -MoMad
    :MoMad:
    Nice Sig!

    http://go.to/momad/ Status: Not Ready

  4. #4

    Thread Starter
    Member Keger's Avatar
    Join Date
    Jun 2001
    Location
    Detroit (Hell)
    Posts
    57
    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.

  5. #5

    Thread Starter
    Member Keger's Avatar
    Join Date
    Jun 2001
    Location
    Detroit (Hell)
    Posts
    57
    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
  •  



Click Here to Expand Forum to Full Width