RPG Maker Forums

Hi, I've been trying to emulate the movement of a pendulum and it's proving to be rather hard. I have managed to do something that resembles it but if I make it move faster the change of movement feels too abrupt, and the Y coordinate is hard to keep steady (I tried to anchor it).

Here I'm using a birdscage instead of a pendulum (I didn't make the picture).

Here is the mini video LINK

The question is: does anyone know if there is a better way to approach this? Or something to emulate the "cushion" movement on the edges?

This is how I have it now (Custom Scene_Title):

I load 2 pictures, one static (the "holder") and the other the chain&body together. Then I anchor the Y of the moving picture to the middle as precise as I can and rotate it.

Code:
Scene_Title.prototype.create = function() {
        Scene_Base.prototype.create.call(this);
        this.createBackground();
        this.createPendulo(); // Here I create the 2 pictures.
        this.createForeground();
        this.createWindowLayer();
        this.createCommandWindow();
        this._commandWindow.opacity = 0;
        this.createPictureCommands();
    };

Scene_Title.prototype.createPendulo = function() {
        this.createJailChainAndBody(); //Moving
        this.createJailHolder(); //Static
    };
   
Scene_Title.prototype.createJailHolder = function() {
        this._jailHolder = new Sprite();
        this._jailHolder.bitmap = ImageManager.loadPicture('JailHolder');
        this._jailHolder.x = 600;
        this._jailHolder.y = 0;
        this.addChild(this._jailHolder);
    };

Scene_Title.prototype.createJailChainAndBody = function() {
        this._jailChainAndBody = new Sprite();
        this._jailChainAndBody.bitmap = ImageManager.loadPicture('JailChainAndBody');
        this._jailChainAndBody.x = 610;
        this._jailChainAndBody.y = 20;
        this._jailChainAndBody.anchor.x = 0.50;
        this._jailChainAndBody.anchor.y = 0;
        this.addChild(this._jailChainAndBody);
    };

Scene_Title.prototype.update = function() {
        if (!this.isBusy()) {
            this._commandWindow.open();
        }
        Scene_Base.prototype.update.call(this);
        this.updatePictureCommands();
        this.updateJailChainAndBodyPosition(); // Here I Update the Chain&Body Picture.
    };

Scene_Title.prototype.start = function() {
        Scene_Base.prototype.start.call(this);
        SceneManager.clearStack();
        this.centerSprite(this._titleBackground);
        this.playTitleMusic();
        this._isGoingRight = false; // Here I define the condition for the movement
    };

Scene_Title.prototype.updateJailChainAndBodyPosition = function() {
        if (this._isGoingRight === false) {
            this._jailChainAndBody.rotation += 0.0002;
            if (this._jailChainAndBody.rotation >= 0.0100) {
                this._isGoingRight = true;
            }
        }
        if (this._isGoingRight === true) {
            this._jailChainAndBody.rotation -= 0.0002;
            if (this._jailChainAndBody.rotation <= -0.0100) {
                this._isGoingRight = false;
            }
        }
    };

Latest Threads

Latest Posts

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,455
Members
137,821
Latest member
Capterson
Top