Multiple Viewports

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
156
First Language
Korean
Primarily Uses
RMMV

Multiple Viewports 1.2.1
By Biud436

Introduction
This plugin provides the multiple viewports

Features
- This plugin can only use in PIXI 4.0.0 or more.

Video


How to Use

Download the plugin and place it in the folder called your_project_directory/js/plugins.
Then In Plugin Manager, Select the RS_MultipleViewports plugin and add it.

Plugin Commands

This is a plugin command that can activate the multiple viewports. If you call this plugin command, You can be using the multiple viewports.

Code:
 MultipleViewport Enable
This can disable the multiple viewports. If you call this plugin command, You can be using original stage renderer. But, Note that any drawing object of previous view-port is not removed in memory so if you will need it, you try to call the 'MultipleViewport ClearImage ViewID' plugin command.

Code:
 MultipleViewport Disable
This is the plugin command that can set the power of the viewport shake.

Code:
 MultipleViewport StartShake shakePower
This is the plugin command that can set the end of the viewport shake.

Code:
 MultipleViewport EndShake
This is the plugin command that can set an image of certain viewport (View ID is number between 1 and 4)

Code:
 MultipleViewport Image ViewID ImageName
This is the plugin command that can delete the image of certain viewport (View ID is number between 1 and 4)

Code:
 MultipleViewport ClearImage ViewID
This is the plugin command that can set the video to certain viewport.
Note that the file type should set the WEBM(.webm)

ViewID is the number between 1 and 4.
szSrc Indicates the video name from the movies directory.
loop allows you to set with the true or false.
You can repeat the video via this value. (If you are omitted this loop value, its video will only play once)

Code:
 MultipleViewport Video viewID szSrc loop
This command moves back x seconds from current video position.

Code:
 MultipleViewport MoveBackSeconds viewID second
This command moves forward x seconds from current video position.

Code:
 MultipleViewport MoveForwardSeconds viewID second
This is the plugin command can play the video to certain viewport.

Code:
 MultipleViewport PlayVideo viewID
This is the plugin command can stop the video to certain viewport.

Code:
 MultipleViewport StopVideo viewID
This is the plugin command can pause the video to certain viewport.

Code:
 MultipleViewport PauseVideo viewID
This is the plugin command can remove the video to certain viewport.

Code:
 MultipleViewport ClearVideo viewID
This plugin command allows you to change a display position of the viewport
'viewID' is the number between 1 and 4.
If 'EventID' is same as -1, the viewport target will set as the game player. if not, it will set as certain event.

You might wonder what happens to the viewport after this command has executed.

By default, the viewport is stored the id of certain target and it is tracking available its position until before moving as the next map. if it is also not set specific target id to certain viewport, it will set as the player position. The target can belong to an instance of ViewportTarget(the object that can control display's position as target's position) and each instance will set an inner position of the viewport by using the function called $gameMap.setDisplayPos.​
Code:
 MultipleViewport Target viewID EventID

Plugins

This plugin can be downloaded in the following link.

Github RAW

Change Log

2016.06.13 (v1.0.0) - First Release.
2016.08.24 (v1.1.0) - Now RPG Maker MV 1.3.0 or more is supported.
2016.08.24 (v1.1.2) - Added Plugin Commands
2016.08.25 (v1.1.4) - Added the functions that sets an image of certain viewport.
2016.09.30 (v1.1.5) - Added the function that plays the video to certain viewport.
2016.10.01 (v1.1.6) - Added the rendering code that is compatible with the canvas mode.
2016.10.20 (v1.1.7) - Fixed the issue that is not working in RMMV 1.3.2
2016.10.23 (v1.1.8) - Fixed the issue that the video frame is not updated in PIXI 4.0.3
2016.11.24 (v1.1.9) - Now this can change the viewport orientation such as portrait, landscape and can also set the number of viewports.
2016.11.26 (v1.2.0) - Added certain code to remove the texture from memory.
2017.02.08 (v1.2.1) :
- Added new function that could change the inner position of certain viewport by using the function called $gameMap.setDisplayPos.
- Fixed an issue that is remaining the previous texture in certain viewport if the user sets the same thing again to certain viewport when playing the video in certain viewport.
- Converted some sources to ES6

Credit and Thanks
- Biud436

Terms of Use
Free for commercial and non-commercial use.
 
Last edited:

Wookiee420

Veteran
Veteran
Joined
Apr 2, 2016
Messages
294
Reaction score
131
First Language
English
Primarily Uses
Looks cool that you can do that, but why? Like what would be the use in your game? I'm curious cause its a cool idea
 

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,907
Reaction score
1,290
First Language
English
Primarily Uses
RMMV
@Wookiee420 Off the top of my head puzzles come to mind. Say you need to see water rising and lowering in another area without jumping back and forth between maps or making it guess work for the player. You have the picture show up telling you what the current water level is. Or maybe you have a riddle or puzzle that needs consent reviewing so instead of having the player run back to the same spot, you can just show the image and they can work it out without having to constantly run back and forth.  
 

Wookiee420

Veteran
Veteran
Joined
Apr 2, 2016
Messages
294
Reaction score
131
First Language
English
Primarily Uses
never thought of that, thats cool
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,615
Reaction score
1,417
First Language
French
Primarily Uses
RMMV
nice work friend !!! very nice work !
 

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
156
First Language
Korean
Primarily Uses
RMMV
@Wookiee420 A Multiple Viewports plugin can appear outer landscape and inner image of specific decoration in detail. In the adventure genre game, this plugin can also give the hint to someone that might be wandering about aimlessly via the viewport image. In Addition, All Images are always maintaining the setting of the image from the viewport unless you can delete the image.
 
Last edited by a moderator:

Wookiee420

Veteran
Veteran
Joined
Apr 2, 2016
Messages
294
Reaction score
131
First Language
English
Primarily Uses
"All images are always maintaining the setting of the image from the viewport unless you can delete the image." What? That sentence is confusing to me
 

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
156
First Language
Korean
Primarily Uses
RMMV
"All images are always maintaining the setting of the image from the viewport unless you can delete the image." What? That sentence is confusing to me


So again, If you've got a viewport configured to be image, that image will be not delete, until exiting the game, unless you directly delete that image via plugin command. and I'm so sorry for my limited knowledge of English.
 

Wookiee420

Veteran
Veteran
Joined
Apr 2, 2016
Messages
294
Reaction score
131
First Language
English
Primarily Uses
ahhh i get it...dude dont trip, english is my first language and i'm not good at it :p
 

Black Mamba

Veteran
Veteran
Joined
Mar 6, 2014
Messages
262
Reaction score
79
First Language
pt-br
Primarily Uses
Ow!


Now we can make 3DS games :D  or local multiplayer


if i change the screen to other maps, it will run the events in this map?
 

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
156
First Language
Korean
Primarily Uses
RMMV
Ow!


Now we can make 3DS games :D  or local multiplayer


if i change the screen to other maps, it will run the events in this map?


It is not. If you move to other map, this plugin will redraw the RenderTexture that is copying your screen.


That's because RPG Maker MV runs the only one scene.


So this means that you can draw the only one map to your screen.
 

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
156
First Language
Korean
Primarily Uses
RMMV
v1.15 Updated :  Added the function that plays the video to certain viewport.


v1.16 Updated : Added the rendering code that is compatible with the canvas mode.

 
Last edited by a moderator:

Kest

The Ecstasy of Gold
Veteran
Joined
Dec 4, 2014
Messages
148
Reaction score
24
First Language
English
Can you use this to have a map on one half of the screen and a menu/dialogue on the other?
 

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
156
First Language
Korean
Primarily Uses
RMMV
Can you use this to have a map on one half of the screen and a menu/dialogue on the other?


It is impossible. I think that its render code is so complicated.
 

SeagullKing

Villager
Member
Joined
Oct 11, 2016
Messages
14
Reaction score
2
First Language
English
Primarily Uses
This is a VERY interesting plugin.  As somebody who is working on a game that involves spacetravel, it might be cool to have scenes that show what is going on in space at the same time that Earth stuff is going on.


Thanks for your contribution! If I end up using it, I'll post something here in the future. 
 

Kest

The Ecstasy of Gold
Veteran
Joined
Dec 4, 2014
Messages
148
Reaction score
24
First Language
English
I can't think of anything you would actually use this for in a real game. Maybe a world map on half the screen for a labyrinth or zeldalike game? 
 
Last edited by a moderator:

Jomarcenter

jomarcenter-MJM
Veteran
Joined
Apr 24, 2012
Messages
1,243
Reaction score
183
First Language
ENGLISH
Primarily Uses
RMMV
I can't think of anything you would actually use this for in a real game. Maybe a world map on half the screen for a labyrinth or zeldalike game? 
Well you can think of special puzzle like 4 people in separate areas and trying to solve one main puzzle.
 

Black Mamba

Veteran
Veteran
Joined
Mar 6, 2014
Messages
262
Reaction score
79
First Language
pt-br
Primarily Uses
Well you can think of special puzzle like 4 people in separate areas and trying to solve one main puzzle.

It is not. If you move to other map, this plugin will redraw the RenderTexture that is copying your screen.


That's because RPG Maker MV runs the only one scene.


So this means that you can draw the only one map to your screen.
 

Kest

The Ecstasy of Gold
Veteran
Joined
Dec 4, 2014
Messages
148
Reaction score
24
First Language
English
Well you can think of special puzzle like 4 people in separate areas and trying to solve one main puzzle.


Not possible as Black Mamba pointed out. Seems to be too many limitations for this mod to ever be used
 

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
156
First Language
Korean
Primarily Uses
RMMV
v1.18 Updated : There was a problem that the video frame is not updated. But now it has fixed its issue.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I'm back to the bugs.
100 bugs in my coding,
take one down,
fix it up,
132 bugs in my coding.
On the plus side, if all this rioting sparks another Covid outbreak... I will have a whole lot of time to work on my game. Not exactly how I wanted to get that time, but hey I'm a glass is half full... of RM kind of guy. :LZSwink:
A video once in a while won't hurt.
Have a craving for a Nesquik milkshake. No idea why. Haven't had one since I was a kid. lol. I remember them kinda tasting nice, but also leaving a lot of nasty powder at the bottom of the cup.

Forum statistics

Threads
98,070
Messages
949,013
Members
129,341
Latest member
Shinkukae
Top