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
Readme questions
Moderator: tr1p1ea
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
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?
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?
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
- 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:
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.
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.
- dysfunction
- Calc Master
- Posts: 1454
- Joined: Wed 22 Dec, 2004 3:07 am
- 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.
"You're very clever, young man, but it's turtles all the way down!"