Raftronaut
Member
Hello!
I have a specific problem in my shooter module game design where the solid tiles at the top and bottom of the playfield, we'll call them "rails" actually halt the player momentum when touched. I believe this would only be a problem for people using solid tiles in an Auto scrolling environment like all scrolling shooter (or perhaps auto scroll-runnners).
Here is an example of the player momentum stopping:
https://youtu.be/qx9gUjPAnBU
The solution I had dreamed up is a sort of "roller" tile where the top and bottom of the tile collision would not allow the player to pass through but would also NOT halt the player momentum, allowing the player to slide along the edges without stopping... in fact, this type of solid collision could almost replace all solid tiles involved in shmups.
now that I am understanding a little 6502 ASM I decided to go looking for the code that dictates collisions of objects and I immediately hit a dead end.
My first instinct was to look in project settings->script settings -> Tile collision 01 - Routines\Basic\ModuleScripts\TileScripts\SolidBehavior.asm :
This is seeming to load a bit of code from a macro that I cannot find, or perhaps this is pointing to an address in memory.
in GameEngineDate\Routines\Basic\System\TileTypes\TileType01.asm I find:
I guess I am failing to understand where these labels are kept in the architecture of Nesmaker. I'd really like to breakdown the collision code happening in #TILE_SOLID so I can start picking it apart. If I could just understand where the collision points are checked and figure out how to modify those points with comparisons to either collide head on and stop momentum or collide from top/bottom and prevent from passing through but allow player to continue momentum.....that would be the solution I think..
Understanding that would really help me going forward, especially as I soon set out to try and solve my need for a Z-axis.
I just think there is something really basic I am failing to understand about how Nesmaker organizes the code.
If anyone could offer any guidance or insight here it would be greatly appreciated.
I have a specific problem in my shooter module game design where the solid tiles at the top and bottom of the playfield, we'll call them "rails" actually halt the player momentum when touched. I believe this would only be a problem for people using solid tiles in an Auto scrolling environment like all scrolling shooter (or perhaps auto scroll-runnners).
Here is an example of the player momentum stopping:
https://youtu.be/qx9gUjPAnBU
The solution I had dreamed up is a sort of "roller" tile where the top and bottom of the tile collision would not allow the player to pass through but would also NOT halt the player momentum, allowing the player to slide along the edges without stopping... in fact, this type of solid collision could almost replace all solid tiles involved in shmups.
now that I am understanding a little 6502 ASM I decided to go looking for the code that dictates collisions of objects and I immediately hit a dead end.
My first instinct was to look in project settings->script settings -> Tile collision 01 - Routines\Basic\ModuleScripts\TileScripts\SolidBehavior.asm :
Code:
;;; SOLID
;;;This is how to inform a solid collision.
;;; You can also add this to the end of
;;; any tile type if you want it to have an effect AND
;;; be treated like solid.
;;; You could also check to see if it is a non-player object,
;;; and only return solid if it's a not player. This would
;;; cause monsters to treat things like spikes or ladder or fire
;;; as solid while the player is able to interract with it.
LDA #TILE_SOLID
STA tile_solidity
;; if you want it solid, declare it at the end
This is seeming to load a bit of code from a macro that I cannot find, or perhaps this is pointing to an address in memory.
in GameEngineDate\Routines\Basic\System\TileTypes\TileType01.asm I find:
Code:
;;; SOLID
;;;This is how to inform a solid collision.
;;; You can also add this to the end of
;;; any tile type if you want it to have an effect AND
;;; be treated like solid.
;;; You could also check to see if it is a non-player object,
;;; and only return solid if it's a not player. This would
;;; cause monsters to treat things like spikes or ladder or fire
;;; as solid while the player is able to interract with it.
;; for a PLATFORMER, solidity is handled a little bit different.
;;; RIGHT NOW, you can also use this tile as a MONSTER LOCK or a COLLECTABLE LOCK
;;; tile type 5, by default, simply uses this code, but changes to walkable when monsters are destroyed.
;;; tile type 6, by default, simply uses this code, but changes to walkable and flips screen state when collectables are collected
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ALL THAT IS NEEDED FOR TOP DOWN
;LDA #TILE_SOLID
;STA tile_solidity
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; if you want it solid, declare it at the end
.include Tile_01
I guess I am failing to understand where these labels are kept in the architecture of Nesmaker. I'd really like to breakdown the collision code happening in #TILE_SOLID so I can start picking it apart. If I could just understand where the collision points are checked and figure out how to modify those points with comparisons to either collide head on and stop momentum or collide from top/bottom and prevent from passing through but allow player to continue momentum.....that would be the solution I think..
Understanding that would really help me going forward, especially as I soon set out to try and solve my need for a Z-axis.
I just think there is something really basic I am failing to understand about how Nesmaker organizes the code.
If anyone could offer any guidance or insight here it would be greatly appreciated.