MaxCoderz
http://maxcoderz.org/forum/

Readme questions
http://maxcoderz.org/forum/viewtopic.php?f=21&t=2269
Page 1 of 1

Author:  wild8900 [ Sun 28 Jan, 2007 4:58 am ]
Post subject:  Readme questions

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:

Author:  King Harold [ Sun 28 Jan, 2007 9:28 am ]
Post subject: 

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?

Author:  wild8900 [ Sun 28 Jan, 2007 6:02 pm ]
Post subject: 

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.

Author:  King Harold [ Mon 29 Jan, 2007 10:37 am ]
Post subject: 

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

Author:  wild8900 [ Fri 02 Feb, 2007 2:33 am ]
Post subject: 

Thats what I have atm, but doesnt redrawing the map everytime suck up the frame rate?

Author:  tr1p1ea [ Fri 02 Feb, 2007 7:41 am ]
Post subject: 

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.

Author:  dysfunction [ Sat 03 Feb, 2007 5:27 am ]
Post subject: 

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.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/