Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Need help animating Megaman to the left because of source rect (not darkbasic)

Author
Message
Evil Booger
20
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: My evil lair
Posted: 3rd Mar 2007 23:10 Edited at: 3rd Mar 2007 23:13
Wow I don’t like asking for help but I am having problems programming a Megaman Clone using the sprite sheet I got from the Internet. Ok I found the pixel coordinates for the sprite to make a walking animation, attacking animation and even jumping, but only facing to the right.

The walking animations are just fine because they need no extra space[figures 1 and 2] But not the attacking animation.

When the sprites are facing right and they need more space because of the sword extending[figure 3], I just add a dozen or two pixels to the source rectangle’s width. But when the player is facing the left, you must add to the source rectangle width[figure 4], and subtract from the source rect’s x position. But that makes the player jump back.

The pic with the 'figures' is attached and here is the url just in case you like it better or something.
[img]http://www.freewebs.com/demonface/FWThumbnails/megaman problem 1.gif[/img]

If you can understand me, please help.

boogers will take over the world
Zergei
21
Years of Service
User Offline
Joined: 9th Feb 2005
Location: Everywhere
Posted: 4th Mar 2007 18:08
I also working on some MMZ type of game, thought im using Zero's graphics as a standby.
I came across that problem and solved it using offset variables for each image. I set a reference point for the character, in my case between its feet, and then offset each image to get along with that reference. I saved it on an array and whenever i got to position my sprite i add its image offset. That way the body stays where it should.
Now on to a heacier problem. When analysing the MMZ games, especially MMZX, a realized that the players sprite was actually divided in at least 3 parts and from time to time 4 or 5. What i mean with this is that all those parts are separate images, they're not just 1.
1st one is the body, regards legs, torso and arms (im checking now if the arms are not a separate part, as so the legs)
2nd is the head
3rd is the back (Zero's hair, Harpuia's thrusters, Phantom's scarf, Fefnir's Crushers, Leviatan's aqua-thrusters.)

Also, sabers are also a separate image, as they are used to check for damage done to enemies.
As i came across this, i realized that those sheets i found on the web had to be redone acoording to this. Some stuff would be easy, other stuff not so...

That's about some of what i had to investigate while doing this game, if ya got any sugestion or need help, just say so.

Further on my stuff at...

Login to post a reply

Server time is: 2026-07-05 14:14:24
Your offset time is: 2026-07-05 14:14:24