help me fix copter bot

jcramer

New member
so, after some very negative criticisms of my Copter Bot game, I want to make some improvements to it. Most importantly, I need to make the flying mechanic easier by holding the jump button instead of the rapid, alternating presses. It should be possible just by making it rapid fire in the code. I tried lots of different things to make it happen with no success. Any help would be much appreciated. It's in 4.0.11, btw.
 

Retrobuster

New member
So hopefully the "very negative criticism" was actually constructive and not solely the comments of a single specific individual. If so, I'd encourage you to look past it and stick with what YOU think is best for YOUR game. But, if you've gotten that feedback from a few people who's input you trust and value then...STILL think about what's best for your game! ;) BUT, if you think this is the best thing for your game then I probably can't offer too much help except to see if you tried to change your "jump" input from "press" to "hold" in the input editor. I'd understand why this doesn't work, but just wanted to make sure you tried this bc sometimes solutions are so simple they get overlooked. :)
 

jcramer

New member
'thanks for the reply, the criticism was from 2 different videos, one being pretty rough but constructive, fair enough... and the other was actually kinda creepy (search for AG64 glitches "bad nesmaker games" on youtube). It's not just that tho, I been wanting to fix the flying mechanic for a while now, I only posted what i had done and put it on the back burner because 4.1 was released.
 

Retrobuster

New member
Hmmm, sorry to hear that didn't work. I'm sure someone here more knowledgeable than myself can help you though.

P.S. For the love of God do NOT let what either of those two videos say get in your head. I have a pretty good feeling I know what the first one you mentioned was and, trust me, I have a rebuttal for almost every sentence spoken in that video and none of the games were even mine so it's not like I even have anything to be personally offended by. And that 2nd one.......wow...I have nothing to say about that. I actually liked your game for the most part, man!
 

jcramer

New member
thanks, that makes me feel better. the first video didn't really bother me and i appreciated what he was trying to do by going through every game. but that second video spooked me. felt like being stalked by jigsaw.
 
Regarding the second video, people need to find something better to do with their time than tear others down for no reason other than to be a prick.


Sorry I can't help you with the physics/controls of your game, but just wanted to say something that is hopefully encouraging :)
 

jcramer

New member
thank you it is very encouraging. im confident i can make the game better. i love the difficulty of it, just need to clean it up to make it more accessible.
 

dale_coop

Moderator
Staff member
I agree with BentPawGames... it's a difficult game, it meant to be like that.

Anyway, you could try this "a_fly.asm" script, if you want:

Code:
   LDX player1_object
   ;;; let's check for if we are standing on a jumpthrough platform,
   ;;; for which "down and jump" will jump downwards through
   ;;; comment this out if you do not want that functionality
    LDA screenFlags
    AND #%00100000 ;; does it use gravity?
    BEQ dontJump
    
   LDA Object_physics_byte,x
   AND #%00001000
   BEQ notStandingOnJumpThroughPlatform
   LDA gamepad
   AND #%00100000
   BEQ notStandingOnJumpThroughPlatform
   LDA Object_y_hi,x
   CLC
   ADC #$09
   STA Object_y_hi,x
   JMP dontJump
notStandingOnJumpThroughPlatform:
   
   ;LDA Object_physics_byte,x
   ;AND #%00000001
   ;BNE canJump
   JMP canJump
   LDA Object_physics_byte,x
   AND #%00000100
   BEQ dontJump
    
canJump:
    ;;; TURN OFF "STANDING ON JUMPTHROUGH PLATFORM" if it is on
    LDA Object_physics_byte,x
    AND #%11110111
    STA Object_physics_byte,x
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    LDA #$00
    SEC
    SBC #JUMP_SPEED_LO
    STA Object_v_speed_lo,x
    LDA #$00
    SEC
    SBC #JUMP_SPEED_HI
    STA Object_v_speed_hi,x
    GetCurrentActionType player1_object
    CMP #$03 ;; attack
    BEQ +
    ChangeObjectState #$02, #$04
   +
    PlaySound #SND_JUMP
dontJump:
    RTS


And assign it to the "HOLD" A button.
Now your player should fly instead of jump.
 

jcramer

New member
im trying to put the code in now... i got a compiling error... where does the code go exactly? i think i put it in the wrong spot.
 

jcramer

New member
i just replaced the jump script with the fly script and it still gave me the compile error. this code is for 4.0.11 right?
 

dale_coop

Moderator
Staff member
Sorry, I forgot you're still in 4.0.11... try this 4.0 script instead:

Code:
	LDX player1_object
	LDA Object_status,x
	AND #%00000100
	BEQ +
	PlaySound #SFX_PLAYER_JUMP
	+
	LDA #$00
	SEC
	SBC #$06  
	STA Object_v_speed_hi,x
	LDA Object_status,x
	AND #%11111011
	STA Object_status,x
	ChangeObjectState #$02, #$02
	RTS
 

jcramer

New member
what would i have to change to get it to lift slower? and make the player fall when his head hits a ceiling?
 

dale_coop

Moderator
Staff member
Here a modify script, to be slower (cf my comment in the script) nd and to fix the animation:
Code:
	LDX player1_object
	LDA Object_status,x
	AND #%00000100
	BEQ +
	PlaySound #SFX_PLAYER_JUMP
+
	LDA #$00
	SEC
	SBC #$03		;; <<---- HERE the speed of the "jump"
	STA Object_v_speed_hi,x
	LDA Object_status,x
	AND #%11111011
	STA Object_status,x
	GetCurrentActionType player1_object
	CMP #$02
	BEQ +
	ChangeObjectState #$02, #$02
+
	RTS

For the ceiling... can't say, it would require I make some tests (and I am not in front of my pc/NESMaker)
 
Top Bottom