m8si
Active member
Lolo engine is finally starting to come alive. I hope I can soon make my own version of my favorite childhood game Lolo 2.
By the way. The logic you see on the video is the same logic how the official game does block pushing. My"engine" is only using two objects to make all this happen. One for the player and another for the moving block.
This is how to do it in NESmaker. Not the only way, but this is something I have figured out.
1. Block is a special tiletype
2. Player collides with the Block tile
3. Make object with similar sprite image to the Block, ontop of the Block background tile
4. Replace the background tile containing the block with the floor tile.
5. find out which direction player pushed the block from
6. check if there is a spot with a #$00 floor tile after the block
7. change speed of the sprite to make it move (at the correct direction)
8. when sprite has moved 16px draw a new Block as background tile
9. destroy Block object right after the new background Block has been drawn
10. update collisionTable with new values. #$00 for the old position and Block tile number for the new position.
Well that's quite a lot for a simple block pushing logic. But one great benefit of doing it like this is you can have virtually unlimited amount of blocks on the screen without any slowdown and also don't have to worry about 8 sprites per scanline.
By the way. The logic you see on the video is the same logic how the official game does block pushing. My"engine" is only using two objects to make all this happen. One for the player and another for the moving block.
This is how to do it in NESmaker. Not the only way, but this is something I have figured out.
1. Block is a special tiletype
2. Player collides with the Block tile
3. Make object with similar sprite image to the Block, ontop of the Block background tile
4. Replace the background tile containing the block with the floor tile.
5. find out which direction player pushed the block from
6. check if there is a spot with a #$00 floor tile after the block
7. change speed of the sprite to make it move (at the correct direction)
8. when sprite has moved 16px draw a new Block as background tile
9. destroy Block object right after the new background Block has been drawn
10. update collisionTable with new values. #$00 for the old position and Block tile number for the new position.
Well that's quite a lot for a simple block pushing logic. But one great benefit of doing it like this is you can have virtually unlimited amount of blocks on the screen without any slowdown and also don't have to worry about 8 sprites per scanline.