Beginner's Help Needed

LonnieDonigen

New member
I recently purchased Nesmaker and am starting to work on a demo. It's a platformer and I have two questions.

1) What is the best combo for manipulating the jumps? I have tinkered with the Constants and can't seem to get anything to click. I would just like my player to be able to jump two squares up.

2) I can't seem to get the Warp Tiles to work. I've watched the tutorials and followed them to the letter. However, whenever I enter into the coordinates, they aren't followed. My player gets dropped to a background only screen.

Thanks, in advance.
 

AllDarnDavey

Active member
1) It just so happens I've set my character to jump about two squares up. My settings are:
GRAVITY_LO:50
GRAVITY_HI: 0
JUMP_SPEED_LO: 200
JUMP_SPEED_HI: 4

2) hit the Screen Info button on the screen you want to warp from. Set the Warp out Screen X, Y to the screen you want to warp too (you can see each screen's XY value in the upper left when in the Overworld).
Then hit the Screen Info button on the screen you want to warp to. Make sure it's Warp in Screen Location X, Y is set (you can get the location from the TileInfo: when on that screen).

I can't know for sure, but you may either have set the warp out values on the wrong screen (or have the wrong values), or you may have the wrong values on the warp in location. You may also be warping in, and then immediately falling offscreen for instance.
 

dale_coop

Moderator
Staff member
1/ Most important values here are your JUMP ones :
JUMP_SPEED_HI: just increase or decrease this by 1 to have a significant result (like "hours" for time)
JUMP_SPEED_LO: you can go from 0 to 255, it' a precision to the JUMP_SPEED_HI (like "minutes" for time).
So HI: 4 / LO: 255 is almost the same as HI: 5 / LO: 0

Same for the gravity.


2/ You could try to modify the warp script, replacing with this one:

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
 

LonnieDonigen

New member
2pDT0i6.jpg
 

dale_coop

Moderator
Staff member
Ok, looks nice. No error here.
You are using a Basic SimplePlatform or Scrolling module?

Have you set the "skip start screen" in the "Project Infos" dialog (via menu "project > project infos").

Have you set the Sprite0 ? Set it in the "HUD & Boxes", like this : http://nesmakers.com/viewtopic.php?p=15178#p15178
There is a tutorial video about the sprite zero on the www.thenew8bitheroes.com website. Very important to be set correctly!
 

MetalMan64

New member
I need a very beginner's advice on jumping.
I have found answers to some of my problems here, but I have some more questions:)

1) How can I make it so that when I jump I can't jump again immediately? (now my player can jump constantly like in Flappy Bird)
2) When I jump up the jump animation (frame) is being played, but when I jump diagonally it jumps and plays the walk animation. What can I do to fix this?
3) How can I get Castlevania-style jumps? I would like to have it so that I can't move while jumping. (I already made my player jump fairly low)

Thank you!
 

dale_coop

Moderator
Staff member
First... you need to fix your jumps.
Could you share screenshots of your "Scripts > Input Scripts" (the small list of scripts in the hierarchy tree view) and of the "Input Editor" window (scripts associated to buttons) ?
 

WillElm

New member
they key to classic-vania jumping is mostly in your move left/right scripts. Also you just get rid of varJump, since simon only has one jump height.

I did a little work on this exact problem before I decided I didn't want it for my game. Basically, you make it so if your player is in the air, you can't start movement left or right, and if you're already moving and then jump, you can't stop movement left/right if in the air.

Here are my scripts for this, but be warned, they're not "done". When the player reaches the ground after a moving jump, they continue to slide in the direction of that jump, since the stop moving script ran when you were in the air. There's probably a very easy way to fix that but I never got around to it since I decided I wanted full precision control. Also, I think I made it so you could turn around in air, just not move, because I was toying with the idea of having to jump forward but shoot backward.

Code:
    LDX player1_object
    GetCurrentActionType player1_object
    ;CMP #$02 ;; if the state is invincible
    ;BEQ ++ ; skip movement if attacking
    CMP #$03
    BEQ ++ ;skip if we are casting spell
    CMP #$01
    BEQ + ;; if the action type already equals 1, jump forward
    LDA Object_physics_byte,x
    AND #%00000001 ;;
    BEQ ++
    ChangeObjectState #$01, #$04
+
;;;;;; Then, we will begin moving.
    StartMoving player1_object, MOVE_LEFT
;;;;;; Lastly, we will change the facing direction.
    FaceDirection player1_object, FACE_LEFT
++
    FaceDirection player1_object, FACE_LEFT
    RTS

Code:
    LDA Object_physics_byte,x
    AND #%00000001 ;; is it on the ground?
    BEQ +

    StopMoving player1_object, STOP_LEFT
    GetCurrentActionType player1_object
    CMP #$03 ;; attack
    BEQ +
    ChangeObjectState #$00, #$04    
 + 
    RTS
 
Top Bottom