Arctica

Veteran
Veteran
Joined
Jul 19, 2021
Messages
186
Reaction score
302
First Language
English
Primarily Uses
RMMZ
Edit: Too complex.
 
Last edited:

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,013
Reaction score
2,351
First Language
Dutch
Primarily Uses
RMMV
you shouldn't remove the original text, as some could provide
information about it, and maybe not that complex at all :)

depending what it was.
 

Arctica

Veteran
Veteran
Joined
Jul 19, 2021
Messages
186
Reaction score
302
First Language
English
Primarily Uses
RMMZ
you shouldn't remove the original text, as some could provide
information about it, and maybe not that complex at all :)

depending what it was.
Basically I drew a parallelogram (on the canvas) that I don't know how to then put a characters face on it. It just comes out as a seperate bitmap. To get a turn order window designed the way I want, I have to draw 9 parellelograms (not on their sides but standing up)

The original code is here:
JavaScript:
Bitmap.prototype.drawParallelogram = function(color) {
    const ctx = this.context;
    ctx.save();
    ctx.fillStyle = color;
    ctx.beginPath();
 

    ctx.moveTo(100, 150);
    ctx.lineTo(100, 250);
    ctx.lineTo(150, 200);
    ctx.lineTo(150, 100);
 
    ctx.fill();
    ctx.restore();
    this._baseTexture.update();
 
};
All that was before I started reading this: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API

and learned some additional things like clipping, which would allow me to draw things within that bitmap and clip the exterior(only things inside the bitmap "shape" is displayed). So I'm working out the math to build a parallelogram of any height/width(not finished).

Unfortunately I don't know how to "translate" that information I learned into the 'engine JS' if that makes sense. I can't seem to take the window's default bitmap and 'transform it'. Furthermore, I can create a new bitmap but I can't draw it the same way I can like in the above code as none of those methods will work on this.contents.

tl;dr : Everything in Rpgmaker JS is a rectangle, but outside of that, I can draw any shape I want.. and can't do anything with it because I don't know how.

Also, by parallelogram, I mean the standard shape(since Parallelogram is more like a conditional name for any shape with equal sides/opposite equal sides but are parallel to each other).
 
Last edited:

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,013
Reaction score
2,351
First Language
Dutch
Primarily Uses
RMMV
I dont have MZ as that function dont exist in MV, but if you
had left the code in your first post, you might had a respond
on how to approach it though or give some guidance.

while it doesn't exit in MV and very low knowledge on bitmap,
I cant help, but someone might know the answer to it on
how to draw it or a possible way.
 

Arctica

Veteran
Veteran
Joined
Jul 19, 2021
Messages
186
Reaction score
302
First Language
English
Primarily Uses
RMMZ
Actually that can be done in MV as well.. in anycase this is a matter I've opted to tackle myself.
 

Latest Threads

Latest Profile Posts

My game has a (much needed) tutorial now...
Game Making Every Day #20:kaohi:

ScreenShot_8_14_2022_11_55_51.png
FINALLY added the comic bubble to the Title Screen...
I know I'll put one of my game's sprites here to give the illusion that I am a productive member of game society.
handelspriteanim.gif

Forum statistics

Threads
124,507
Messages
1,164,110
Members
163,332
Latest member
Gaggo
Top