User Tag List

Results 1 to 5 of 5

Thread: NPCs out of bounds

  1. #1
    Gel Just registered
    Join Date
    Jan 2018
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    104
    Level
    3
    vBActivity - Bars
    Lv. Percent
    59.75%

    NPCs out of bounds

    Would you consider, please, writing in an option to allow NPCs to go out of the boundaries of the screen further without disappearing?

    I know they normally don't do at all in the fixed-screen LoZ style games people make with ZC but it is the only drawback so far to my sideview platforming game that the enemies de-spawn when the player moves them off the currently drawn area.

    A whole screen or even half a screens worth of pixels away out of the screen bounds would be most excellent.
    I could, I suppose, do this myself by storing all of their parameters and position and then re-spawn them when the player goes back to where they were but having them not be erased in the first place would be much more optimal.
    Last edited by Downloader; 12-25-2018 at 12:59 AM.

  2. #2
    The Timelord
    QDB Manager
    ZC Developer
    ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,294
    Mentioned
    107 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,319
    Level
    20
    vBActivity - Bars
    Lv. Percent
    79.23%
    You can move HitXOffset and DrawXOffset, coupled with HitYOffset and DrawYOffset--instead of raw X, and Y--to do this, by script.

    Now that we have npc scripts, I would prefer not to make the guys.cpp stuff any more absurd.

  3. #3
    Gel Just registered
    Join Date
    Jan 2018
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    104
    Level
    3
    vBActivity - Bars
    Lv. Percent
    59.75%
    Quote Originally Posted by ZoriaRPG View Post
    You can move HitXOffset and DrawXOffset, coupled with HitYOffset and DrawYOffset--instead of raw X, and Y--to do this, by script.

    Now that we have npc scripts, I would prefer not to make the guys.cpp stuff any more absurd.
    Yes, I could keep the actual NPC on screen and just draw and hit offset, but then I would have to do weird things to the NPC behavior functions I wrote when it comes to them bumping into walls and things like that..
    It is not that drawing offscreen or otherwise having their hitboxes offscreen is the issue, it is the fact that ZC erases the NPC when it goes offscreen, and I would have to write up a method to save their current stats and then put them back onto the screen after they are erased.
    Last edited by Downloader; 12-25-2018 at 03:08 PM.

  4. #4
    The Timelord
    QDB Manager
    ZC Developer
    ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,294
    Mentioned
    107 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,319
    Level
    20
    vBActivity - Bars
    Lv. Percent
    79.23%
    Quote Originally Posted by Downloader View Post
    Yes, I could keep the actual NPC on screen and just draw and hit offset, but then I would have to do weird things to the NPC behavior functions I wrote when it comes to them bumping into walls and things like that..
    It is not that drawing offscreen or otherwise having their hitboxes offscreen is the issue, it is the fact that ZC erases the NPC when it goes offscreen, and I would have to write up a method to save their current stats and then put them back onto the screen after they are erased.
    Perhaps in the future, but for now, the addition of all of the new script types, and other npc stuff is taking its toll on th e shreds of my sanity.

    When \the new script stuff is finalised, then, I may look into this.

  5. #5
    Gel Just registered
    Join Date
    Jan 2018
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    104
    Level
    3
    vBActivity - Bars
    Lv. Percent
    59.75%
    https://youtu.be/XdOC1VVwKro

    Here is a short example video of what I'm talking about. The "Sniper Joe" NPC just barely goes off screen when jumping off the ledge and disappears. Just drawing an offset or hitbox adjustment would not solve this problem. I would need to save Joe's current HP and everything else and then respawn another clone NPC in it's place to remedy this situation. If the NPC would just not get erased until a half screen or full screen away it would remedy this problem.

    https://youtu.be/RptpEH6LUIE
    Here is another example video of putting the NPC back onto the screen after it gets erased.
    guys.cpp is messed up... Through a series of debugging I learned that when the enemy despawns from going off screen it's X coordinates are set to -3XXX something.. lol
    I did, however, accomplish the effect I was going for. Thanks for your input anyway.
    Last edited by Downloader; 12-25-2018 at 04:58 PM.

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