NintendoAge http://nintendoage.com/forum/ -Sqooner Nightman vs. Justice Incarnate http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=25663 2011-02-25T23:22:01 -05.00 Mario's Right Nut 64 Looking good!! ]]> Nightman vs. Justice Incarnate http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=25663 2011-02-25T15:58:34 -05.00 Mario's Right Nut 64 Nightman vs. Justice Incarnate http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=25663 2011-02-25T15:30:37 -05.00 Mario's Right Nut 64 Al ]]> Nightman vs. Justice Incarnate http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=25663 2011-02-25T14:27:36 -05.00 Mario's Right Nut 64 It's pretty simple.  When you collide with that metatile, it sets a flag.  The climbing flags disable gravity and makes it so that you can move up and down as you would in a top down game.  (as a result, you'll let go if you aren't holding down the D-pad in the direction of the wall you want to hold on to.)  Then it does the normal graphics/movement updates.  Then there's a "graphics override" routine that puts up the appropriate sprites and overwrites them. 

Does that make sense?  It's more or less the same mode, just with varying up/down movement.  But all the flag setting is handled by the collision detection. 

;---------------------------

climbing_jump:
  .db $00,$00,-3,3


handle_platformer_input:

Read_PF_A:
  LDA joypad1_pressed       ; player 1 - A
  AND #%10000000  ; only look at bit 0
  BEQ .ReadADone

  LDA Climbing_Flag+1       ;disable firing if he's clinging
  ORA Climbing_Flag+2
  BNE .ReadADone

  LDA Weapons_RAM+8     ;see if the arrow is ready to fire again
  CMP #$FE
  BNE .ReadADone

.some
  LDA #Atimer   ;reset the timer so that the arrow is fired next frame
  STA A_timer

.ReadADone:        ; handling this button is done
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
Read_PF_B:

  LDA B_timer       ;make the jump stop short if you stop pushing the button
  BEQ .next
  LDA joypad1
  AND #%01000000
  BNE .next
  LDA #$00
  STA B_timer
  STA gravity_timer
  JMP .ReadBDone

.next
  LDA joypad1_pressed      ; player 1 - B
  AND #%01000000  ; only look at bit 0
  BEQ .ReadBDone

  LDA B_timer     ;check and see if the mace is still out
  BNE .ReadBDone

  LDA Jump_Limiter;check and see if he can jump again
  BNE .ReadBDone

  LDA Climbing_Flag+1
  BEQ .balls
  LDX enemy_direction
  LDA climbing_jump,x
  CLC
  ADC Nightman_RAM+3
  STA Nightman_RAM+3 

.balls
  LDA #Jump_Timer        ;reset the timer if it was not pressed last time, but is this time
  STA B_timer
  STA Jump_Limiter
 
.ReadBDone:        ; handling this button is done
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
Read_PF_Select:
  LDA joypad1_pressed       ; player 1 - select
  AND #%00100000  ; only look at bit 0
  BEQ .ReadSelectDone   ; branch to ReadSelectDone if button is NOT pressed (0)
                 
  LDA #$01
  STA load_overworld_flag

.ReadSelectDone:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
Read_PF_Start:
  LDA joypad1_pressed       ; player 1 - start
  AND #%00010000  ; only look at bit 0
  BEQ .ReadStartDone

  LDA GameState
  STA GameState+1
 
  LDA #PauseState
  STA GameState

.ReadStartDone:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Read_PF_Up:
  LDA joypad1 ;Up
  AND #%00001000
  BEQ .ReadUpDone

  LDA Climbing_Flag  ;grab background
  BNE .next1
  LDA Climbing_Flag+2  ;grab roof
  BEQ .next
 
  LDA joypad1 ;Left  ;override the movement when he's clinging to the roof
  AND #%00000010
  BEQ .balls
  DEC Nightman_RAM+3
  LDA #$01
  STA Roof_Cling_Direction
  JMP .next1
.balls
  LDA joypad1 ;right
  AND #%00000001
  BEQ .next1
  INC Nightman_RAM+3
  LDA #$00
  STA Roof_Cling_Direction

.next1
  LDA #$00
  STA enemy_direction
  JSR Movement

  LDA #%00001000
  ORA Required_Collision_Flags
  STA Required_Collision_Flags
  RTS

.next

  LDA Look_Override_Flag
  ORA #%00000010
  STA Look_Override_Flag
  RTS

.ReadUpDone:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Read_PF_Down:
  LDA joypad1 ;Down
  AND #%00000100
  BEQ .ReadDownDone

  LDA Climbing_Flag
  BEQ .next
  LDA #$01
  STA enemy_direction
  JSR Movement

  LDA #%00000100
  ORA Required_Collision_Flags
  STA Required_Collision_Flags
  RTS

.next

  LDA Look_Override_Flag
  ORA #%00000001
  STA Look_Override_Flag
  RTS

.ReadDownDone:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Read_PF_Left:
  LDA joypad1 ;Left
  AND #%00000010
  BEQ .ReadLeftDone
  LDA #$03
  STA enemy_direction
  JSR Movement

  LDA #%00000001
  ORA Required_Collision_Flags
  STA Required_Collision_Flags

  JMP Read_PF_RightDone

.ReadLeftDone:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Read_PF_Right:
  LDA joypad1 ;Right
  AND #%00000001
  BEQ Read_PF_RightDone
  LDA #$02
  STA enemy_direction
  JSR Movement

  LDA #%00000010
  ORA Required_Collision_Flags
  STA Required_Collision_Flags

Read_PF_RightDone:

  RTS

]]>
Nightman vs. Justice Incarnate http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=25663 2011-02-25T14:07:55 -05.00 Mario's Right Nut 64
I'm working on player input now, and I haven't come across an approach that I am happy with when dealing with varying player controls based on the environment.

For example, is the ceiling climb an attribute on the metatile so that when you encounter it, you switch to a different mode?

Very impressive.
Al ]]>
Nightman vs. Justice Incarnate http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=25663 2011-02-25T11:57:52 -05.00 Mario's Right Nut 64 Nightman vs. Justice Incarnate http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=25663 2011-02-02T15:54:48 -05.00 Mario's Right Nut 64 Nightman vs. Justice Incarnate http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=25663 2011-02-02T12:53:31 -05.00 Mario's Right Nut 64 Nightman vs. Justice Incarnate http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=25663 2011-02-02T09:05:39 -05.00 Mario's Right Nut 64 Originally posted by: WhatULive4

It's like battlekid in space!


Disclaimer:
Nightman is in no way affiliated with Battle Kid or Sivak Games.  Any resemblence to these games, or any person living or dead, is purely coincedential and in no way intentional. 

Thanks for the kind words!  On to Level 3!

]]>
Nightman vs. Justice Incarnate http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=25663 2011-02-01T20:22:44 -05.00 Mario's Right Nut 64 Originally posted by: WhatULive4

It's like battlekid in space!

Pigs...in...space (space) [space] {space}


But yes, the game looks awesome.
]]>