Quantcast
Channel: nesdev.org
Viewing all articles
Browse latest Browse all 746

Tiles colision detector V3 ! RUNNING with b button.... messing things up lol

$
0
0
This was a real puzzle to figure out , but I think I got it , left, right and bottom collision detection for now, with " live fetching " the VRAM every IRQ lol. I even managed to put some exceptions and catch the sprite almost pixel perfect .

NOW after hours of figuring it out, I Had forgot the running B button lol. After a few tweaks, I managed to catch almost all "the running" collisions but its not so simple lol. One when running left doesnt work exactly as intended, but it do block the player, so no CLIPPING OUT :D


Anyhow, This is a pure tile detector , it doesn't work exactly like the usual ones. I give my routine only one coordinate, say sprite2 in my player 1. From there , its fetching all tiles around the player, and check if they are solid or no. ONce I know if its solid tile, another routine calculate that tile coordinate, do the difference with the sprite coordinates. depending on the difference, I block movement, or push the sprites accordingly.


I think other tiles detectors work the other way and IM doing it upside down ( from what I read from tokumaru ) ? NORMALLY You would check a certain coordinate, determine the tile index from the nametable copied in the ram earlier at that coordinate, , check if its solid, then compare the sprites coordinates with that certain coordinates from the beginning, then stop movement or push depending the situation.

Anyhow, I did that from scratch, pure ASM, the whole project so far :D

enjoy and also feel free to destroy my hopes if you find any glitches for left, right and BOTTOM collision. Ill had top collision tonight.

Statistics: Posted by v.depatie — Sat Feb 01, 2025 6:52 pm — Replies 1 — Views 618



Viewing all articles
Browse latest Browse all 746

Trending Articles