Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: Satoh on November 02, 2009, 11:28:13 pm

Title: [Resolved]Understanding pixel movement, and passibility...
Post by: Satoh on November 02, 2009, 11:28:13 pm
First off, having poured over the original tile movement process, and attempting to modify it myself, I realize I don't understand what it's doing in the least.

Moreover, I REALLY don't understand how pixel movement works...


What I'd like to know, if anyone can help, is:

How can I create a partially passable area... By this I mean, an impassable space that is smaller than 32x32.
I'm assuming that pixel movement such as that in TONS reworks the passibility tests... (I'm assuming that's what "intelligent passibility" does)
So I need a bit of a breakdown on how the passibility check works, in order to attempt to make a 16x16 passibility check, or 8x8, and so on...

(I currently plan on using either a special set of tiles as barriers, or terrain flags to differentiate what areas will be of what passibility size.)


So, I would like to call out once more, to those more experienced with programming than I at the scripting arts.

Here is a list of sizes I hope to incorporate into my test:

32x32
32x16
16x32
16x16


The next two would be for smoothness of navigation around objects that are round or very small... (I imagine these will be the most complicated to test, by far)
16x16(with a 45o diagonal edge)
32x32(Diagonal edge)


So, could anyone please give their input? (I apologize if this type of script movement is too much to explain)
Title: Re: Understanding pixel movement, and passibility...
Post by: winkio on November 02, 2009, 11:45:00 pm
To determine passability, the map is divided up into a grid.  All pieces of the grid are the same size.  Be default, this size is 32x32 pixels, although you can change it to something else.  

If you have more than one type of pasability size, use the least common multiples of the dimensions so that you can get the combination you need.  For example, if you need both 32x16 and 16x32 passabilities, use a 16x16 pixel grid.  

If you want really small passabilities, your grid must be really small.  "Pixel" movement is when the grid size is 1x1, so you can determine the passability of each pixel on the map.  In this case, it is usually too inefficient to do by hand, so they load the passability from an image, where a black pixel might represent impassability while a white pixel might represent passability.
Title: Re: Understanding pixel movement, and passibility...
Post by: Satoh on November 03, 2009, 12:05:38 am
Quote from: winkio on November 02, 2009, 11:45:00 pm
   ...
load the passability from an image, where a black pixel might represent impassability while a white pixel might represent passability.


Ok, I like that idea... in fact for what I have in mind it would be ideal, but I wouldn't begin to know how to do a test for that...



Oh! Also, does the actor in the screen have a size? I'd assume the actor is, like the events, 32x32... I ask because there may be areas that have a 1x1 pixel hole, and I need to know if the character will fit through that (at a 1x1 passibility scale of course).

In the mean time, I'll dig through the original scripts to try and see how they work again...


EDIT: And thank you for the reply, it was more helpful than you may realize.
Title: Re: Understanding pixel movement, and passibility...
Post by: winkio on November 03, 2009, 01:12:41 am
I don't know how it works in RGSS, but you basically take an image, then just take one of the 2D matrices (for R, G, or B, it doesn't matter which), and then go through and say 0 is one thing, and 255 is something else.  That was a somewhat unspecific explanation, but you need to get the array of pixels and build the passability array from it.

I don't really know the specifics, because I've never messed with it before, but yes, all events have a size, which is by default 32x32.  You should be able to change it as well.
Title: Re: Understanding pixel movement, and passibility...
Post by: Satoh on November 03, 2009, 03:04:53 pm
well I looked over a few scripts... I tried very hard to understand the process... but I really just don't get it...

It seems f0tsbearchen's pixel script does some of the things I need... but I can't understand those either... and they use the SDK...
Title: Re: Understanding pixel movement, and passibility...
Post by: Blizzard on November 03, 2009, 05:16:25 pm
You should give yourself a break. Stuff like pixelmovement isn't that easy to make. You might wanna gather some more experience first. When I once thought about making an online system, I was like "WTF how?!". Today it's a different story. I made RMX-OS after all.
Title: Re: Understanding pixel movement, and passibility...
Post by: Satoh on November 07, 2009, 03:10:21 pm
I suppose I'll just have to find a workaround then.... or use some other program entirely...
Title: Re: Understanding pixel movement, and passibility...
Post by: Ryex on November 07, 2009, 04:47:39 pm
do you need a pixel movement script? if you do they exist I have a particularly good one myself...
Title: Re: Understanding pixel movement, and passibility...
Post by: Satoh on November 07, 2009, 05:50:54 pm
Quote from: Ryexander on November 07, 2009, 04:47:39 pm
do you need a pixel movement script? if you do they exist I have a particularly good one myself...


I need a script that checks passability at 16x16 instead of 32x32... or one that uses a collision map.

I have f0tz!baerchen's script, but it is a bit choppy, I get occasional drop frames and aside from that I don't have a clue how it works or how to modify it to my needs...

EDIT: And I despise the SDK
Title: Re: Understanding pixel movement, and passibility...
Post by: G_G on November 07, 2009, 06:00:58 pm
it doesnt require the SDK, the demo just comes with it because some of the scripts he uses requires it. I think he's just showing that pixelmovement is compatible with SDK.

Title: Re: Understanding pixel movement, and passibility...
Post by: Satoh on November 07, 2009, 06:22:43 pm
I see... well... maybe I'll give it another shot then...
Title: Re: Understanding pixel movement, and passibility...
Post by: Ryex on November 07, 2009, 06:33:17 pm
also make sure you have the latest version. also there is two options for his pixel movement he created a light version for his script so visit his site