User Tag List

Results 1 to 5 of 5

Thread: [2.51+] Fix Bitmaps Persisting?

  1. #1
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.72%

    [2.51+] Fix Bitmaps Persisting?

    This is a 'should be do it' type of question, and debatable.

    At present, when you exit a quest (but not ZC), any bitmaps in memory are not cleared. This means that the next quest to load can potentially draw these bitmaps, and unintentionally.

    Say that quest A had written to b itmap 1, and quest B tries to write to bitmap1, and draw it tot he screen. Whatever datum was written to it by quest A, persists, and will be written by quest B. That is, unless the quest author knows to clear them first with Init and OnContinue.

    As far as I know, no quest has used this as a 'feature', and I have warned several scritpers against [I]ever[I] doing this, and I believe we should do something about it.

    Clearly, the simplest solution is to wipe all bitmaps on quest load. IDK how this will affect user-generated bitmaps either. I think those will be destroyed on quest exist, but only @Gleeok can answer that, as he wrote those.

    Another solution, is to allow the user to statically save user bitmaps with the quest file. This would be ideal, but I do not know if it is practical. Then, system bitmaps (stock 2.50 bitmap pointers) can be wiped, but the user can stills ave some bitmaps perpetually. This would speed up complex draws that occur regularly, so that they need on be set up one time. They could even be set up in such a way that they are embedded in the quest, but likely they will need to be in the .sav file.

    The third option, is to do nothing, which may well result in bizarre quest bugs in the future. I feel this is a bad idea.

    Whichever we choose, we need to determine of the behaviour that we change carries backward--this meaning, if it only affects quests on 2.51+, or if it also affects 2.50 quests. There is a very small chance of a backward-compatibility concern with wiping bitmaps, and again, I know of no quest that uses this bug/oversight for any kind of speed advantage, Obviously, whatever we do, we need only clear stuff when the quest fully exits, not merely on retry/continue. Clearing on those, IMO, would be a bad idea, as there is no reason that the quest author shouldn't prefabricate bitmaps to use on retry/continue.

    What are all of your thoughts on this matter?

  2. #2
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,817
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,940
    Level
    33
    vBActivity - Bars
    Lv. Percent
    24.2%
    I'm pretty sure I already fixed it, along with some other stuff. I just haven't committed anything yet, or maybe I did and it got deleted, idk, I can't remember yesterday right now.

    I definitely won't save them to the quest file though; I know we already had this discussion.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  3. #3
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,025
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.17%
    Data leaking from one quest to the next is obviously a bug. The bitmaps should be wiped (sounds like gleeok did this already).

  4. #4
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,817
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,940
    Level
    33
    vBActivity - Bars
    Lv. Percent
    24.2%
    I was putting stuff off until after the holidays, but now I've been sick all week.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  5. #5
    Ara? Mitsukara's Avatar
    Join Date
    Jul 2000
    Location
    -15 penalty to all intuit direction checks
    Age
    35
    Posts
    3,920
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,620
    Level
    19
    vBActivity - Bars
    Lv. Percent
    25.4%
    One thing this made me think of that could be kinda cool, would be if you could deliberately save a small external file in a quest via scripts (Like saving a .txt file mid-play from ZC, basically) and then load such files in another quest- maybe even have the external file contain a readable variable array that either quest can read/write from. That would be a really cool way to set up things like Oracles-esque linked games, or weird instructions for sequels or connected reactive storylines that track how you did things, etc.

    I realize that's a little off-topic from the subject of clearing bitmaps, but, it might be neat to have a deliberate way to carry data from one quest to another, and this is what made me think of it.

    The Legend of Zelda: The Inverse Mirror supporter

    Behold, ye Banner of Gannons! Behold the power of regional changes and despair!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social