MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Readme questions
PostPosted: Sun 28 Jan, 2007 4:58 am 
Offline
New Member

Joined: Mon 19 Sep, 2005 11:26 pm
Posts: 35
Hey, what does it mean by these? What does each setting do?
Spr_Method
Spr_UpdateLCD

Also, for the map drawer, how do you determine which number in a matrix is which tile?

Lastly I dont fully understand what these are:
ScreenStartX
ScreenEndX
ScreenStartY
ScreenEndY

Yes, I looked at the example that came with it :roll:


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun 28 Jan, 2007 9:28 am 
Offline
Calc King

Joined: Sat 05 Aug, 2006 7:22 am
Posts: 1513
Spr_Method: whether you want to draw the sprite directly to the screen (Overwrite)or invert the pixels you would otherwise draw (XOR)or only draw pixels where there allready is one AND there is on in the sprite at that place, or add your sprite to the screen (OR)

Spr_Update: update the LCD after the draw or not, it is best to update it at the last draw call to avoid flickering (ever done anything in OpenGL? this works a bit like it)

ScreenStartX: the X at which to start a tilemap - note that it is really that X * spritewidth, it lets you have an empty space at the left side of your map (you could display game statistics there forexample)
ScreenEndX: about the same, except it lets you leave space at the Right side of the screen
ScreenStartY: well you get the idea now, this leave space at the top.



shouldn't this be in the help section?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun 28 Jan, 2007 6:02 pm 
Offline
New Member

Joined: Mon 19 Sep, 2005 11:26 pm
Posts: 35
Alright thanks, also, when I move the player, how should I draw it? Oh and how should I clear the spot that the player was last at? ATM I have it redraw the Map then the player over and over in a while loop. This sucks up speed badly.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 29 Jan, 2007 10:37 am 
Offline
Calc King

Joined: Sat 05 Aug, 2006 7:22 am
Posts: 1513
drawing the map using overwrite will cause the player sprite to disapear aswell, so first draw the map, then the player, and you won't need to clear anything


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 02 Feb, 2007 2:33 am 
Offline
New Member

Joined: Mon 19 Sep, 2005 11:26 pm
Posts: 35
Thats what I have atm, but doesnt redrawing the map everytime suck up the frame rate?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 02 Feb, 2007 7:41 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!
Does you game scroll? If it just draws whole rooms, most people will draw the map to begin with and store it to a PIC. Then they will recall the pic at the start of the main loop which is a lot faster than calling the drawmap function again.

If the areas that the sprite can move in are always blank (white) you can just use XOR as your sprite method. Then to erase it you simply redraw the sprite over itself again.

_________________
"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 03 Feb, 2007 5:27 am 
Offline
Calc Master
User avatar

Joined: Wed 22 Dec, 2004 3:07 am
Posts: 1454
Location: Through the Aura
If your character sprite only moves over blank spaces, you can use either XOR or OR (you'll get the same result in that situation) to draw him, then XOR to erase him. If not, and you're using masking, you'll want to use AND logic to draw the mask, then OR or XOR (again they'll do the same thing here) the sprite on top of that; you'll want to have stored your map as a pic file right after rendering it, and then recall it to erase the character, or else you could redraw the single tile the character sprite is standing on, depending on your needs.

_________________
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  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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