[Solved] Soiled not fully Soiled

Barry2

Member
Hello everyone!
This is my official time asking a question on here. So my soiled doesn't seem to be a full soiled. I don't have it as a jump threw on the collision. You can see the pictures below. I also have my bounding box set correct. Is the something in a script that will help make this a solid instead of it only being half soiled sometimes?

Im working in the metro module.
 

Attachments

  • Bounds.JPG
    Bounds.JPG
    69 KB · Views: 28
  • My game question.JPG
    My game question.JPG
    258.2 KB · Views: 28
  • my game question 2.JPG
    my game question 2.JPG
    267 KB · Views: 28

AllDarnDavey

Active member
Strange? I'd double check you have the correct physics script assigned. Did you make any changes to it?
It's also usually a good idea to make the bounding box a little smaller then the character, that might not be the issue, but right now to fall or jump though a single block hole, you'd have to be pixel perfect because your bounding box is so wide, I'd bring it in a little bit on each side.
 

Jonny

Well-known member
Try setting the bounding box like this...

bounding.jpg

and as mentioned above, try bringing the sides in too.
 

Barry2

Member
Hey Guys,
So i made my bounding box smaller and I'm still having the same issues. Is there any script that i need to edit for this? Its just odd that i can jump into a solid.
 

Jonny

Well-known member
Does your player spawn inside the platform? Have you tried placing it a tile higher on your screen.
 

Barry2

Member
I dont have my player spawning there. Its right before the soiled jump. It will jump on top of it, but if i miss it a bit it will go in the middle of the block.
I just haven't seen anyone have this problem so i was wondering if it was something that i did?
 

Logana

Well-known member
that's so bazar, you make sure to follow one of the tutorials to make the game first off as a basis?
 

dale_coop

Moderator
Staff member
If the bounding box Is too big (the "height") you can have this issue with 1 row tile solid platforms. Try to set the height less or equal to 16
 

Barry2

Member
If the bounding box Is too big (the "height") you can have this issue with 1 row tile solid platforms. Try to set the height less or equal to 16
Still having the same issue. I have my bounding box almost next to nothing, and i can still jump into my platforms. I set my height from 16 to 8, and made my sides smaller as well.
 

Jonny

Well-known member
Still having the same issue. I have my bounding box almost next to nothing, and i can still jump into my platforms. I set my height from 16 to 8, and made my sides smaller as well.
Sorry you haven't found a solution yet.
If you could share some more information we could all take a look.

Are you using the latest vesion of nesmaker (4.5.9)?
Which module?
Any changes made to scripts yet?

Maybe some screenshots showing screen collissions settings and current player settings.
 

Barry2

Member
So I did find this scripts, I'm trying to follow it to see if there is anything I may need to change but I don't quite understand them just yet. Can anyone tell me, if this looks right and how to read these scripts.....





;;; CHECK FOR SOLID TILE, which is tile type 1 in this module.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; In this module, we have
;; 1 = solid
;; 7 = one way platform
;; 9 = prize block, which behaves as a solid
;; 10 (0A) = ladder, whose top behaves like a solid.
;; Here is where we handle the "landing" scenario for all of those possibilities.


GetCollisionPoint temp, temp1, tempA ;; is it a solid?
CMP #$01
BNE +isNotSolid
JMP +isSolid
+isNotSolid
CMP #$07
BNE +isNotOneWaySolid
JMP +isOneWaySolid
+isNotOneWaySolid
CMP #$09
BNE +isNotSolid
JMP +isSolid
+isNotSolid
CMP #$0A
BEQ +isLadderSolid

GetCollisionPoint temp3, temp1, tempA ;; is it a solid?
CMP #$01
BNE +isNotSolid
JMP +isSolid
+isNotSolid
CMP #$07
BNE +isNotSolid
JMP +isOneWaySolid
+isNotSolid
CMP #$09
BNE +isNotSolid
JMP +isSolid
+isNotSolid
CMP #$0A
BEQ +isLadderSolid
JMP +notSolid

+isLadderSolid
LDA Object_v_speed_hi,x
BEQ +checkSolid
BPL +checkSolid
JMP +notSolid
+checkSolid
LDA temp1
SEC
SBC #$02
SEC
SBC Object_v_speed_hi,x
STA tempy
GetCollisionPoint temp, tempy, tempA ;; is it a solid
BEQ +checkForSecondPoint
CMP #$0A
BEQ +notSolid
GetCollisionPoint temp3, tempy, tempA ;; is it a solid?
BEQ +checkForFirstPoint
CMP #$0A
BEQ +notSolid
JMP +isSolid
+checkForSecondPoint
GetCollisionPoint temp3, tempy, tempA ;; is it a solid?
BEQ +isSolid
JMP +notSolid
+checkForFirstPoint
GetCollisionPoint temp, tempy, tempA ;; is it a solid?
BEQ +isSolid
JMP +notSolid


+isOneWaySolid
;; a special kind of solid
LDA Object_v_speed_hi,x
BMI +notSolid ;; a jumpthrough platform is definitely not solid if moving up through it.
;;; however, it is not solid if we haven't cleared it yet.
TYA
AND #%11110000
CLC
ADC Object_v_speed_hi,x
CMP temp1
BEQ +isSolid
BCS +isSolid
JMP +notSolid

+isSolid

JMP isSolidSoLand



+notSolid:


;; is not solid, don't land.
LDA Object_y_lo,x
CLC
ADC Object_v_speed_lo,x
STA yHold_lo
LDA Object_y_hi,x
ADC Object_v_speed_hi,x
STA Object_y_hi,x
STA yHold_hi

CMP #BOUNDS_BOTTOM
BCC +notAtBounds
CPX player1_object
BNE +destroyNonPlayerObject
LDA #$00
STA screenUpdateByte
JSR doHandleBounds
JMP +notAtBounds
+destroyNonPlayerObject
DestroyObject
+notAtBounds

CMP #$02
BCS +notAtBoundsTop
CPX player1_object
BNE +destroyNonPlayerObject

LDA #$02
STA screenUpdateByte
JSR doHandleBounds
JMP +notAtBoundsTop
+destroyNonPlayerObject
DestroyObject
+notAtBoundsTop


LDA Object_v_speed_lo,x
CLC
ADC #GRAVITY_LO
STA Object_v_speed_lo,x
LDA Object_v_speed_hi,x
ADC #GRAVITY_HI
STA Object_v_speed_hi,x

LDA Object_v_speed_hi,x
CMP #MAX_FALL_SPEED
BNE notOverFallSpeed
;; is at least max fall speed.
LDA #$00
STA Object_v_speed_lo,x
notOverFallSpeed:



JMP doneWithGravity


isSolidSoLand:
;; move to position
;;; load the top of the tile that is being run into.
;;check if in a jumping state.
TXA
STA temp
GetActionStep temp
CMP #$02 ;; presums jump is in state 2
BNE +dontChangeToIdle
LDA gamepad
AND #%11110000
BNE +isRunningWhenLanding
;; is idle when landing
LDA #$00
STA temp1
JMP +gotLandingState
+isRunningWhenLanding
LDA #$01
STA temp1
+gotLandingState
ChangeActionStep temp, temp1 ;; changes to either idle or running depending on if a direction key is pressed.
+dontChangeToIdle




;; force y to tile boundary.
; LDA tileY
; AND #%11110000
; SEC
; SBC self_bottom
; SEC
; SBC #$01
; STA Object_y_hi,x
; STA yHold_hi

LDA #$00
STA Object_v_speed_lo,x
STA Object_v_speed_hi,x
doneWithGravity:

skipPhysics:
 

Barry2

Member
This is where I'm at now. I have tried the bounding box in different ways. Also I have done what was suggested by @dale_coop and I'm getting the issue.
 

Attachments

  • Overworld with collision.JPG
    Overworld with collision.JPG
    634.2 KB · Views: 4
  • bounding box 2.JPG
    bounding box 2.JPG
    75.9 KB · Views: 4

Barry2

Member
Here is the Script that is under SubRoutines as BASE_4_5\Game\MOD_PlatformerBase\Subroutines\doHandleObjectCollision_PlatforerBase.asm
;; object collions have to check from current index
;;; through the rest of the objects on the field of play.
;;; Objects prior to its index have already checked against this particular object
;SwitchBank #$1C
;;STEP 1: Check for inactivity.
LDA Object_status,x
AND #%10000000
BNE +doCheckSelfForObjectCollision
;; object is inactive.
JMP +skipObjectCollisionCheck
+doCheckSelfForObjectCollision:
;;STEP 2: Check for hurt state.
;;; In this module, monsters will use action step 7 for their hurt state.
TXA
STA selfObject
STA temp
GetActionStep temp
CMP #$07
BNE +notHurt
JMP +skipObjectCollisionCheck
+notHurt
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;STEP 3: Set up bounds for self collision.
TXA
PHA
LDY Object_type,x
LDA ObjectFlags,y
STA tempA ;; temp A now holds the current object flags.
;; collision box is still held over from the physics routine.

LDA xHold_hi
CLC
ADC self_left
LDA Object_screen,x
ADC #$00
STA self_screen_left

LDA xHold_hi
CLC
ADC self_right
LDA Object_screen,x
ADC #$00
STA self_screen_right

; LDA Object_x_hi,x
; CLC
; ADC #$10
; LDA self_screen_left
; ADC #$00
; STA self_screen_right

LDA xHold_hi;Object_x_hi,x
CLC
ADC self_left
STA bounds_left

LDA xHold_hi
CLC
ADC self_right
STA bounds_right


LDA yHold_hi;Object_y_hi,x
CLC
ADC self_top
STA bounds_top
LDA yHold_hi;Object_y_hi,x
CLC
ADC self_bottom
STA bounds_bottom



TYA
PHA
;;; we probably want this to live inside bank 1C
;;; so that we can access flag data easily with no RAM.
;;;; Right now, in this module, it is there by default.
;;;; If it is not, we will have to bankswap to 1c here.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Check the type of object.
;;; If it is a weapon, it will check against monsters only.


There is more to this but i believe this where if any changes need to be made. I least i think. im still pretty new to this code
 

Barry2

Member
Here are the list of scripts that it is running. And yes I am using the newest version of NesMaker
Sorry for all the post. Just trying to learn this
 

Attachments

  • scripts.JPG
    scripts.JPG
    632.4 KB · Views: 3

Jonny

Well-known member
Did you try without the monster placements to see what happens? One seems to be placed inside the solid tile.

The only other suggestion is to start a new project and do everything exactly as Joes tutorial (same objects/everything identical). If the issue still happens then you will know that its something todo with the scripts. I think thats the only way to narrow things down.
 

Jonny

Well-known member
Here are the list of scripts that it is running. And yes I am using the newest version of NesMaker
Sorry for all the post. Just trying to learn this
In your player settings do you have Solid Object Reaction set to 'NULL' ?

If so, try setting to 'STOP'

Untitled-1.jpg
 
Top Bottom