QPlugins - Latest: QABS

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

  1. Arise

    Arise Veteran Veteran

    Messages:
    131
    Likes Received:
    18
    @Quxios: Not sure if you caught the issue with the QCamera, without it small maps are centered in window, with QCamera enabled small maps are aligned to the top-left corner.

    And big thanks!!!
     
  2. Quxios

    Quxios Veteran Veteran

    Messages:
    1,055
    Likes Received:
    781
    First Language:
    English
    Primarily Uses:
    RMMV
    @GameFire Yup thats fine!

    @Arise You're right I forgot about that! Thanks for reminder

    Updates
    QPlus 1.7.0
    • Added new plugin parameter `Ignore Mouse when inactive`
    QPicture 1.1.3
    • Fix for picture rect
    • Fix for all pictures acting as buttons
    QABS 1.6.1
    • Slight change for see through (don't remember why)
    QABS+Skillbar 2.0.0
    • Rewrite, slight performance boost
    • May have bugs, don't remember if I completely tested it
     
  3. Sleepy Kitten Games

    Sleepy Kitten Games Veteran Veteran

    Messages:
    428
    Likes Received:
    187
    First Language:
    English
    Primarily Uses:
    RMMV
    I updated to QPlus 1.7.0, QABS 1.6.1, and QABS+Skillbar 2.0.0, and I got this error upon selecting "New Game":
    [​IMG]
     
  4. Arise

    Arise Veteran Veteran

    Messages:
    131
    Likes Received:
    18
    Updated Qplus and QPicture. Now I can move with the buttons on screen. Wooooohooooo!!!!

    But QPicture is still not reacting to mouse input. :D

    I have some event on autorun :
    First I show image with ID 95 on the map.
    Then I have this code to enable mouse events to the picture:
    qPicture 95 onClick ce2

    The image is not taking mouse clicks.

    In short... my previous demo but with the updated plugins.
     
  5. Khalirei

    Khalirei Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    @Quxios That's great news! I don't know very much about scripting and programming other than with commented lines and/or instructions so I'm willing to wait. I spent all day yesterday just trying to understand how Qmap, Qmap editor, Qmap collision, Qsprite and Qsprite editor worked. A lot of emotions were experienced, but I finally managed to have a breakthrough. Have a happy holiday!
     
  6. Arise

    Arise Veteran Veteran

    Messages:
    131
    Likes Received:
    18
    @Quxios: I've found another issue. With a lot of data (plugins/images/etc) it takes me about 30 seconds of interface abuse to raise the memory over 1.2GB usage at which point the game will start crawling/lagging like hell and not possible to continue the gameplay.

    After a couple of hours of testing I've isolated the problem, or at least one of the problems I think. :)
    QMovement.js version 1.6 is a veritable memory leaker. You can reproduce it by making a map with some sprite sheet and using the mouse run around (or make small circles with the mouse cursor around character, it will run in circle). If you look in Task Manager at Game.exe you could see eating about 2MB of RAM maybe every second.

    Tried with QMovement.js version 1.4.4 and this one doesn't eat memory (or is much more conservative).

    For help, I've also added a demo so you can easily test for the issue. (it seems that setting a tile size of 48 does not leaks that much while going with 12 or 1 px tile size leaks at about a rate of 2MB/s).

    game_lag_qmovement.rar
     
  7. Quxios

    Quxios Veteran Veteran

    Messages:
    1,055
    Likes Received:
    781
    First Language:
    English
    Primarily Uses:
    RMMV
    @GameFire aaah I see, apparently I undid a fix from 1.6.0, so 1.6.2 will be the same as 1.6.0 lol i'll have that pushed later tonight

    @Arise the issue with your event was that you were using comments not plugin commands
    And thanks again for the report! Will look into that

    Updates
    QMovement 1.6.1
    • Fixed a memory issue with colliders
    QABS 1.6.2
    • Reverted back to 1.6.0
     
    Last edited: Dec 24, 2017
    ZcheK, Arise and Khalirei like this.
  8. Arise

    Arise Veteran Veteran

    Messages:
    131
    Likes Received:
    18
    @Quxios: Thanks! I've tested with QMovement 1.6.1 and the aggressive memory leak now is gone.
    I do still have some constant increasing memory leak, but is much slower. I'll have to debug further.

    You were right with my "bug", silly me was using comments. I'll have to find a wall to bash my head. :D

    Two questions for two different case scenarios.

    1. QPicture related. I would like to show 4 images over the map (left, right, top, down), so mouse over will scroll the map (move camera) in that direction. This looks a little bit silly, probably a better solution would be to use some kind of HUD plugin instead, but just asking.
    I tried the implementation with QPicture, added the images, for each image added a common event to scroll map in that direction and the line to bind the qPicture to the game Picture.
    qPicture 95 onMouseOver ce1
    Works nice. But the image is "stealing" mouse clicks. I can't click on the map, it looks like the image is doing some kind of stopEventPropagation.
    Can this case be addressed in QPicture? I want a Picture enhanced by QPicture to react to onMouseOver but ignore onClick event for example, like do the onMouseOver event but when clicking on it to actually pass the mouse clicks to the map beneath.

    2. QPathfind ??? related. I want some events to do some autonomous movement. Like some people walking in a market or in a park. I want those movements to be straight, long distances, based on how realistic characters in a RPG game like Diablo actually should look like, not like in the usual RPG Maker 48x48 sprites.
    The usual Autonomous Movement in RPG Maker (Random) is not helping much, it looks lame...
    I've got a solution, it involves in 2 events.
    One of the events (e3) is having 3 pages, first one on autorun which sets a timer (GALV_EventSpawnTimers.js), then with some javascript it jumps on several distant points on the map (event location change). This event is hidden, no icon, is not appearing on the map. It the last page has a plugin command like qPathfind e2 chase e3.
    Second event (e2) is my actual NPC that I want to walk around.

    So in short, e3 is a hidden event that jumps on the map from some point to some point then broadcast a qPathfind command to e2 to chase it to the new location.

    Something similar was implemented by David Brown here (not sure exactly how he is doing it):


    At last... :)
    Is that the right way to implement such an AI behavior? Or I'm just overcomplicating myself with GALV_EventSpawnTimers.js and using two events? Would be possible to achieve something similar (NPC moving around) using a single event/self containted?
     
  9. Quxios

    Quxios Veteran Veteran

    Messages:
    1,055
    Likes Received:
    781
    First Language:
    English
    Primarily Uses:
    RMMV
    @Arise Wasn't a memory leak but just bad code on my end. I was pushing to an array everytime a collider moved, so these arrays were getting very lage (1m+ elements) in a few seconds. Also js gc doesn't run that frequent (can't recall the timing) but you should be seeing the memory go up and down if you have plugins that are running code, like my pathfind. If you want to find out if it's a memory leak then you could add some sort of "kill" command to stop all events/plugins and wait a few minutes (wait for gc to kick in) and if memory feels higher then it should be then it may be a leak.

    1. It's my intention for mouse clicks to not go through. I could add an option to the plugin command to not "eat" the event

    2. Not too sure what you mean, but David explains what he did starting around 2:15 in the video.
    He basically has 3 events. 2 are invisible and are move in a circle/square path. The 3rd event is the character and it pathfinds to event 1, then pathfinds to event 2 and repeats over and over.
    What you can also do is use a random var and pathfind to a random spot based on the value of that var.
    And the most important part of this, is to use the smart option. That makes it so if it collides with anything it'll recalculate the path
     
    ZcheK likes this.
  10. Arise

    Arise Veteran Veteran

    Messages:
    131
    Likes Received:
    18
    Yes, sort of I understand David's approach.
    But some time ago I read some blog posts/forum posts/insights about events and everybody was claiming that parallel events should never be used because are asking for trouble and stuff like that and I should stay away from it.
    David's approach is using a parallel event to run the code, and there is a repeat loop in the event page also.

    The solution I've come has 3 pages in which 2 of them are set on autorun. Is this an improvement? Any flaws with this approach?

    I would rather have just a single event acting like a NPC rather than having 2 events with one invisible and the other one chasing the invisible. Would that be possible or two events is the right approach?

    My Demo attached.
    www_demo_NPC.rar
     
  11. Sleepy Kitten Games

    Sleepy Kitten Games Veteran Veteran

    Messages:
    428
    Likes Received:
    187
    First Language:
    English
    Primarily Uses:
    RMMV
    Hey, small question. I decided to test out the gamepad support in QInput and QABS, and so far it's working wonderfully. The one problem I'm having is that it doesn't seem that the gamepad can recognize diagonal movement. It's recognizing pixel motion in up/down/left/right perfectly fine, but it doesn't let me move diagonally.
    Is this intentional?
     
    Last edited: Dec 27, 2017
  12. Quxios

    Quxios Veteran Veteran

    Messages:
    1,055
    Likes Received:
    781
    First Language:
    English
    Primarily Uses:
    RMMV
    @Arise Parallel events are fine if they're used reasonably. Just don't make them do too much in a single frame, which is probably the problem most people have when they start getting lag. And also add conditions on when it should run. Most of the time there is no reason to run it every frame. David's approach is a parallel, but the run only runs once because he adds a loop inside (mind that a loop is the same as a parallel). But he has waits on the pathfind, so the loop isn't constantly running every frame. Also an autorun is the same as a parallel in term of performance.
    Writing up a js function/plugin would be more performant vs a parallel because it doesn't have to "parse" the event command. Idk how much faster it'd perform but I'd doubt it'd be a big difference unless it's on a weak machine.

    @GameFire GamePad in QMovement works fine for me. GamePad will use free movement, meaning you can move at any angle, so if you tilt the joystick at some angle it'll move at that angle, it won't stick to the default 8 dir like keyboard.
     
  13. Sleepy Kitten Games

    Sleepy Kitten Games Veteran Veteran

    Messages:
    428
    Likes Received:
    187
    First Language:
    English
    Primarily Uses:
    RMMV
    @Quxios Strange, for me it only does one of the diagonals if I force it, and then once I stop doing that it returns to not doing diagonals. Would it be possible that it's a problem with my controller?
    Edit: Interesting, turning off "Mid Pass" allowed it to work better. Didn't know that setting would affect the gamepad's diagonal movement since it didn't seem to affect the keyboard's diagonal movement.
     
  14. Quxios

    Quxios Veteran Veteran

    Messages:
    1,055
    Likes Received:
    781
    First Language:
    English
    Primarily Uses:
    RMMV
    @GameFire Send me a screenshot of your QMovement settings (Just need to see the main and optional settings). Also go ahead and disable everything that isn't a QPlugin, just to make sure it's not an incompatibility.

    Also I pushed some update last night and didn't make a log, so here it is:

    Updates
    QPlus 1.7.1
    • Minor change, just moved a function call
    QABS+Skillbar 2.0.1
    • Fixed a bug that caused icons to disappear
    I also updated my site to have a top bar since I'll be adding tutorials I needed to add a navigation bar. Also added page titles for each page for bookmarking purposes. Ex, before if you were on the QPlus page, the title would just be "Quxios", now it'll show "QPlus | Quxios"
     
  15. Sleepy Kitten Games

    Sleepy Kitten Games Veteran Veteran

    Messages:
    428
    Likes Received:
    187
    First Language:
    English
    Primarily Uses:
    RMMV
    QMovement settings:
    [​IMG]
    Disabled all non-QPlugins, it's still the same.
    I think my main problem with it is that there seems to be a slight delay between me moving the joystick to a diagonal and the character moving to that diagonal. It isn't as responsive as the wasd/arrow keys.
    Also, slightly annoying bug I've noticed with the gamepad, though it might also just be my controller. Whenever I click off of the actual game, it automatically sets the control scheme back to keyboard/mouse.
     
  16. Arise

    Arise Veteran Veteran

    Messages:
    131
    Likes Received:
    18
    Is it possible to test the feeling of walking in 8 directions only? Right now keyboard movement looks good but mouse movement will give me any angle but with the 8 dir only animation.
    So if mouse movement will do a 15 degrees in a straight path the animation will play the dash2 animation for going down, which is not that great.

    As a result I would either try a 22.5 degrees (half diagonal plugin) which seems an overkill in the number of frames required, is this actually easy to implement???
    Or I would like a way to force the character to move in true 8 direction only, not every direction like my mouse is giving me.

    Later edit: I found how to force moving in 8 directions only, in QPathfind I had to disable the "Any Angle". But I don't like the visual effect, doesn't look that good to me and is also doing some kind of frame skipping when changing the direction of walking.
    So for now the only solution would be to check if is possible to have more directions, like 12, 14, 47, 78, 89, 69, 36, 23. (I mean in 22.5 degrees angles.)
     
    Last edited: Dec 27, 2017
  17. Xalezar

    Xalezar Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    I had a question about the picture action in QABS. The syntax listed is:

    And for animated pictures, it says:

    Can you clarify what that means with an example? E.g. is the percent sign a wildcard for the file name? What unit is the SPEED parameter in (milliseconds, frames, etc.)?

    Awesome plugins by the way!

    ###

    EDIT: Figured it out. For anyone else having trouble with it, here's what I did:

    1. Prepare the picture like a horizontal film strip, with each frame of the animation the same width.

    2. Name the picture in this format: FILENAME%[n-m]. Where
    FILENAME is whatever you want to call the picture
    n is an integer, specifying number of slices (animation frames).
    m is an integer, specifying duration (not sure what the unit is).
    example: sword%[5-4] could be the file name of an animation with 5 frames, with each frame lasting 4 RM Frames.

    3. In the Database > Skills interface, add a note tag action for the skill you want to apply this animated picture to. So far I know that the m value must be less than the wait action value.

    Example:

     
    Last edited: Dec 29, 2017
  18. Amy Pond

    Amy Pond Veteran Veteran

    Messages:
    667
    Likes Received:
    1,359
    First Language:
    English (UK)
    Is there a reason mouse movement is disabled in QABS, or is this something I can reenable?
     
  19. Quxios

    Quxios Veteran Veteran

    Messages:
    1,055
    Likes Received:
    781
    First Language:
    English
    Primarily Uses:
    RMMV
    @GameFire Mmm everything looks fine. So might just be your controller? As for the response time for the analog stick, you can change that in QInput under the "Threshold" parameter, MV's default is 0.5. This means you need to push the analog at least half way before it accepts the input. If you want something lower, I'd recommend a value between 0.2 - 0.3

    @Arise adding extra angles to the pathfind isn't a good idea as it'd slow it down drastically. Any angle works by modifying the final path from the pathfind so that doesn't add much performance, unless it was a long path. Again QPathfind will get an update to use the diagonals from the SetAngle plugin

    @Xalezar Yup correct, and the duration is in frames

    @Amy Pond It should only disable the mouse movement if you have any skill input set to the mouse.
     
    Xalezar and Amy Pond like this.
  20. Arise

    Arise Veteran Veteran

    Messages:
    131
    Likes Received:
    18
    @Quxios: thanks. I’ll have to patiently wait for the updates then. :)

    Not sure I understand the 16 directions issue. The problem is more like visual, with detailed characters (not usual 48x48 sprites) and it affects (visually) only a couple of situations, like when walking from the top to the bottom of the screen in a slight angle (but less than 45 degrees - so not diagonal). The character will use walk2 animation, but visually it will drift, and it will look bad imo. Just want to make sure this is the issue you said it will slow down the game.
    And I think is required only for the main Actor, events dont have to do half diagonal animations.

    Another issue, very frequent it seems the Actor gets stuck after some mouse clicking around and moving around events and engaging (action) them. After that I cant move with the mouse and neither with the keyboard. Esc key also not working. Cant change Actor direction. Pressing enter key or space works to talk again with the event, but I’m stuck with the movement.
    F10 key also shows the red circle for the Actor has some small offset, basically I think the Actor no longer sits were it should sit. Using some tools like some quick save and reload is “unlocking” the situation, also trying to change the _x and _y from Chrome console also helps with unlocking and I can move again. Cant reproduce it yet to make a demo, but it happens with a high frequency. Any idea what is causing that?
    Also I know there was an F key to make Actor to ignore the collisions, but cant remember which one? Tried all and nothing.
     

Share This Page