[Resolved]Understanding pixel movement, and passibility...

Started by Satoh, November 02, 2009, 11:28:13 pm

Previous topic - Next topic

Satoh

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)
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

winkio

November 02, 2009, 11:45:00 pm #1 Last Edit: November 02, 2009, 11:48:37 pm by winkio
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.

Satoh

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.
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

winkio

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.

Satoh

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...
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

Blizzard

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.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Satoh

I suppose I'll just have to find a workaround then.... or use some other program entirely...
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

Ryex

do you need a pixel movement script? if you do they exist I have a particularly good one myself...
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Satoh

November 07, 2009, 05:50:54 pm #8 Last Edit: November 07, 2009, 05:56:38 pm by Satoh
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
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

G_G

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.


Satoh

I see... well... maybe I'll give it another shot then...
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

Ryex

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
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />