Breakin the Grid!!
Moderator: tr1p1ea
Breakin the Grid!!
A lot of the xLib games out there (especially my zelda game unfortunately) are very "griddy." By that I mean the screen looks like just a bunch of squares. Dont get me wrong, it's great if you want to do say...Tetris, but some games can do without. I want to make a game where a 12x12 characters are on a 8x8 tilemap that flows well. The problem is, Im not sure how to do it right now. Obviously I want to use real(1, but the width has to be a multiple of 8 and I dont know how to get around that. 16x16 would be way too big, and even if it was used, the game would still have that grid.
Yeah, like tr1p said. You would just need a nicely modified detection routine, which would allow you to walk closer to the tiles or w/e. You could either put the character in the center of the 16x16 square (which I would do) or off center. I would make some sort of sample, but since the master himself is going to I will not (saves me work XD).
whats the fastest way to do sprite masking. I was thinking instead of messing with the entire pic, doing
1. -or- the base
2. -xor- the same base to create the hole
3. -xor- the actual sprite
then i thought i could just combine #2 by just using -and- on the sprite altered to have a black-filled bg in the sprite sheet instead of a white one.
1. -or- the base
2. -xor- the same base to create the hole
3. -xor- the actual sprite
then i thought i could just combine #2 by just using -and- on the sprite altered to have a black-filled bg in the sprite sheet instead of a white one.
- tr1p1ea
- Maxcoderz Staff
- Posts: 4141
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: I cant seem to get out of this cryogenic chamber!
- Contact:
You have 2 sprites, 1 is your actual sprite, the other is your mask. With your mask, any areas which you wish to be shown as see-through/transparent you would draw as black. Any areas which would be taken up by your sprite would be white. Then you would AND the MASK, followed by an OR of the SPRITE.
- dysfunction
- Calc Master
- Posts: 1454
- Joined: Wed 22 Dec, 2004 3:07 am
- Location: Through the Aura
What I used to do with Omnicalc (yep, I'm pretty sure I did the first ever BASIC sprite masking) is OR the mask/base, then XOR it, then OR the sprite. Omnicalc didn't have an AND sprite feature. With Xlib, all you need to do is AND the mask, then OR the sprite (XORing the sprite works just as well).
"You're very clever, young man, but it's turtles all the way down!"