MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Breakin the Grid!!
PostPosted: Sat 08 Jul, 2006 5:11 am 
Offline
Calc Wizard
User avatar

Joined: Wed 06 Jul, 2005 4:56 pm
Posts: 518
Location: 3rd rock....
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.

_________________
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.

Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat 08 Jul, 2006 10:00 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 4094
Location: I cant seem to get out of this cryogenic chamber!
You would just draw a 12x12 sprite in the space of a 16x16 sprite. Your movements/collision code should take of the rest.

Ill make a small demo for you soon.

_________________
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat 08 Jul, 2006 4:23 pm 
Offline
Calc King
User avatar

Joined: Sat 18 Dec, 2004 6:46 am
Posts: 2932
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 :P (saves me work XD).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun 09 Jul, 2006 1:20 am 
Offline
Calc Wizard
User avatar

Joined: Wed 06 Jul, 2005 4:56 pm
Posts: 518
Location: 3rd rock....
Its not the detection im worried about right now. That can be done pretty easily. Im afraid it will mess up the background with the extra space, even if it is centered.

_________________
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.

Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun 09 Jul, 2006 2:05 am 
Offline
Maxcoderz Staff
User avatar

Joined: Tue 24 May, 2005 7:25 pm
Posts: 317
Location: If I find out, you'll be first to know.
not if it is blank space, and you OR a base and XOR something to make the base into a sprite, effectivly adding it to the BG, then using REAL(3 to reload the BG (providing you had used REAL(9 beforehand) to erase the sprite and replace it!

_________________
Image
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun 09 Jul, 2006 4:30 am 
Offline
Calc King

Joined: Sat 26 Mar, 2005 2:45 am
Posts: 1619
Location: your shadow
um, just use masked sprites


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 10 Jul, 2006 4:15 am 
Offline
Calc Wizard
User avatar

Joined: Wed 06 Jul, 2005 4:56 pm
Posts: 518
Location: 3rd rock....
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&#3 by just using -and- on the sprite altered to have a black-filled bg in the sprite sheet instead of a white one.

_________________
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.

Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 10 Jul, 2006 5:01 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 4094
Location: I cant seem to get out of this cryogenic chamber!
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.

_________________
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 10 Jul, 2006 3:31 pm 
Offline
Calc Wizard
User avatar

Joined: Wed 06 Jul, 2005 4:56 pm
Posts: 518
Location: 3rd rock....
ok, that makes sense

_________________
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.

Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 10 Jul, 2006 4:49 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Tue 24 May, 2005 7:25 pm
Posts: 317
Location: If I find out, you'll be first to know.
necro wrote:
um, just use masked sprites


that is pretty much what I described, but in detail in case he didn't know how (my methodology may be a bit off because I haven't done xLIB work like that since March)

_________________
Image
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 10 Jul, 2006 10:18 pm 
Offline
Calc Wizard
User avatar

Joined: Wed 06 Jul, 2005 4:56 pm
Posts: 518
Location: 3rd rock....
I think theres alot of ways to do them.

_________________
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.

Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 14 Jul, 2006 3:08 am 
Offline
Calc Master
User avatar

Joined: Wed 22 Dec, 2004 3:07 am
Posts: 1454
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).

_________________
Image


"You're very clever, young man, but it's turtles all the way down!"


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt