I've been asking a lot of questions...
Displaying 1-8 of 8 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
ShadowDrak

I'm implementig pixel-perfect obsructions in V2.7.
I'm at a loss as to how I should keep a bit-mapped list of pixel obstructions. I could enter them into arrays or lists by hand, but that would be stupid.
Any suggestions are welcome.

-ShadowDrak



Posted on 2001-08-16 16:28:46

Hatchet

I used a system like this for Mannux. It's not v2.7, but it should give you ideas. I simply I stored the obstruction data as another layer - colored means obstructed, noncolored means not. Grab the data from that layer. Shouldn't be too hard. ;)

-Hatchet



-Hatchet

Posted on 2001-08-16 18:56:42

ShadowDrak

no text



Posted on 2001-08-16 19:36:42

ShadowDrak

In verge 2.7, the only function i see to get tile information is GetTile. It returns an integer. But How can I manipulate the pixel data of that tile? or is there a function that returns a specific map pixel that i require?

ShadowDrak=[] --the python version of me. declared to leave room for my other personalities




Posted on 2001-08-16 20:17:31

Hatchet

I know the method, again, but since this is v2.7 I don't know the details. If there is a way of getting tile image data then it is easy. (If there isn't, tSB should add it ;) Use the integer gettile returns to figure out what tile image to use... find out what pixel it's pointing to in the tile (use the MOD operator ;) and grab it. You can put that all into a neat little function, GetTilePixel. Here's some V2 code you can try to convert into V2.7 (From Mannux, and coded by Zaratustra :)

int GetTilePixel (int x, int y, int l)
{
int i,ofs;
i=GetTile(x/16,y/16,l);
ofs=(256*i)+(x%16)+(y%16*16);
i=byte[vsp+ofs];
return i;
}

Enjoy! Keep in mind that's 8-bit mode code too... ;)



-Hatchet

Posted on 2001-08-17 17:28:33

ShadowDrak

It doesn't currently look like there is a way to get image data from tiles in 2.7... I think i'll use the .png version of the .vsp and get pixel data from there. Hopefully they add something eventually...



Posted on 2001-08-17 18:21:58

andy

Sorry, there's no way to read the tiles actual pixel data yet. It's on the TODO list, though. (it's a big list)



"Ignorance is its own reward" -- Proverb

Posted on 2001-08-18 13:25:06

ShadowDrak

I got a pixel system working. I decided to forgo it in favor of using normal obstructions in extreme high res mode. 1280x1024... I might make it slightly lower.
the logic for using pixels was took too much processing power and it slowed down the engine and made it choppy. anyway... i'm almost done with my character movement stuff. i was wondering if you can change tiles to 8x8. maped keeps crashing if i try.



Posted on 2001-08-19 16:07:18


Displaying 1-8 of 8 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.