Flea Game and some help needed (demo)

wallmasterr

Active member
Im almost at beta test stage, any ideas of how to go about this? i was gona mabie send it to all the kickstarter backers and ask them to record there play sessions and send them to me if they wana help out.
This sounds like a good idea, should I also shout out on twitter? or on the need help section on this forum?
 

wallmasterr

Active member
still needing help on this dash is there a way to change your acceleration speed on the fly?

heres my code so far, it registers that the 2 buttons have been pressed and changes the state to 5 whitch is dash.


Code:
    LDX player1_object

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;; this is for platform game.
    
;;From dale coop  2 button pressed
;;And add a code at the beginning of the script In input editor with fiest button as held then this checks if other buttons 

    LDA gamepad
    ;;AND #%00010000        ;; if UP is pressed
    ;;AND #%00000001        ;; if A is pressed
      AND #%00000010        ;; if B is pressed
    BNE +
    RTS         ;; if not, stop the script

+
    ;;JMP RESET     ;;restet test

    STA Object_h_speed_hi,x ;;
    StartMoving player1_object, MOVE_LEFT 
    FaceDirection player1_object, FACE_LEFT
    ChangeObjectState #$05, #$02  ;;set player state to dash ie state #$05
    PlaySound #sfx_jump
    
    RTS
iv tried changing random bits to be multiplied by a number but not sure what im doin.
StartMoving player1_object, MOVE_LEFT
STA Object_h_speed_hi,x

i was looking at this script here but couldnt figure it out
http://nesmakers.com/viewtopic.php?f=23&t=869&p=17934&hilit=dash#p17934

please help :)
 

dale_coop

Moderator
Staff member
But you need to keep all the code fro that script (of the other topic)... because speed variable needs to be a positive value when you go to the right and a negative value when you go to the left. It's like it works in NESmaker.

So, you need to keep the ";; Check facing direction" code and the "slideRight" part and the "slideLeft" part...
In fact, you will need the entire script, just add your gamepad check at the beginning.... and your action step "05" instead of "07" ;)
 

wallmasterr

Active member
Cant seem to get that to do anything

what shoudl the input editor be like? iv got this attached to left and right press?
so code looks like this now?
Code:
;; MODIFIED FROM DEFAULT JUMP SCRIPT

;; Get player object
;; Check if in air, and skip if so.
	LDX player1_object
	LDA Object_status,x
	AND #%00000100
	BEQ +
	
	LDA gamepad
	;CMP #%00100000  ;;check if “down” is press too
	CMP #%00000010        ;; if B is pressed
	BNE +

	;; Check facing direction
	LDA Object_movement,x
	AND #%00000111 ;only keep the last 3 bits
	CMP #%00000010 ;FACE_RIGHT		= #%00000010
	BEQ slideRight
	JMP slideLeft

slideRight:
	;FACE_RIGHT		= #%00000010
	LDA #$00
	ADC #$06
	STA Object_h_speed_hi,x
	JMP continueSliding

slideLeft:
	;FACE_LEFT		= #%00000110
	;; Store 250 in accumulator and assign it to object's speed
	LDA #$00
	SBC #$06
	STA Object_h_speed_hi,x

continueSliding:
	ChangeObjectState #$05, #$02 ;Set the object's animation state (my dash action is 7)
	;PlaySound #SFX_PLAYER_JUMP
+
	RTS

I also tried stripping out the other check and assigning it to select to see if it would work like that but still nothing...
 

dale_coop

Moderator
Staff member
Could be the check for in air... or even the gamepad checks... or maybe the extra controls script that messes with all the other state changes...
Also, not sure the scrolling engine will like the dash code :p
Easy to test... comment our the check for in Air and the one for the game pad... and assign the scrip to the "B" button and test the dash (when pressing "B" anytime).
 

wallmasterr

Active member
oo now its getting somewhere.
it dose dash in the direction your facing, animation dosnt play properly but il try and figure that out. The weird thing is that once you die and respawn it no longer works, do i need to reset a value somewhere?
Also seems ok on scrolling levels so far.
it insted makes monsters dash in the oposit direction after a respawn

heres what my code looks like at the moment
Code:
;; MODIFIED FROM DEFAULT JUMP SCRIPT

;; Get player object
;; Check if in air, and skip if so.
    ;LDX player1_object
    ;LDA Object_status,x
    ;AND #%00000100
    ;BEQ +
    

	LDA gamepad
    CMP #%10000000  ;;check if “left” is press too
    CMP #%01000000  ;;check if “right” is press too
	;CMP #%00100000  ;;check if “down” is press too
    ;AND #%00000010        ;; if B is pressed
    ;BNE +
	
	

    ;; Check facing direction
    LDA Object_movement,x
    AND #%00000111 ;only keep the last 3 bits
    CMP #%00000010 ;FACE_RIGHT      = #%00000010
    BEQ slideRight
    JMP slideLeft
	



slideRight:
    ;FACE_RIGHT     = #%00000010
    LDA #$00
    ADC #$06
    STA Object_h_speed_hi,x
	;ChangeObjectState #$05, #$02
    JMP continueSliding
	

slideLeft:
    ;FACE_LEFT      = #%00000110
    ;; Store 250 in accumulator and assign it to object's speed
    LDA #$00
    SBC #$06
    STA Object_h_speed_hi,x
	;ChangeObjectState #$05, #$02
	

continueSliding:
    ChangeObjectState #$05, #$02 ;Set the object's animation state (my dash action is 7)
    PlaySound #SND_ALLY_PICKUP
	
	+
    RTS

It seems to register the 2 buttons thing and set the animation but does not activate the dash at the same time.

EDIT:
so uncomenting these lines fixed the not reseting after death
LDX player1_object
LDA Object_status,x
 

wallmasterr

Active member
Update iv made it so u unlock the dash later on in the game from an npc, feels good when even the little amount of code i coble together works:)
Repurposed the melee weapon unlock from the adventure tutorial.
https://twitter.com/Wallmasterr/status/1267101414339338242

How would i go about disabling gravity during the dash?
 

wallmasterr

Active member
i did try that but he just resizes in place. (kinda liked that i mgiht be able to use that for a delay before the dash)
That would have been realy nice to manage.
Can u use enemy ai scripts on the player in different states? Iv tested but not managed to make it work.

Iv also been playing some kubo 3 , how do you chang the gravity in the underwater levels?
 

dale_coop

Moderator
Staff member
For the gravity in the underwater, I modified the code in the HandleUpdateObject (modifying the tempAccAmount and tempAccAmount values) depending of it was a underwater level or not (using a screen variable/flag).
 

wallmasterr

Active member
Cool, couple folowups from that,
do screen types changes like hat work with auto scrolling levels or Can that be modified on a per pile basis ?
 

wallmasterr

Active member
https://twitter.com/Wallmasterr/status/1267485356582227968

What people think? should i make it respawn at the level number screen or right back in the level?
its good jumping right back in but feel its less polished.

Any strong opinions ether way?
 

wallmasterr

Active member
Also added a debug next level/ actvate warp button.
is this wa=hat the bButtonActivateWarp.asm dose already? noticed it after i made mine.

Heres the code, just copied from the warp tile but assigned to select
Code:
LDA #$00
STA newGameState

 LDA warpMap
 sta currentMap
 clc
 ADC #$01
 STA temp
 GoToScreen warpToScreen, temp, #$02
 LDA #$00
 STA playerToSpawn
 LDX player1_object
 DeactivateCurrentObject
 LDA #$01
 STA loadObjectFlag
 
LDA mapPosX
STA newX
LDA mapPosY
STA newY

RTS
 

Dirk

Member
If I play a game where I die a lot I personally prefer being able to continue playing as soon as possible. So I think I would leave it out, although it looks good.
You might consider having an option menu at the title screen where you can set if you want to have this screen displayed after death or not. Might be a bit of an overkill though.
 

wallmasterr

Active member
Dirk said:
If I play a game where I die a lot I personally prefer being able to continue playing as soon as possible. So I think I would leave it out, although it looks good.
You might consider having an option menu at the title screen where you can set if you want to have this screen displayed after death or not. Might be a bit of an overkill though.
Yip i feel the same way, like in 1000 spikes, its just a sound jungle and how many lives uv got left between deaths adn even then it seems too long sometimes.
Im not sure how to implament that in a menu.
the main issue it was tryign to fix was i keped forgettgin what level i was on when i was testing so might acutaly just be ok
 

wallmasterr

Active member
Had a weird bug in playtest where after dieing / game over or consol reset, my npc who gives you the dash ability was triggerd and gone so couldnt get the dash.
Where is the triggerd monsters npcs handleld and how do i disable it just for safety, i dont need it in my game.
 

dale_coop

Moderator
Staff member
Hmmm....
if you want to reset ALL the triggers (like there were at start), the code is:
Code:
	LDA #INIT_TRIG_00
	STA screenTriggers+0
	LDA #INIT_TRIG_01
	STA screenTriggers+1
	LDA #INIT_TRIG_02
	STA screenTriggers+2
	LDA #INIT_TRIG_03
	STA screenTriggers+3
	LDA #INIT_TRIG_04
	STA screenTriggers+4
	LDA #INIT_TRIG_05
	STA screenTriggers+5
	LDA #INIT_TRIG_06
	STA screenTriggers+6
	LDA #INIT_TRIG_07
	STA screenTriggers+7
	LDA #INIT_TRIG_08
	STA screenTriggers+8
	LDA #INIT_TRIG_09
	STA screenTriggers+9
	LDA #INIT_TRIG_0a
	STA screenTriggers+10
	LDA #INIT_TRIG_0b
	STA screenTriggers+11
	LDA #INIT_TRIG_0c
	STA screenTriggers+12
	LDA #INIT_TRIG_0d
	STA screenTriggers+13
	LDA #INIT_TRIG_0e
	STA screenTriggers+14
	LDA #INIT_TRIG_0f
	STA screenTriggers+15
	LDA #INIT_TRIG_10
	STA screenTriggers+16
	LDA #INIT_TRIG_11
	STA screenTriggers+17
	LDA #INIT_TRIG_12
	STA screenTriggers+18
	LDA #INIT_TRIG_13
	STA screenTriggers+19
	LDA #INIT_TRIG_14
	STA screenTriggers+20
	LDA #INIT_TRIG_15
	STA screenTriggers+21
	LDA #INIT_TRIG_16
	STA screenTriggers+22
	LDA #INIT_TRIG_17
	STA screenTriggers+23
	LDA #INIT_TRIG_18
	STA screenTriggers+24
	LDA #INIT_TRIG_19
	STA screenTriggers+25
	LDA #INIT_TRIG_1a
	STA screenTriggers+26
	LDA #INIT_TRIG_1b
	STA screenTriggers+27
	LDA #INIT_TRIG_1c
	STA screenTriggers+28
	LDA #INIT_TRIG_1d
	STA screenTriggers+29
	LDA #INIT_TRIG_1e
	STA screenTriggers+30
	LDA #INIT_TRIG_1f
	STA screenTriggers+31

But it's weird, because the RESET should already do all that.
hmmm... may you trigger the screen at some point in your game?
Make sure that your NPC is on a screen that have a UNIQUE screen-type value (not used by another screen)
 

wallmasterr

Active member
Thanks Dale that will come in usefull in future but think my problem was the old, level settings panel didn't save the screen type.

Im tryign to get a little polish in today and make the deaths consistant.
Currently when u die from hitting an enemy the death plays its aniamtion then resets but if u hit a death tile it resets instantly iv tried moving a few things around but inding ti hard to track it all.
iv got this

HandlePlayerDeathAlly.asm attached to my tile collesion
Code:
	CPX player1_object
	BNE +
	JSR HandlePlayerDeath
	PlaySound #SND_HURT_PLAYER

	JSR LoseLife
	;;JMP RESET
+
is this looking for another handleplayerdeath thing somewhere? is this refering to a asm file by name or just looking at all the labels loaded? if so is ther an easy way to find this kinda thing in the project?

this is my PlayerLoseLife.asm
Code:
;;; do loss of life stuff here
;;  DEC myLives

LDA myScore		;; to read/load the value corresponding to the units
LDA myScore+1	;; to read/load the value corresponding to the tenths
LDA myScore+2	;; to read/load the value corresponding to the hundreds
LDA myScore+3	;; to read/load the value corresponding to the thousands

	LDA myScoreSave
	STA myScore
	LDA myScoreSave+1
	STA myScore+1
	LDA myScoreSave+2
	STA myScore+2
	LDA myScoreSave+3
	STA myScore+3


	SubtractValue #$02, myLives, #$01, #$00 ;;Subtract 1 from the Ones digit
	;;AddValue #$02, myLives, #$01, #$00 ;;add 1 from the Ones digit ally
	;; first, checking the tenths:
	

	LDA myLives+2
	BNE gameNotOver
	LDA myLives+1
	BNE gameNotOver
	;; if the tenth digit is zero, then checking the units:
	LDA myLives
	BNE gameNotOver

	;;do gameover stuff here.  Warp to screen?  Show animation?  Just restart?
	JMP RESET
	
gameNotOver:

;;;;;
;;; do warp to continue screen stuff here.
LDA #$00
STA newGameState
 LDA continueMap
 clc
 ADC #$01
 STA temp
 GoToScreen continueScreen, temp, #$04
 LDA #$00
 STA playerToSpawn
; LDX player1_object
; DeactivateCurrentObject
 LDA #$01
 STA loadObjectFlag
 
LDA continuePositionX
STA newX
LDA continuePositionY
STA newY

and my HandlePlayerHurt.asm
Code:
	LDA Object_health,x
	SEC
	SBC #$01 ;; subtract other's strength
	CMP #$01
	BCS notPlayerDeath
	
	PlaySound #SND_HURT_PLAYER
	JSR HandlePlayerDeath
	JMP doneWithPlayerHurt

notPlayerDeath:
	STA Object_health,x
	STA myHealth
	
	STA hudElementTilesToLoad
		LDA #$00
		STA hudElementTilesMax
		; LDA DrawHudBytes
		; ora #HUD_myHealth
		; STA DrawHudBytes
	UpdateHud HUD_myHealth
    ;; TURN ON handling the hud
	
	LDA Object_status,x
	ORA #%00000001
	STA Object_status,x	

	LDA #HURT_TIMER
	STA Object_timer_0,x
	ChangeObjectState #$00,#$02 ;; uses idle for hurt state.
	
	LDA selfCenterX
	STA recoil_selfX
	LDA selfCenterY
	STA recoil_selfY
	LDA otherCenterX
	STA recoil_otherX
	LDA otherCenterY
	STA recoil_otherY
	
	JSR DetermineRecoilDirection


	;;;;; SCROLLER CAN NOT MAKE USE OF UPDATING HUD THIS WAY.


	
doneWithPlayerHurt:
 
Top Bottom