User Tag List

Page 3 of 3 FirstFirst 1 2 3
Results 21 to 22 of 22

Thread: Am I doing something wrong, or is this a bug?

  1. #21
    Octorok
    Join Date
    Jan 2007
    Age
    38
    Posts
    143
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,173
    Level
    11
    vBActivity - Bars
    Lv. Percent
    73.86%

    Re: Am I doing something wrong, or is this a bug?

    I couldn't help but notice this:

    Code:
    for(int i=0; i<=Game->Counter[5]; i++)
    Code:
    if(Screen->ComboI[ComboAt(X, Y-(i*16))] == 6)
    Because your loop starts at 0, your first pass will always look at the combo at X, Y for all four directions.

    More interesting:

    Code:
    if(Screen->ComboS[ComboAt(X, Y+((i*16)-16))] == 0 && !Stop2)
    Evaluating the math here...

    i Y
    0 Y + ((0) - 16) = Y - 16
    1 Y + ((16) - 16) = Y
    2 Y + ((32) - 16) = Y + 16
    3 Y + ((48) - 16) = Y + 32
    etc...

    I understand you're testing for solid combos, but the math of these if statements have me a little confused which combo you're trying to check.

    Perhaps your bug is testing the wrong combos due to bad ComboAt math?
    Programmings my game because I program games.
    "Wait. You lost me at the part about the 'almost certain death'." - A quote I would love to make in an MMORPG.
    Disclaimer: Din's Fire does not make the user immune to the effects of lava. Do not use Din's Fire in mid-jump over a pool of lava. Death and severe burns will follow.

    ZCG Current Version:
    Version 0.05
    For Mac Build 1076 Windows Build 1082

  2. #22
    Ultimate Prankster Lucario QDB Manager
    Just registered
    Nimono's Avatar
    Join Date
    Nov 2005
    Location
    Static Void Kingdom
    Age
    32
    Posts
    1,963
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    6,276
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.86%

    Re: Am I doing something wrong, or is this a bug?

    Quote Originally Posted by HeroOfFire View Post
    Perhaps your bug is testing the wrong combos due to bad ComboAt math?
    Perhaps. I don't think you read the whole thing, though.

    I'm not checking one direction per loop. If you had read on, you would've seen that I CHECK ALL FOUR DIRECTIONS, using the same variable. Also, I KNOW it starts at 0. It's SUPPOSED to! It increases according to the value of the Key counter, which I'm using for the explosive range. (That's how far the explosion reaches in 16x16 blocks. Anything in the range is hurt or killed. Or, in the case of soft blocks, destroyed.) I have it multiplied by 16 because 16 pixels is one combo. i=2 gives 32 pixels, so... It works. As for the combo I'm checking? The combo right before the one you're checking now. If it's solid and can be destroyed, stop checking for that direction. That way, the explosions can't reach behind the solid blocks. (They will if you get a Penetrating Bomb item, though- but I'll add that in once the actual destruction of the blocks is finished.)

    But now that I think about it, you might be on to something about that i=0 thing. Perhaps it really IS messing things up... I'll check.

    Edit: Yes, I figured it out! It was the + I was doing for left and up. That explains why I couldn't explode in those directions most of the time. Changing i=0 to i=1 also made it so no matter what, I'd be able to explode any wall if it could be blown up, if it's within range. Okay, I'm done with that part now. Time to add in the part to destroy enemies.

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