mongolianmisfit said:
Awesome update! I'll give this a go tomorrow after I get off work and chime in with how it's rolling.
Thanks, jorotroid.
You're welcome. I hope it works for you still so much to do and not enough time to do it in. Plus there are some many shiny distractions.
Mugi said:
jorotroid said:
One issue that this core still has is that if you put the player's max speed up too high, it will glitch out the scrolling tile draws. That's what I am working on fixing now. I have written an new NMI update (not yet implemented) that I think should be able to handle updating around 64 tiles in one frame. The current scrolling engines only do 16 per frame.
ah yes, i remember this part...
it took a moment to get it to do this.
https://www.youtube.com/watch?v=ioaTJF_9iY8
you're doing awesome job with this!
just out of curiosity, did you come up with a sane solution to the monster behavior regarding the scroll ?
Haha, yeah. I figure that if NESmaker allows for such a high speed, I should be able to support it.
As for the monster behavior stuff... it's always on my mind. What it does now is it keeps track of up to 16 screens on whether or not a monster has already been spawned. If it has, then the monster can't spawn if you go scroll to that screen. This buffer that keeps track of spawns gets reset everytime you load a new screen instead of scrolling into one. The idea is if you're making a metroidvania, that monsters wouldn't be able to respawn while you are in a room, but if you exit and leave a room, then the monsters would be able to respawn again. Also I've made an edge behavior option that puts an object to "sleep" so that it still exists in memory, but does not update until it is in view of the camera again. I'm thinking I should consider making sleeping objects deactivate if they get some number of screens away from the camera. Alternatively, since I freed up a page of ram, maybe I can use that memory to store minimal data about a sleeping monster, deactivate that instance, and then if the camera returns to that location create a new monster with that minimally stored data. One thing I worry about is making sure that certain objects like a power up item pick up can never be destroyed no matter how many screens you scroll away from it. That's why I over killed by tracking spawning for 16 screens. I'm definitely open to suggestions on how off screen objects should act.
Oh, I also have some glitches when enemies come back on screen sometimes. Usually it happens when an enemy goes off screen while you are scrolling away from it and it's about to hit a solid tile. When it comes back on screen, there is a chance it will be partially stuck in the tile. I've tried to correct this by snapping the enemy to the grid when it comes back on screen. It helps, but I still sometimes get the issue. Also not completely a glitch, but it feels glitchy: the eyeball enemies in Witch City move pretty fast. Fast than the player, so when they run off screen and you catch up to then, they will immediately run off screen again. So I might figure a way to force an object to change directions towards the player when they reenter the camera view.
I get the feeling there won't be a perfect solution for everyone on how to handle offscreen objects. How are things going for you with regards to that?