Quasi Movement

● ARCHIVED · READ-ONLY
Started by Quxios 657 posts Page 26 of 33 View original ↗
  1. @DehFunTimezTry the following things:


    -Try going into the plugin manager and disabling Quasi Movement and then running your game. Does it still do this? If it does, the issue is elsewhere. 


    -If you find that it only happens when Quasi Movement is on, have you altered the plugin in any way?


    -Even if you haven't altered it, try downloading it again and replacing the copy of the plugin with your freshly downloaded copy.


    -If it still does it, try creating a new project, adding Quasi Movement to it and then seeing if it happens again. If it doesn't happen on your new project, it is likely that something was messed up with your old project.


    -Lastly, have you tried anything more advanced with the plugin and are trying to use script calls, or is this just a barebones thing?(Barebones=vanilla map with vanilla everything, the only fancy thing you've got is Quasi Movement). If you are using script calls, it could be possible that you have entered something incorrectly and have messed something up that way. Try getting rid of your added script.


    -If it still happens, than unicorns exist, and at that point you should send me(i don't mind checking it out) or Quasi(assuming he is willing) your project to look at. But honesty, if you follow what i wrote above, it should fix it.


    @shaynec1981 I think what he is trying to say, if I am wrong, correct me, is that that game was built based on, and optimized for, grid movement & collision. Non-grid based movement is made available via plugins but isn't optimized for the game engine when published.


    Think of it this way:


    Grid and Pixel based movement are both technically based on a grid, one is just a lot simpler than the other.  Lets compare it to the game battleship(hopefully you have played this game as a kid). When playing with a traditional board, finding ships is not all that difficult, you just say A-5, or C-8 and so on until you find the enemy battleship, this game is made playable(time wise) by the fact that it has a small grid and therefore only so many combinations. Now imagine playing battle ship and the grid is around 600x600 in size totaling up to 360,000 different squares, this is going to increase the game time significantly because the amount of combinations.


    When pathfinding is active the computer is trying to find the best non obscured route to a determined point and when it is on a small grid(10x10 maybe), there are only so many possible paths, so it is easy for the computer and game engine to find the best path. But when the game is using pixel based movement and collision, the grid is significantly larger and there is a massive increase in the number of paths it could take, so finding the best path is much harder given that it is supposed to figure it out in milliseconds AND that the engine was not built or optimized for it.


    Something that might work is if you were able to find a way to simplify the collision grid for pathfinding, but that might not even speed things up to the extent that it is playable. I have seen other game engines set auto pathfinding via nodes like so:


    Screen Shot 2016-07-06 at 9.49.17 AM.png


    If you had something like this, it would perhaps solve the issue of pathfinding while retaining the awesome collision maps on Quasi Movement. I have no idea how you might do this except to make the nodes with events and then having a node be defined as your mouse. You could see if you could get to your mouse in a straight line and, if not check what node it could get to instead. But this might have performance issues too, @shaynec1981 this is just an idea you could try.
  2. Quasi said:
     I'm assuming you mean just the Movement plugin. For diagonals, that will depend on what value you set for the "Diagonal Speed" parameter in the plugin, default is 0. And since you said you just downloaded the "core js" I'm assuming you didn't get any of the addons. So if you don't have the pathfinding addon, then the mouse clicking will be really bad as it doesn't use pathfinding. And the "red tiles" are colliders, they are there to help you set up collisions / event triggers. They only appear when play testing and you can toggle them on / off with F10



    I tweated around and actually got it working :)  I disabled the mouse input in the plugin (which I didn't want anyways - makes the game "too" convenient). is there a way to switch off the hit box detection by default? I have not discovered that option yet.


    EDIT:


    SORRY for the bother. I found it! :) you can turn the show boxes to false on the bottom. great plug in!
  3. @DehFunTimez Follow the steps @Kanoonoo gave:






    @shaynec1981 Pretty much what @Kanoonoo said. The default pathfinding is built / optimized for grid based movement and grid based collisions. But my plugin isn't grid based and the collisions are completely rewritten. Though you can change the settings to make it look like it's grid based. And just to add a bit more information from what kanoonoo said:
    Pathfinding's performance is pretty dependent on the collision detection. My colliders collision is around 2-3x slower then default collision. And collision maps are around 2-10x ( would depend on your pixel scan settings ) slower then the collider collisions. So collision maps aren't optimized for mobile because they are very "heavy" on performance. And a node type pathfinding would be the ideal solution, but that's a bit hard to program in a way that anyone can set it up since it wouldn't be just add to your plugins and let it do all the work.


    Also, thanks @Kanoonoo for helping answer their questions! Helps me out, specially since I've been busy these days.


    @Scubidubi No problem, thanks!
  4. Quasi said:
    Pretty much what @Kanoonoo said. The default pathfinding is built / optimized for grid based movement and grid based collisions. But my plugin isn't grid based and the collisions are completely rewritten. Though you can change the settings to make it look like it's grid based...

    But if I use walking scripts for events (move up, down, ..) the character will move one tile unit if I am not mistaking. Is there a way for the character to "slip" off obstacles when colliding and keep pushing around it? right now, the character stops moving at collision. After work I will check if there is a difference when using round boxes.
  5. If I remember correctly, events won't use smart move ( so if they collide, they will just stop, they won't "slide" around it like players can ). And if you want to move an event by a certain amount of pixels you can use the qmove() function


    http://quasixi.com/quasi-movement-documentation/4/#move
  6.  Hi Quasi!


    I'd like to know if there is some way to check the player's position? Like a script call or anything?
  7. @Gooz Hey there, you can absolutely get the players location and you don't even need a script call! :D  (Although this may not be the best place to ask that question as it has nothing to do with this plugin, I'll assume you don't know that and love you anyway)


    Create two variables, call them something like Player X and Player Y. 


    Then simply use two instances of control variables>game data>Character>player>map X and map Y, and store them in your player X and player Y variables. 


    If if you need the player's location constantly, simply put this in a common event as parallel, for efficiency's sake I suggest putting a 'wait' timer in for at least a couple frames and so long as it is below 60, it should


    help with performance and still fulfill your purpose. 


    Hope this helps. 


    Sorry if there are spelling mistakes, I just woke up and am typing this on my phone. 


    Love ya!


    Todd George Kelly/Kanoonoo
  8. Kanoonoo said:
    @Gooz Hey there, you can absolutely get the players location and you don't even need a script call! :D  (Although this may not be the best place to ask that question as it has nothing to do with this plugin, I'll assume you don't know that and love you anyway)


    Create two variables, call them something like Player X and Player Y. 


    Then simply use two instances of control variables>game data>Character>player>map X and map Y, and store them in your player X and player Y variables. 


    If if you need the player's location constantly, simply put this in a common event as parallel, for efficiency's sake I suggest putting a 'wait' timer in for at least a couple frames and so long as it is below 60, it should


    help with performance and still fulfill your purpose. 


    Hope this helps. 


    Sorry if there are spelling mistakes, I just woke up and am typing this on my phone. 


    Love ya!


    Todd George Kelly/Kanoonoo

     Oh i see... i was thinking this totaly wrong (that's why i posted here).


    This is quite simple actually!


    Thx VERY MUCH Kanoonoo (been stuck on that for 2 weeks lol)!
  9. First things first, this plugin really is amazing.


    It's nice to be able to check a documentation as opposed to check and re-check the help thing in the plugin menu thingie when you're like me and don't have the best of short-term memories. So thanks for doing the extra work and writing that one. :)


    This also leads me to my question (well, prelude first): While it's marked with a "To Do" on your website, there's an "Example 3" depicting the set up of Tile Collison Maps. As it is the very thing which would save me so much time (passability annoyances are what led me to search for movement/collision plugins in the first place) I went and tried it out. Like shown in the example, I made a duplicate of my Tile B, left everything red that's supposed to be a collider, saved it in the tilesets folder and added the <cmb:filename> into the tileset notetag in the database. And it did not work. I tried lots of different things where I thought I might have done something wrong, to no avail. I also checked your demo which didn't have this feature included at all (even though I saw that there is the file from your "Example 3" in the tilesets folder).


    So, after that long prelude, my question(s):

    • is there a bug, or have I completely misunderstood the directions in the example, or is the Tile Collison Map feature simply not done/available yet?
    • does it only work for tilesets B-E or for the A tiles as well? (just thinking of irregularly-shaped water autotiles, rounded cliff corner autotiles, and the billions of things A5 can be used for)

    Another thing I noticed: Region Boxes don't seem to like Region ID 100. When it didn't work, I used 99 instead and it worked again. Didn't test it with higher numbers, but I thought I better mention it here.
  10. To me it just takes ages to load the game with this active.
  11. Is there a method to return when a collision has happened or where is the best place in here to hack that in if not?


    For example, if I want a method to be continuously called until a collision occurs I'd have that particular method in an update method unless collision = true.
  12. @Gooz Not a problem :)


    @Chiaraill look into this and if Quasi hasn't answered by the time I am done, I'll post something. 


    @shaynec1981 what are you going to be using this for? Depending on your answer, I would suggest something different. 
  13. @Chiara I'm not sure, it might be a bug. That feature was something that was added but I never paid much attention to it when doing updates because I honestly feel it would just be better to create a collision map. Since using that tile collision map will make the game have to create these collision maps every time that map is first loaded. Which is just additional unneeded loading for static maps.


    I'll also look into that issue with the region boxes. I never tested high numbers either. thanks for letting me know.


    @EmperorZelos Are you using any other plugins? The only time this plugin would cause maps to taking long to load, is if you have a very large collision map set, since that image has to complete load before you can move around. But if you aren't using collision maps, then your problem might be with other plugins. I have received some sample projects, where initial map load would take long because they had plugins that would scan through every item, weapon, armor, ect. ( while they had 1000s of items ) to load their note tags.


    @shaynec1981 Depending on what you want to do with it, you can intercept the "Game_CharacterBase.prototype.canPass()" function. But remember that will run for all characters; players, events, followers, vehicles.


    Example of intercepting it in a separate js file if you aren't over writing.

    Code:
      var Alias_Game_CharacterBase_canPass = Game_CharacterBase.prototype.canPass;
      Game_CharacterBase.prototype.canPass = function(x, y, dir) {
        var passed = Alias_Game_CharacterBase_canPass.call(this, x, y, dir);
        if (!passed) {
          this.didntPass();
        }
        return passed;
      };
    
      Game_CharacterBase.prototype.didntPass = function() {
        console.log("Couldn't pass.");
      };
  14. Quasi said:
    @Chiara I'm not sure, it might be a bug. That feature was something that was added but I never paid much attention to it when doing updates because I honestly feel it would just be better to create a collision map. Since using that tile collision map will make the game have to create these collision maps every time that map is first loaded. Which is just additional unneeded loading for static maps.


    I'll also look into that issue with the region boxes. I never tested high numbers either. thanks for letting me know.


    @EmperorZelos Are you using any other plugins? The only time this plugin would cause maps to taking long to load, is if you have a very large collision map set, since that image has to complete load before you can move around. But if you aren't using collision maps, then your problem might be with other plugins. I have received some sample projects, where initial map load would take long because they had plugins that would scan through every item, weapon, armor, ect. ( while they had 1000s of items ) to load their note tags.


    @shaynec1981 Depending on what you want to do with it, you can intercept the "Game_CharacterBase.prototype.canPass()" function. But remember that will run for all characters; players, events, followers, vehicles.


    Example of intercepting it in a separate js file if you aren't over writing.



    var Alias_Game_CharacterBase_canPass = Game_CharacterBase.prototype.canPass;
    Game_CharacterBase.prototype.canPass = function(x, y, dir) {
    var passed = Alias_Game_CharacterBase_canPass.call(this, x, y, dir);
    if (!passed) {
    this.didntPass();
    }
    return passed;
    };

    Game_CharacterBase.prototype.didntPass = function() {
    console.log("Couldn't pass.");
    };

    Beautiful man! This will be perfect. Thank you! 
  15. I looked into that region 100, and higher. And they worked for me.


    Some updates:
    Movement 1.299


    https://github.com/quasixi/Quasi-MV-Master-Demo/blob/master/js/plugins/QuasiMovement.js

    • Added an .id property to colliders
    • Removed a few functions I hadn't noticed I left inside from long ago
    • Fixed the .positionChanged() function. ( This will fix Region Events addon from triggering common events with action trigger, when it should be only with touch trigger )
    • Few changes to the Sprite_Collider and tempColliders to use the .id property



    Sight 1.08


    https://github.com/quasixi/Quasi-MV-Master-Demo/blob/master/js/plugins/QuasiSight.js

    • Rewrote some parts / removed some lines.
    • Added plugin command "qsight setInvisible [charaID] [true or false]
    • Added ._invisible property to characters. If character is invisible, the character can't be seen
    • Added .canSee(charaId, shape, length) function to characters. You can use this function to see if the player can see an event, or if an event can see another event
  16. Quasi your plugins are so wonderful :)


    Combining your pixel movement, character sprites, collision and region plugins with some mouse and picture plugins, RPG Maker now seems to have most of the core functionality of Adventure Game Studio, and it's now fully possible to make point and click adventure games, you have expanded this software so much!

    Untitled.png
  17. @Kanoonoo: Thanks in any case. :)


    @Quasi: Oh, okay, thank you for looking/replying and the explanation. Would you recommend using the regular collision maps instead? I'm not good with technical things and my brain sadly refuses to understand anything about code that's more specific than the logic (not the syntax) behind if conditions and even that I muddle up with other things regularly. So if the tile collision map cause the creation on loading the map the first time, does this not happen with regular collision maps since those are "there" already? Is there a benefit to use one over the other depending on amount and size of maps? Like having a few large maps as opposed to a lot of smaller ones? And, while .pngs with transparency, only one colour and no metadata are quite small (in my limited experience), would it make an impact to have, say, 100 regular collision maps instead of... 25 tile collision maps? Sorry for the many questions, I'm partly curious and partly wanting to make sure I understand correctly so I can weigh my options better. Because not using your plugin is out of the question for me already, I'm having too much fun running around my testing map for that and using Regions as blocking volumes instead of empty events makes me happy as well. Also, the Region 100 thing might have been on my side, I've been known to be convinced I did everything correctly after checking and double-checking and still missed something; sorry for the trouble if it caused any D: .
  18. Hey quasi~
    Lovin' the script, has worked wonders for me. I ran into an issue today with our first play test. 

    It seems there is a problem with loading a game. It works fine when you load a game, but if you save the game once and then return to the main menu and try going back in I get this error. So the errors occurs when open game -> load game from menu -> play -> save game -> return to title menu -> load -> error. Strangely enough once you get the error once an reboot the game, you can reach your save fine. I'll attach the error, I cut out any possible scripts that might be messing with it as well. I am using a common event title scren & menu, which I believe is the suspect

     

    Error.png
  19. @Chiara Not sure, but I'll assume collision maps would be better in most situations. The tile collision maps, needs to create the image based off data that's passed in, while collision map is only reading an image data. The tile collision map first creates an empty collision map if there was no collision map set. Then it needs to loop through every tile to see if that tile uses one of these tile collision maps, and if it does, draw that shape into the collision map. While with collision maps you can always compress them and make them small file sizes, and even preload them during some pre game loading screens.


    @Neckboi Alright, thanks for informing me + giving the steps you used! I'll look into this shortly.
  20. @Quasi: Sounds like regular collision maps are indeed a better way, thank you for taking the time to explain this. :)