Quasi Pixel Collision Issues/Error

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
(I have personally messaged the scripter, and they have given me permission to use/edit these scripts, so long as credit is still given. Do not try to rip the scripts in the demo and claim as your own.)


When trying out Quasi's VX Ace pixel collision scripts (this was combined with the quasi module and his pixel movement script), I came accross an error where the player was unable to save through the menu. Trying to force save using a script call (DataManager.save_game(1)) in an event does not work. There are no events or scripts which permanently disable the save access, either. This error seems to persist only when you use a notetag in "Map Properties" to bring up a collision map. 


I haven't found any documentation for these scripts, to be honest. This seems to have been an error several other people have had - and I think there is a possible fix to this. however, I simply haven't been able to find any updated scripts or any instructions on how to perform these fixes. And after hours of trial and error I've kind of given up on fixing it on my own, heh. 


(edit: taken the video down, link is no longer usable.) 
Demo: View attachment Pixel Collision Error.exe


Any ideas on what could be the cause of this? Also interested in knowing if there are any alternative collision scripts which function similarly for VX Ace - that is, assigning a non grid-restricted collision image/map to determine the passable/impassable areas. I know there is one for XP, and there may be one for VX? Seems like this is the only one for VX Ace, but I might be mistaken.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
I never used that script, but I have a pretty solid guess what is happening...


Since it only happens when you use a collision map, I guess, the collision image itself is created and stored in $game_map, which would prevent any saving/loading (because Sprite and Bitmap objects can not be saved).


If this is the case, the script will have to be modified to store that collision sprite/bitmap elsewhere, and the object storing it must not be included in save files.


This pretty much leaves Scene_Map and it's variables only, as any other present class will get saved by default.


Or, and this is way more elegant and quicker in performance during game-play, check the collision images right at the start, store only their collision data in any object, get rid of the bitmap, and use that stored object for checking the collisions. 


This solution can make longer loading times, but once it's loaded, it will perform faster when collision checks are made during the game (because it's faster to check for a simple boolean value from a hash than to read the color data of a bitmap).


Neither of the solutions would be hard to make.


My hands are full with commissions now, so I can't really give any practical help at the moment, but even without seeing the script(s) in question, I am pretty sure that I guessed the source of the error right (this is not the only script that made this same mistake), so try to pass this to Quasi, and he might fix it for you. It's his script anyway, so he will most probably fix it, nobody wants a broken script, right? :p


If I get some free time, and if the script isn't fixed by then, I will write it for you, although, no idea when that will be.
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
I never used that script, but I have a pretty solid guess what is happening...


Since it only happens when you use a collision map, I guess, the collision image itself is created and stored in $game_map, which would prevent any saving/loading (because Sprite and Bitmap objects can not be saved).


If this is the case, the script will have to be modified to store that collision sprite/bitmap elsewhere, and the object storing it must not be included in save files.


This pretty much leaves Scene_Map and it's variables only, as any other present class will get saved by default.


Or, and this is way more elegant and quicker in performance during game-play, check the collision images right at the start, store only their collision data in any object, get rid of the bitmap, and use that stored object for checking the collisions.


This solution can make longer loading times, but once it's loaded, it will perform faster when collision checks are made during the game (because it's faster to check for a simple boolean value from a hash than to read the color data of a bitmap).


Neither of the solutions would be hard to make.


My hands are full with commissions now, so I can't really give any practical help at the moment, but even without seeing the script(s) in question, I am pretty sure that I guessed the source of the error right (this is not the only script that made this same mistake), so try to pass this to Quasi, and he might fix it for you. It's his script anyway, so he will most probably fix it, nobody wants a broken script, right? :p


If I get some free time, and if the script isn't fixed by then, I will write it for you, although, no idea when that will be.


Thank you for the reply! And yes, you are completely right about the image being stored in $game_map.


I'll personally contact Quasi about this script bug, though from what I know he only exclusively offers active bug support to his MV plugins at this time. Regardless, I'll try and see if I can attempt to fix this error in the meantime, if he can't help or can't direct me to a fixed/updated version of this script.
 
Last edited:

Quxios

Veteran
Veteran
Joined
Jan 8, 2014
Messages
1,055
Reaction score
785
First Language
English
Primarily Uses
RMMV
Sixth is probably right. Don't really remember the Ace version so don't remember where it starts differing from the MV version. But you can just dispose the collision map (and region map, if ace had region maps) before trying to save. Then reload them after saving / loading. Or just move the collision maps out of the game map, into their own class that's not being saved.
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
Sixth is probably right. Don't really remember the Ace version so don't remember where it starts differing from the MV version. But you can just dispose the collision map (and region map, if ace had region maps) before trying to save. Then reload them after saving / loading. Or just move the collision maps out of the game map, into their own class that's not being saved.
By any chance - and this is kind of a stretch - could this also just be the result of not using the most up-to-date script version? May be completely wrong on this, but I believe this version (just labeled as v1) may not be the most recent one. (Obviously I'm not trying to use an older version haha, though if it is, that would most likely explain why I'm experiencing a bizarre bug like this.)


But regardless on whether or not that's true, I'll try seeing what results give me when disposing the region and collision maps before trying to save. If that does not work, I'll try and attempt the suggestions you and Sixth gave me. :) and yes, there are regions/region maps in VX Ace. There are also pixel regions that can be specified using color codes. If that also needs to be disposed when saving, I'm not quite sure how I'd approach doing so, if that is even necessary. (the pixel regions are "**Completely optional, and does not need to be used**", and in this case, I am not using them.) 
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
bump.

I am looking into finding some different options, too. Given that I'm not necessarily searching for circular/curved collisions, it might be worthwhile to attempt some collision using Khas Pixel Movement to increase/decreate the event collision boxes' size. (Also found out about the Omega Lunar Map Editor project quite recently & got curious about its rectangular collision editing, only to realize it's been scrapped for something much larger-scope ahah) Tsukihime offers something similar to this too, however that is restricted to the 32x32 grid. Hm..
 
Last edited:

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
bump. // I believe I've found an alternative. This takes away the use of non-rectangular and circular collisions, but it doesn't really matter for the project I am working on. 


In essence, I use custom region map collision boxes, with Quasi's Movement script. It allows for me to adjust the width and height of a region box. This can also be replicated with Khas' pixel movement, but may cause lag issues for slower computers. 


For now, I will no longer try to edit or tamper with the collision map script, but I will try to come back to it sometime in the future. People are free to access the demo if they wish to try and attempt to fix/modify the script themselves.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

"You can thank my later", "But you haven't done anything", "Well, that's why ..."
Are we allowed to post about non-RPG Maker games?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

Forum statistics

Threads
105,884
Messages
1,017,242
Members
137,609
Latest member
shododdydoddy
Top