Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Rmxp Sprite Rotation methods.

I don't know if there is what i am asking for but....
Does RMXP have sprite rotation methods?
Like rotate the sprite in any angle?
IF not would it be possible to create such script?
 
The Sprite class has a rotate method, but it only rotates from the top-left corner of the sprite.

I am working on a few rotate method in the Bitmap class (pixel by pixel transfer :(), so I will add something for the Sprite class as well.
 
@Seph: ok I will wait for your script edition whatever. because i need it to be pixel by pixel. Since this is for a 360º engine,it will rotate the sprite depending on the slope angle(still working in the formula to check the slope angle lol.

Note: when i say 360º engine it doesn't mean 3d... I mean you can make loops and other things. If I ever can accomplish this...:(

Trick: with that thing you said... can I rotate the sprite in angles,smoothly?
 
Do, sprite.ox = sprite.bitmap.width / 2, sprite.oy = sprite.bitmap.height / 2. This sets the origin of the sprite to the centre. Now when the image is placed it is placed at the centre (not the top left corner) and when you set the sprite.angle (degrees) it rotates around the centre of the sprite, if you want it to be smooth just add a few degrees each frame.
 

arev

Sponsor

@Chaosg1: making 360 degrees system is in my opinion pointless. let's assume the hero sprite would turn around at a speed of 1 deg/frame - making a full circle would take 9 seconds. how "undynamic" is that! for a great control over rotating the sprite I'm sure 5 or 10 deg/step would surely be enough :)
 
Thanx for replying... But when i said smooth, I wasn't saying one degree per second... i just was saying like so that the character doesn't jump when rotating... hard to explain i hope you get it..
@verbally i will try that....
 
I hope you can make the engine, maybe it should rotate at say 10 degrees or so and try to make it arond 12FPS just so it dont look like its overlagging, its a great idea though.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top