Author Topic: Sprite Help  (Read 2525 times)

Goowolgo

  • Regular
  • **
  • Posts: 21
    • AOL Instant Messenger - CaseyAAdams
    • View Profile
    • Facebook
    • Email
Sprite Help
« on: 2008-01-27, 01:43:08 PM »
So in my project my sprite has a few states:
Walking Left
Walking Right
Jump Right
Jump Left
Stand right
Stand Left
Crouch Left
Crouch Right
Crouch Walk Left
Crouch Walk Right

As of right now I haven't added the picking up guns, but eventually I would like to get to that point. I see this big bottleneck of work coming up though. Right now my sprite is just carrying a rifle, but eventually he will be able to pick up a shotgun, pistol, etc. What would be the easiest way to go about this? The only way I know how to do this is maybe making a new sprite for each weapon carried. I also recently took a look at that fighting game remake and I saw that the foot of the guy was a separate sprite. How could I make my character be two sprites like that? Torso and legs. My torso wouldn't have animations really, but when I pick up a gun I could switch to a frame in that sprite? That way I could only have one sprite of legs, and then the top sprite with the guns. Or maybe there is an even easier way I can't see. I'm all ears.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Sprite Help
« Reply #1 on: 2008-01-27, 09:35:19 PM »
If you make gun sprites that are the right size to be positioned right on the player sprite and draw the gun in the player's hands, then you can use MatchSpritePosition (in a Plan rule) to make the gun sprite follow the player's hands.

Goowolgo

  • Regular
  • **
  • Posts: 21
    • AOL Instant Messenger - CaseyAAdams
    • View Profile
    • Facebook
    • Email
Re: Sprite Help
« Reply #2 on: 2008-01-28, 08:55:14 AM »
I like your suggestion but the hands of the character change placement...rocket launcher has my hands propping it up on my shoulder, but would I use the match sprite position for the torso to legs part?

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Sprite Help
« Reply #3 on: 2008-01-28, 12:36:19 PM »
The hands/arms could be part of the weapon sprite, and probably should be, if you have guns that are held in different ways.  I don't think the torso and legs should be different sprites, however.

Another option is to just switch to a different sprite with all the same rules when switching weapons, the downside being that you don't have the ability to change the rules of different sprites all at once.
Edward Dassmesser