How can i rotate a Bitmap?

Killer_Van

Stupid Person
Member
Joined
Jul 19, 2018
Messages
20
Reaction score
2
First Language
italian
Primarily Uses
RMVXA
For a project I need to overlap a lot of bitmaps, and a few of them should be rotated.
I found that there is a method call 'angle' to rotate sprite, but for the bitmap?
The picture will never appear on the screen, another script will use that to animate a character.
I thought that in the internet i would found a solution, but i don't.
Can someone help me?
P.S. Sorry for my english, i'm italian
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
Not a method. A method is a function tied to an object.
A variable tied to an object is called object property.

Nevertheless, I don't think you can actually rotate a texture natively. I think you can rotate a canvas, so a possible, but slow solution could be to have a texture on a new canvas, rotate it and then blit it. But I'd stick to sprite rotation instead.
 

Killer_Van

Stupid Person
Member
Joined
Jul 19, 2018
Messages
20
Reaction score
2
First Language
italian
Primarily Uses
RMVXA
Sorry, but what do you mean with i'd stick to sprite rotation?
What would you do?
I don't know what a canvas is.
I'll search about that...
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
whoops, my bad. It's VXAce, I forgot.
Still, can you just assign the bitmap to a sprite and rotate the sprite instead?
 

Killer_Van

Stupid Person
Member
Joined
Jul 19, 2018
Messages
20
Reaction score
2
First Language
italian
Primarily Uses
RMVXA
So...
Can you already help me?
Thank you in advance
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
I don't use VXAce, so VXAce rendering is too advanced for me without studying it. Nevertheless, why don't you connect the bitmap to a sprite and then rotate the sprite? Or your rendering system requires that it's bitmaps that you're dealing with?
 

Killer_Van

Stupid Person
Member
Joined
Jul 19, 2018
Messages
20
Reaction score
2
First Language
italian
Primarily Uses
RMVXA
The only problem is that: I can rotate a sprite, but i need to rotate a bitmap, because then i'm gonna overlap that bitmap with another.
And i can't overlap a sprite on a bitmap.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
You cannot rotate the bitmap. You either
1. Use sprite for rotation (if you want to overlap it, you can just create a different sprite to stack em together)
2. Create a different image

I honestly have no idea why you cannot stick on the sprite rotation. And what you're going to use it. You said the sprite is never meant to be shown, but you said it will also be used in another circumstance. Please elaborate on what you're trying to do. Sometimes a workaround can be done by using existing methods.
 

Killer_Van

Stupid Person
Member
Joined
Jul 19, 2018
Messages
20
Reaction score
2
First Language
italian
Primarily Uses
RMVXA
I need to create an animation picture: a long picture with a lot of frame in a row.
The idea is give the 1 frame and let the script make the other (moving and in same cases rotating the first frame)
I done the first, the second, the third and the fourth, but for the fifth i need to rotate the first frame.
If i create a sprite it will appear on the screen right?
Or can i use it like a bitmap? Just like i'm using it now?
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
I still don't get the idea why you would need a rotate bitmap.
You have one bitmap, for one frame. Then the rest you want to rotate it.
Why can you just rotate one sprite by using one frame bitmap instead of TRYING to generate other frames?

You have
> 1 sprite
> 1 bitmap (for one frame)
> you assigned the bitmap into the sprite
> you just need to rotate that one sprite
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
@Killer_Van what has been said is completely true. From what I can see you have no real reason for not using a sprite. Creating a sprite, assigning it a bitmap and then rotating the sprite is the way to go, at least as far as we can read. If you are having problems with English and you don't know how to properly convey what you are trying to achieve feel free to send me a pm, I'll try to help you in a language you are more familiar with.
 

Killer_Van

Stupid Person
Member
Joined
Jul 19, 2018
Messages
20
Reaction score
2
First Language
italian
Primarily Uses
RMVXA
Sorry, I'm back.
------------------------------------------------------------------------------------------------------------------------------------------------------------
I Have:
1 empty bitmap (the empty box where i'll put the other bitmaps)
1 bitmap (the first frame)
------------------------------------------------------------------------------------------------------------------------------------------------------------
I need to:
1(the first frame)- Take the first bitmap and put it in the empty bitmap with the object property blt (using the right coordinates).
2(the second frame)- Take the first bitmap, rotate it and put it in the bitmap (using the right coordinates).
-Fill the box with the other frames.
------------------------------------------------------------------------------------------------------------------------------------------------------------
At the end i will have:
A big bitmap that contains all the frames.
Another script will take this bitmap and will animate something in the game.
------------------------------------------------------------------------------------------------------------------------------------------------------------
Questions:
1- If i create a Sprite and i rotate it, how can i overlap them together?
2- The other script wants a bitmap not a sprite.

Thank you for the patience.

I know that i'm not really good writing english but i need to practise so Heirukichi Grazie, ma, No grazie.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
There're two approaches, and it is not about making a new bitmap using script.
1. You make new bitmap by using any editing software, put the frame manually using your own judgment.
2. You edit this "another script" to force it using rotation instead of frames.

I'm not sure what do you mean by overlap, to be honest.
Tell me why the second approach is not possible. Or are you having trouble editing how this "another script" works?

And if it is not clear already, I'm gonna bluntly said again.
It is not possible to rotate bitmap.
 

Killer_Van

Stupid Person
Member
Joined
Jul 19, 2018
Messages
20
Reaction score
2
First Language
italian
Primarily Uses
RMVXA
Ok thanks i'll do number 1
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top