OcRam - Layers plugin [v1.06 updated 2019/09/07]

Discussion in 'JS Plugin Releases (RMMV)' started by OcRam, Apr 16, 2019.

  1. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    281
    Likes Received:
    342
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Introduction:
    I have tried to make this plugin as light-weighted as possible. You have 3 layers to play around with auto-fading, transparency and possibility to scroll (horizontal/vertical/both) and/or bind layer to map or screen. In addition you get possibility to add sprites to 3 different map bound layers!

    Why not more layers? To have more layers on screen might get really messy (some times even these layers are too much!). In addition small fixed size of layer array gives more processing speed to other tasks.

    This plugin is not new one and I have used it only for my own projects (made some commenting and re-typed some plugin parameters). I thought that it's time to kick-off this plugin to the big big world. I hope you enjoy it as I have! :kaoluv:

    Here's what you need:
    1. This plugin
    2. Add graphics to correct folders (specified in plugin params)
    3. Use plugin commands / JS to show layers in game!

    Latest version - v1.06 (released 2019/09/07)
    • Removed some unused variables.
    Previous versions:
    • New parameter [fade] to plugin command "clear_layer".
      Fade value like other fades in this plugin is given as gain/lose X opacity per FRAME
      example instant clear: clear_layer 0 255
      example slow clear: clear_layer 0 0.5

    • Done some more pre-calculations on scroll event
    • Battle weather works again... (if Weather_EX is used)
    • Fixed bug where sprites above characters layer didn't work (was always below)
    • Fixed bug where sprite align didn't work with plugin commands (was always 7)
    • Sprites >> width and height parameters are no longer needed!
    IMPORTANT! Disable any layers that you do not want to inherit to battle scene! But you might want to inherit for example your fog/sunray layers to battle screen.

    You also might to want set ON parameter "Use only parallax mapping", if tile mapping is not used.

    battle_layers.png

    Just add BACKGROUND parallax as you would normally (!file_name):
    setting_bg.png

    parallax.png

    Add new tileset and load above tileset image to A5 section
    Type <parallax> to tileset note -field (this will force parallax optimization if it is not in use for all tilesets).
    Define passabilities, bushes, ladders, counters, damage floors etc...
    Save tileset and start using it! :)

    Example:
    setting_up.png

    Closer look at 4-dir passabilities:
    4-dir.png

    Donation pricing model is no longer allowed on these forums (because it's not legal in some countries). That is the only reason I have to change my pricing model to paid-commercial-use. I really would have liked it to keep it old way, but law is law.

    If you have downloaded this plugin before this change to Terms of Use, you are free to follow those terms. And if you download current version please follow latest Terms of Use.


    Terms of Use
    Non-commercial: Free to use with credits to 'OcRam' for using this plugin.
    Commercial use: See details below
    License must be obtained BEFORE you start to DISTRIBUTE your game. Even if you obtain commercial license; copyrights still remain as they are. NOTE: If you gain money with your game by any means (crypto-mining, ads, purchase incomes, micro-transactions etc...) it is considered commercial use of this plugin!

    License types (licenses are per project):
    • Standard: 4.99 EUR - Paid in full (credits to ”OcRam” is required for using this plugin)
    • No credits: 39.99 EUR - Paid in full (credits not required)
    To obtain license:
    Mention which plugin license you want to purchase and your project name.
    PayPal link: https://paypal.me/MarkoPaakkunainen

    To obtain several licenses with discount: Each license purchased will reduce next plugin price by 2€ until minimum price of 2€ per license. Discounts can be used on any OcRam -plugin.

    After payment: I will send you verification e-mail that you may use this plugin commercially in project: [Your_project_name_here] with [license_type].
     

    Attached Files:

    Last edited: Sep 7, 2019
    #1
  2. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    281
    Likes Received:
    342
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Hello,

    Latest version - v1.01 - is now released

    New plugin command (edit: ment parameter) to optimize parallax mapping (Use only parallax mapping) if this parameter is on/true it will disable tile based drawing and give even more power to parallax mapping. Thank you @Parallax Panda for the idea!

    Also fixed "Debug mode" bug
     
    Last edited: Apr 19, 2019
    #2
    Parallax Panda likes this.
  3. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    281
    Likes Received:
    342
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Hello again,

    I'm suprised how much attention this plugin got and based on user requests I have made following changes to this plugin. Thank you for the feed back!

    Latest version - v1.02 (released 2019/04/17)

    • Get tile width and height from system data
    • If parallax mapping is used, don't even load tileset
    • Also added new meta tag <parallax> to TILESET note to enable parallax mapping when this tileset is used!
    • New plugin params to define which layers are inherited to battle scene!
     
    #3
    Parallax Panda likes this.
  4. Parallax Panda

    Parallax Panda Got into VxAce ~2014 and never stopped... Veteran

    Messages:
    636
    Likes Received:
    1,001
    Location:
    Fukuoka, Japan
    First Language:
    Swedish
    Primarily Uses:
    VNM
    Wow, great. I've got a few dummy questions though.

    Firstly, what's the difference between "Layer Image" and "Sprite Image"? I know what a sprite is but I'm not 100% clear on what this means for my parallaxing.

    Second question, If I understand it correctly you advice that we use a normal parallax image (with an "!" mark to fix it) as the background. And then use the layers in this plugin for additional effects such as creating overlays (what goes above the player) and sunrays, fog, etc? And if the Z parameter is set to 0 the image is drawn above parallax layer but below everything else, if set to 1 it's drawn above player and if set to 2 it's drawn above everything. Right?

    So in theory that leaves us with 4 layers, one as per default through the engine (normal parallax layer) and 3 more through this plugin. And we could use an image with the Z value of "0" to draw the background if we wanted to use the parallax layer for a normal scrolling parallax image effect as well.

    I'm not missing or confusing something I hope?
     
    #4
  5. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    281
    Likes Received:
    342
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Thank you for the message,

    Layers
    have background image and they can be scrolled / bound to screen etc...
    Sprite layers are always bound to map and they have no BG image the idea for these layers is to load smaller pictures (sprites) with Z-index.

    You actually got total of 6 layers (1 parallax, 3 OcRam layers + 2 OcRam sprite layers), but yes you got 4 layers where you can set BG (edit: or foreground) graphics.

    Z value 0 (below characters) is only for Sprites. But I can make new plugin parameter "Send layer 0 to back" which could throw it above normal parallax, but under tilemap. I try to do it in few hours (got some spare time atm :)).
     
    Last edited: Apr 19, 2019
    #5
    Parallax Panda likes this.
  6. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    281
    Likes Received:
    342
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Latest version - v1.03 (released 2019/04/18)
    • New plugin parameter (Layer 0 behind tilemap)
      if this parameter is on/true Layer 0 will drawed BEHIND tilemap (and above parallax)
     
    #6
    Parallax Panda likes this.
  7. Parallax Panda

    Parallax Panda Got into VxAce ~2014 and never stopped... Veteran

    Messages:
    636
    Likes Received:
    1,001
    Location:
    Fukuoka, Japan
    First Language:
    Swedish
    Primarily Uses:
    VNM
    @OcRam
    Okay, thank you. I'll keep this plugin as my main parallax plugin for now and we'll see if I discover any bugs or things that could be improved along the way, in which case I'll notify you in this thread. Really enjoying your work.
     
    #7
    OcRam likes this.
  8. TreeTopGhost

    TreeTopGhost Warper Member

    Messages:
    2
    Likes Received:
    2
    First Language:
    Dutch/English
    Primarily Uses:
    RMMV
    Hey @OcRam

    This plugin is very handy, especially with how many plug-inners (word nice yes) have left. I truly appreciate the work done.

    However, since I am not a coder (still learning, don't judge), I'm not so sure if I can somehow add multiple separate layers as parallax-mapping, like what used to be possible with OrangeOverlay. Say I want to have a ground layer, shadows, fogs, weather, lights, would it be possible to add those layers separately? Or would I be required to combine the fogs, ground, and shadows into one picture?

    Also, I am not sure how to implement the plugin commands themselves. Not sure if I'm stupid or the help file is unclear. It might just be that the plugin is incompatible with other plugins I use (Yanfly's plugins, idk). The parallax images I try to code into parallel events don't seem to work at least.

    Any advice would be very welcomed, as Parallax mapping is really what I'm after.

    Thanks a lot and I'll be checking out your other plugins!
     
    Last edited: May 16, 2019
    #8
    OcRam likes this.
  9. Hihoshi

    Hihoshi Warper Member

    Messages:
    1
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    Hi I'm having trouble getting the images to fix to map. I'm not sure I fully understand... Is there a sample file I could download to see where I'm going wrong?
     
    #9
    OcRam likes this.
  10. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    281
    Likes Received:
    342
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Thank you for the message @TreeTopGhost,

    ground layer = is the "normal" way you parallax file named as !image_name and set it to map parallax image
    shadow layer = Set plugin parameter "Layer 0 behind tilemap" to ON
    fog/weather = These are layers 1 and 2 (i'm also using OcRam_Weather_EX v2.00 for this)
    lights = I have used OcRam_Lights for this

    And if you do only parallax mapping set "Use only parallax mapping" to ON. This will enable you to use tilesets to manage complex passages, ladders, bushes, damage floors etc... This also speeds up your game (no tiles are drawn at all)!

    Thank you for the message @Hihoshi,

    At the moment I do not have demo project as I'm creating one big master demo where all of my plugins are introduced. Can you send a screen shot where actual plugin command is shown?
     
    #10
    Parallax Panda and TreeTopGhost like this.
  11. TreeTopGhost

    TreeTopGhost Warper Member

    Messages:
    2
    Likes Received:
    2
    First Language:
    Dutch/English
    Primarily Uses:
    RMMV
    Thank you!
     
    #11
    OcRam likes this.
  12. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    281
    Likes Received:
    342
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Latest version - v1.04 (released 2019/05/16)
    • Fixed bug where sprites above characters layer didn't work (was always below)
    • Fixed bug where sprite align didn't work with plugin commands (was always 7)
    • Sprites >> width and height parameters are no longer needed!
     
    #12
    Parallax Panda and bazrat like this.
  13. Creative Ed

    Creative Ed Veteran Veteran

    Messages:
    269
    Likes Received:
    295
    First Language:
    Portuguese
    Hello @OcRam I would just like to know how much more is this script optimized in comparison with other overlay plugins. Having images as maps usually make the game lag a bit, especially if they're big. Were you able to solve any of that with this script?
     
    #13
  14. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    281
    Likes Received:
    342
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Thank you for the message,

    Don't know much about other overlay plugins since I'm a scripter and like to keep things in my own hands. But to be honest there's not much to optimize (just do pre-calculations what you can on scroll and don't do stuff you don't need to do in parallax mapping like load/draw tilesets etc... - in my plugin this is parameter)

    I think there's no way to avoid lag on big maps (only preload manager can help this a bit). And testing is the only way to tell if this is more optimized than other overlay plugin(s).
     
    #14
    bazrat and Creative Ed like this.
  15. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    281
    Likes Received:
    342
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Latest version - v1.05 (released 2019/05/21)
    • New parameter [fade] to plugin command "clear_layer".
      Fade value like other fades in this plugin is given as gain/lose X opacity per FRAME
      example instant clear: clear_layer 0 255
      example slow clear: clear_layer 0 0.5
    • Done some more pre-calculations on scroll event
      (Thanks @Creative Ed for your question >> I double checked my code and voilá we found this: tilewidth and height was multiplied by 0.5 we can easily pre-calculate this on map load for example to check if it has been changed)
    • Battle weather works again... (if OcRam_Weather_EX is used)
     
    #15
  16. Brellelasouls

    Brellelasouls Geister Member

    Messages:
    24
    Likes Received:
    22
    First Language:
    English
    Primarily Uses:
    RMMV
    Hi, to start I absolutely love this plugin and plan on making use of it in both of the games I'm working on.

    I have probably a beginner question but how do I do auto tiles like ocean and water with this plugin? Do I have to animate the tiles within Photoshop first?

    The second question, with this plugin, will I be able to do things like making bridges the player can walk on and go under without the use of events?
     
    #16
  17. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    281
    Likes Received:
    342
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Thank you for the message,

    I'm not pro parallel mapper so I suggest to find out which way animated tiles are usually done. Anyways I have not designed this plugin to have animated layers (maybe can be done by changing picture for layer x few times in sec?).

    OcRam_Passages is ment for bridges, secret passages, doorways, cliffs etc... But it is made for tile mapping (not for parallax mapping).
     
    #17
  18. Brellelasouls

    Brellelasouls Geister Member

    Messages:
    24
    Likes Received:
    22
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks for the info, it's a big help.
     
    #18
  19. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    281
    Likes Received:
    342
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Latest version - v1.06 (released 2019/09/07)
    • Removed some unused variables.
    Donation pricing model is no longer allowed on these forums (because it's not legal in some countries). That is the only reason I have to change my pricing model to paid-commercial-use. I really would have liked it to keep it old way, but law is law.

    If you have downloaded this plugin before this change to Terms of Use, you are free to follow those terms. And if you download current version please follow latest Terms of Use.
     
    #19
  20. Leon_Artmann

    Leon_Artmann Villager Member

    Messages:
    25
    Likes Received:
    6
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    OcRam, fantastic work as always. I feel like everytime I have an idea for my project and I start searching for how to do it, my searches always bring me back to you :wub.

    I've never done parallax and have 0 coding knowledge, but I'm trying to use this for something very simple so perhaps a small help should suffice. I'm trying to make it so that when the player enters a house, the roof disappears. I'm just not sure on what code I should use it, as there are several examples in the plugin and as I say, I'm a newbie to this stuff. I just tried having a parallel event with the plugin command "sprite roof1 8 11 2 1 5" , it showed the roof and everything, but it's still bound to camera (I've set "default fixed to map" to TRUE in the parameters, but I guess that wasn't it). So, how can I make it so that the image stays in the same x, y?

    Thanks for all the help, always
     
    #20

Share This Page