Having trouble with character sprites

Viro

New member
Hello. Finally dipping my toe into this and I came to a bit of a road block with certain things. Apologies if this is lengthy
(I'm using the Scrolling Platform Module. In short, trying to make a Megaman-like game)

-I want the character to show its "hurt" sprite when hit but I'm not seeing a way other than "Hurt Reaction" in the Details section of Object details. I'm just not sure how to set a certain sprite to one of the "HurtReaction" options.

-When firing a projectile, I want the Sprite to change to its shooting animation but it just shows it's static one. I'm looking to apply this for while moving and crouching. (Ex. Megaman changes only his arm when shooting while standing &/or walking)

-When I jump, I noticed if I keep pressing jump, My character keeps going up. Is there a way to make it where It won't do that?

-When my character dies, it shows its death sprite but it hops & floats in the air. I want to have the death sprite show in the spot it died & not hop or float. (ex. Bucky O' Hare Character Death)

-Also curious about sprite layering for the character. I had 4 colors but I forgot I need one of the palettes to be black.

Thank you for taking the time in reading this. This got the adrenaline going for me :lol:
 

Dirk

Member
Hi!

I like your questions, because they overlap with some of mine :)

I remember that I used this to stop the flying http://nesmakers.com/viewtopic.php?t=744 but that script was ment for an older version of NESmaker, so I don't know if it'll work with 4.1.5. In my current game prototype the player doesn't fly, but jumps up and down about the height of 1 tile, when the turbo button is being pressed.

Also curious about sprite layering for the character. I had 4 colors but I forgot I need one of the palettes to be black.

I think the best thing you can do is to redesign your character to only use 3 colors, even if it seems hard or impossible at first. With sprite layering you'll lose (depending on the size of the overlaid sprite of course) at least one of 8 sprites per horizontal line and your overall sprite count gets reduced. So you'll experience flicker sooner, you'll have to make your enemies smaller or use them less often. Also lag might be introduced sooner.

But it is possible. If I'm not mistaken jorotroid used sprite parenting in his game Witch City http://nesmakers.com/viewtopic.php?t=621 .
You could use his technique to have a sprite follow your character perfectly and having seemingly a higher color count for your player.

Ah, I remember CutterCross adapted jorotroid's technique for sprite layering in Tower of Turmoil: http://nesmakers.com/viewtopic.php?p=7756#p7753

I don't know if jorotroid ever made a tutorial for it though.
 

Viro

New member
So far thank you for the people on discord for their input. Got the character to do a lot of the requested stuff. Now just trying to refine some more stuff.

@Dirk Yeh I was checking the links but sadly didn't see tutorials for the sprite layer method. Seems like some messing around with scripts. (Sadly I know nothing about Asm coding but slowly trying to understand as I go)

Jumping, walking and shooting while standing are working ok. Now just need assistance with stuff I notice isn't working right:
-Crouching, Shooting while crouching (i've attempted to use the code from another post but it might be outdated)
-Shooting while moving, jumping and moving while jumping (does the standing shoot instead)
 

Raftronaut

Member
Viro said:
Hello. Finally dipping my toe into this and I came to a bit of a road block with certain things. Apologies if this is lengthy
(I'm using the Scrolling Platform Module. In short, trying to make a Megaman-like game)

-I want the character to show its "hurt" sprite when hit but I'm not seeing a way other than "Hurt Reaction" in the Details section of Object details. I'm just not sure how to set a certain sprite to one of the "HurtReaction" options.

-When firing a projectile, I want the Sprite to change to its shooting animation but it just shows it's static one. I'm looking to apply this for while moving and crouching. (Ex. Megaman changes only his arm when shooting while standing &/or walking)

-When I jump, I noticed if I keep pressing jump, My character keeps going up. Is there a way to make it where It won't do that?

-When my character dies, it shows its death sprite but it hops & floats in the air. I want to have the death sprite show in the spot it died & not hop or float. (ex. Bucky O' Hare Character Death)

-Also curious about sprite layering for the character. I had 4 colors but I forgot I need one of the palettes to be black.

Thank you for taking the time in reading this. This got the adrenaline going for me :lol:


Hey Viro, I believe we discussed some of these on the discord chat? Like Player Death and the hurt animation? I forget if those were solved.

Dirk's answer about the sprite layering is very accurate. You can technically chain some together, but it would need to be coded as such and causes a whole host of other unforeseen troubles down the road. I would advise you to simply practice using the 3 color sprites for now, but also be advised you can use the 2nd player object palette as well (these palettes can only be changed when viewing player object 00). The hard NES-limitation here is that you can only have 1 of the 2 palettes in an 8x8 sprite tile at a time, so if they dont need to overlap you can use both palettes :)

For example, since you are making a platformer you could divide the character in half and assign the 1st 3 color palette for Hair/Skin-tone/Shirt and the bottom half could be the 2nd palette for Pants/Shoes/Shadow...you'd then have what is essentially a 6 color sprite.. Or, you could assign an entire palette to just the players head to get the extra color. Keep in mind as well, all the player objects would need to share those two palettes as well..

I am away from nesmaker at the moment so I cannot share any screenshots, but in Player object 0 (your player) you should be able to define the colors of both palettes, then elsewhere in your game object branch when setting up animations for player objects you can select the palette on the left as you load the pixels with CHR data on the right...

as I mentioned before, I have never used the platformer module so some of your other questions I have no experience with to comment, but any general NESmaker advice I am happy to give :)
 

Dirk

Member
Viro said:
-Also curious about sprite layering for the character. I had 4 colors but I forgot I need one of the palettes to be black.

I completely forgot to mention this and I don't know if you've already thought about it or knew it.
You don't have to use only one palette for your character. You can use the second sub palette too.
Of course this comes with trade-offs.
A palette is restricted to an 8x8 area for your character so your second palette might have to use one or two colors of the main palette so you can make smooth transitions between tiles.
Also I think your projectile and melee weapon use the same sub palettes as your character does.
 
Top Bottom