QPlugins - Latest: QABS

Discussion in 'JS Plugin Releases (RMMV)' started by Quxios, Jan 2, 2017.

  1. Plueschkatze

    Plueschkatze Veteran Veteran

    Messages:
    513
    Likes Received:
    1,519
    First Language:
    German
    Primarily Uses:
    N/A
    Hi @Quxios I'd love to use your amazing QAudio plugin for my game, but I did run into a kinda scary problem yesterday.
    I did setup a parallel event (yes, parallel events are kinda baad~) with the plugin commands for an audio source.
    I walked by it a few times and soon recognized that the audio got corrupted and the game started heavily lagging. (I wish I had recorded that, because it was scary as hell! XD)
    I would love to know what you're best way to implement those plugin commands would be? It kinda seemed like causing memory leak or so to me? But yet I'm not that much into the technical stuff.

    (I used fadein fadeout alongside some of the standard parameters for location and radius, also I only used a super short/small size SE for the test)

    Thank you!
     
  2. Arise

    Arise Veteran Veteran

    Messages:
    131
    Likes Received:
    18
    There is something that I don't understand, and I'm not sure if this is related with Qsprite or not... I've looked in documentation and wasn't able to see anything related to this issue... maybe missed something?

    In short, how do I set an event (based on Qsprite) to start facing in some other direction, not necessary facing down (direction = 2)? Maybe in diagonal if possible.

    Is this a MV checkbox I need to check, or do I need a plugin, or a QSprite command?

    Later edit: found I had to add in comments something like:
    <direction:X>

    Later edit 2: I'm facing another problem, let's say I have the event facing diagonal (<direction:3>), if I trigger the event, then it will turn towards me during dialog (which is fine), but after the event ends (the dialog ends) it will return to the (<direction:2>) (facing down). How to make it return to the original desired direction?
     
    Last edited: Dec 15, 2017
  3. Quxios

    Quxios Veteran Veteran

    Messages:
    1,055
    Likes Received:
    780
    First Language:
    English
    Primarily Uses:
    RMMV
    Sorry for late replies! Haven't been feeling too well

    @Plueschkatze QAudios should only be set up once on map enter. Unless it's to be used like an SE then run the plugin command from whenever it's needed, but give it a proper ID. So for example, if there's a cat, and if you talk to it it'll play some meow se:
    "qaudio start meow se idCat bindToE1"
    giving it a proper id will make it so if it's called again and if there's any qaudio with the same id, it'll stop it.
    But I'll run some tests with it soon anyways. I haven't touched it in months so there's a chance there may be a bug with the stops!

    @Arise I'll have to patch that so it can return to diagonal directions. But if you want to manually do it, you can use a script call in the move route:
    Code:
    this.setDirection(3)
     
    Plueschkatze likes this.
  4. Arise

    Arise Veteran Veteran

    Messages:
    131
    Likes Received:
    18
    @Quxios:

    I've found a somewhat "deal-breaker" issue with the QCamera.

    The default RPG Maker, combined with various plugins to set some custom resolution gives you a CENTERED map (the bounds of the map are centered in the game window).

    With QCamera enabled, the map is no longer centered, it is aligned to the top left corner (0,0).

    So any small map goes in the top left corner, rather than sitting nicely centered in the window.
     
  5. Plueschkatze

    Plueschkatze Veteran Veteran

    Messages:
    513
    Likes Received:
    1,519
    First Language:
    German
    Primarily Uses:
    N/A
    Thank you @Quxios ! That was super helpful and fixed my problem. So happy that I can use this plugin now <3
     
    Quxios likes this.
  6. kokainum

    kokainum Warper Member

    Messages:
    2
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    I ran into another issue regarding the collidors and the scale plugin.
    The playercollider scales but the collider also moves up on the y-axis as well, so the y-offset inscreases the more the character moves to the top of the map.

    I use these scale settings: <scale:-0.7,2> (although different values create the same problem) and also I use quite big sprites (couple hundred pixels tall).

    Is there a way to prevent that? Thanks :D
     
    ZcheK likes this.
  7. ZcheK

    ZcheK ZcheK Veteran

    Messages:
    96
    Likes Received:
    22
    First Language:
    English
    Code:
    if (Imported.QMovement) {
        var Alias_Polygon_Collider_moveTo = Polygon_Collider.prototype.moveTo;
        Polygon_Collider.prototype.moveTo = function(x, y) {
          var oldY = this.y;
          Alias_Polygon_Collider_moveTo.call(this, x, y);
          if (this.shouldYScale() && oldY !== y) {
            var scale = QYScale.at(y / QMovement.tileSize);
            this.setScale(scale, scale);
          }
        };
    (Line 134, QYScale)
    I took this code out as I don't want any collision scaling. (It makes all my carefully placed collisions to go crazy). Not sure if that's the best solution but seems to be working.
     
    kokainum likes this.
  8. Sleepy Kitten Games

    Sleepy Kitten Games Veteran Veteran

    Messages:
    426
    Likes Received:
    186
    First Language:
    English
    Primarily Uses:
    RMMV
    I tried setting up a QSprite and setting the player to use said QSprite.
    At first I named the file itself "%{8DiagTest}", and it worked - except for the diagonals, which just played the normal move poses.
    Then, after seeing a post on this thread, I renamed it "%{8DiagTest}-MaleTest". Both setting the player to use that graphic by default and switching the player to that graphic with an event command results in this error:
    [​IMG]
     
  9. Quxios

    Quxios Veteran Veteran

    Messages:
    1,055
    Likes Received:
    780
    First Language:
    English
    Primarily Uses:
    RMMV
    @Arise I forgot to report my findings with your demo!
    1. The collider culling issue is due to your polygons being at 0,0 by at actually made at a different coord. I intended that the first point of the polygon to be 0,0 and an x/y actually being set. Though I'll look into seeing if I can rewrite some stuff so it works either way. Didn't even know if polygons would work being the way you wrote them lol.
    2. For the "strange path" I'm assuming you mean the pathfind? In which case it's completely normal because you're not using an iso script so your x/y are still left/right/up/down. If you want the path to look better turn on "Any Angle" in QPathfind. Diagonals wouldn't look much better either because that will move at a 45 degree, unless you have a plugin to change the diagonal degree to 33?(can't remember the iso diagonal angle)

    @Plueschkatze Cool, no problem!

    @kokainum ah yeah that's a bug that I had forgotten about. You can do what @ZcheK suggested, but that completely removes collider scaling

    @GameFire Did you configure it in the QSprite app? And if you did, did you name the config "8DiagTest"? From that error, it's trying to load the 8DiagTest data from the QSprite.json data but failed to find it. I should probably add an error catch and have it log a warn instead of erroring the game.
     
  10. Sleepy Kitten Games

    Sleepy Kitten Games Veteran Veteran

    Messages:
    426
    Likes Received:
    186
    First Language:
    English
    Primarily Uses:
    RMMV
    Yes, I did configure it in the QSprite app, and it is named 8DiagTest. I've saved it multiple times as well.
    Edit: And if I check the QSprite.json file, the config information is in there.
    Would the sample image being in a different folder than the game folder throw an error like that, by any chance?
     
  11. Quxios

    Quxios Veteran Veteran

    Messages:
    1,055
    Likes Received:
    780
    First Language:
    English
    Primarily Uses:
    RMMV
    @GameFire Oooh I see the issue. You don't need the {}'s in the file name, your file name should be: %8DiagTest-MaleTest
     
  12. Sleepy Kitten Games

    Sleepy Kitten Games Veteran Veteran

    Messages:
    426
    Likes Received:
    186
    First Language:
    English
    Primarily Uses:
    RMMV
    Ah, I see. The help files were kinda confusing for me.
    It kinda works now. But now it shows four frames at once, and sometimes no frames are shown.
     
  13. Arise

    Arise Veteran Veteran

    Messages:
    131
    Likes Received:
    18
    @GameFire: You need to enable diagonal in plugins, then you need move2,move4,move6,move8,move1,move7,move3,move9 then you need also idle variants, you could need also dash variants, and at last if you need more idles, you could add idleA2x variants, idleB4x variants etc.
    But more idles comes only after normal idle2,idle4,idle6, etc...

    @Quxios: thanks for explaining, my solution for now: I just added inside Sprite_Collider.prototype.checkChanges = function()
    the line this.visible = true;
    after the if block.
    Now the colliders stays on screen, no culling needed for development I think at this moment.

    Other issues I've found: QTouch.js is not compatible with TDDP_MouseSystemEx.js

    Quxios, the Any Angle option is true, but the character still moves in the strange path, not going straight in diagonal. I know about the other plugin from your other repo, to set the angles in radians, but again... is not going in straight "visual" direction, it makes a corner when doing the pathfind.

    After more thinking, diagonal works for character movement, but not for path finding, also the custom angles also works for character movement, but not for path finding.

    Would be possible to display the grid overlay on the map? So I can see how it calculates the pathfind? Or to display debug the computed pathfind?
    I assume if I use a custom grid size, like 12, it should make every 48x48 cell in smaller cells, pathfind make calculations based on those smaller cells or the big 48x48 mv default grid?

    Later Edit: if I switch back to 48x48 grid (I was testing with 12x12 grid) it seems to pick the shortest visual path, but if I go with 12x12 grid, 8x8 grid, or 1 pixel movement grid it will make the pathfinding go in an angle direction rather than a visual straight line.
     
    Last edited: Dec 22, 2017
  14. Sleepy Kitten Games

    Sleepy Kitten Games Veteran Veteran

    Messages:
    426
    Likes Received:
    186
    First Language:
    English
    Primarily Uses:
    RMMV
    @Arise I added those. My problem was that I changed the sprite sheet (made it bigger), but forgot to pick the new sprite sheet as the sample file to reflect this. So the plugin was using the four frames as one.
    @Quxios Though now I'm having a bit of an odd issue. The frames for diagonals seem to be mixed up.
    Lower left works fine, but lower right shows the upper left config, and upper left and right show nothing. I followed the instructions in the app help file and the online help file (the direction numbers).
    The direction numbers as per the online help file:
    • 2: down
    • 4: left
    • 6: right
    • 8: up
    • 1: lower left
    • 3: lower right
    • 7: upper left
    • 9: upper right

    Edit: I seem to have misread the files. My apologies. This is what happens when I decide to stay up until the wee hours of the night and only get ~2 hours of sleep. Leaving my original post here so anyone reading through the thread doesn't get confused by the conversation.
     
    Last edited: Dec 24, 2017
  15. Arise

    Arise Veteran Veteran

    Messages:
    131
    Likes Received:
    18
    @GameFire: Unlike other diagonal plugins like the ones from galv or victor, the QMovement lets you have sprites in any order.
    But most of my sprites are still produced using the victor order for example, which is not bad either... because it enforces some logic and clean design.
    You could make the idle, move and dash sequences (8 directions for each) by hand or by using some tool to generate the frame number (I use excel formulas for example) then paste the sequence of frame numbers sepparated by commas into the sprite app (QSpriteEditor-w64).

    Clicking on every pose should let you preview the animation if it works well.

    Once you get a pose working or better a character working, you can right click and duplicate it, then just change the name and spritesheet graphics file.
     
    Last edited: Dec 22, 2017
  16. Arise

    Arise Veteran Veteran

    Messages:
    131
    Likes Received:
    18
    @Quxios: I've stumbled into another issue, while I was trying the new QPicture plugin to see how it looks. Can't get it to work, after I set this up, I can no longer move with the mouse on the map, nor I can click on the images. I've attached the demo.

    Mod Screen Buttons MV.zip
     
  17. Sleepy Kitten Games

    Sleepy Kitten Games Veteran Veteran

    Messages:
    426
    Likes Received:
    186
    First Language:
    English
    Primarily Uses:
    RMMV
    @Arise As I said in my previous post, I already have set up all the poses as per the instructions in the help file for the QSprite app and the online help file:
    • 2: down
    • 4: left
    • 6: right
    • 8: up
    • 1: lower left
    • 3: lower right
    • 7: upper left
    • 9: upper right
    This isn't a case where I have neglected to create a pose for the config - I already saw the error that was thrown when I only created the movex poses but not the dashx poses or the idlex poses. This is a case where I followed the instructions on how to set up a config, and the plugin is acting unexpectedly (only one diagonal pose works, while the other three do not).
    I appreciate you trying to help, but as I've said, I have already set up the movex, dashx, idlex, and default poses.

    Edit: I seem to have misread the files. My apologies. This is what happens when I decide to stay up until the wee hours of the night and only get ~2 hours of sleep. Leaving my original post here so anyone reading through the thread doesn't get confused by the conversation.
     
    Last edited: Dec 24, 2017
  18. Khalirei

    Khalirei Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    @Quxios Hi, I was wondering if it's possible to edit the Qmovement diagonal angle? I'm trying to use an isometric view and wish it lined up with the grid's angle, which I believe is 26.6 degrees, I think. Thanks for your time!
     
  19. Quxios

    Quxios Veteran Veteran

    Messages:
    1,055
    Likes Received:
    780
    First Language:
    English
    Primarily Uses:
    RMMV
    @GameFire Think I'll need your QSprite.json and the spritesheet you're testing with so I can see for myself

    @Arise
    Well colliders are only drawn for development, so it's ok to never cull them. But if you start having 1000+ colliders you'll want to cull because it can start lowering the frame rate (though turning them off with F10 will disable them all and will inc fps)
    Thanks for the QPicture report. Looked into it and I made a mistake in the rect calculation, I used width x width instead of width x height lol. Update will be in a few mins, getting a few other updates ready to push too. Will edit this post if there's no replys when i push them.
    As for the pathfind, yes I think it still uses 45 degrees regardless. I'll edit that to use the angles from the SetAngles addon

    @Khalirei By editing the plugin, just need to edit like 3 functions. I have a plugin for this but it hasn't been released
     
  20. Sleepy Kitten Games

    Sleepy Kitten Games Veteran Veteran

    Messages:
    426
    Likes Received:
    186
    First Language:
    English
    Primarily Uses:
    RMMV
    @Quxios Would it be alright if I PM them to you?
     

Share This Page