#17726 - Lupin - Sat Mar 13, 2004 11:45 am
I am thinking of a way to display my map with some fancy rotating effect (so that i know where is north, west...). Well, i really would like to use hardware sprites.
I want to load the map as a 64x64 sprite, then translate the map along X/Y depending on the players position (so that the player is always at the center of it), then i want to rotate it depending to the players orientation (so that i know the direction i am flying), but i want the map to repeat!
I want to put the map into a circle shape too... well, but that's not that important at the moment (i think i can use windows for that... i have no clue about hardware sprites :P)
#17727 - poslundc - Sat Mar 13, 2004 2:03 pm
Was there a question here?
Go do the Pern tutorials to learn about sprites.
Dan.
#17738 - dagamer34 - Sat Mar 13, 2004 7:07 pm
I think he is past the Pern Project tutorials...
But, you do need a question somewhere so we can answer it. The 2nd paragraph sounds more like a request than a question.
Will this map be on a seperate screen or will it be on an in-gameplay display?
I was wondering, since we are talking about sprites, is it possible to do like a mode 7 effect with a sprite? That would make it like the map on say Zelda: LTTP but only smaller. Is that what you want?
_________________
Little kids and Playstation 2's don't mix. :(
#17740 - Gopher - Sat Mar 13, 2004 7:30 pm
Lupin wrote: |
I want to load the map as a 64x64 sprite, then translate the map along X/Y depending on the players position (so that the player is always at the center of it), then i want to rotate it depending to the players orientation (so that i know the direction i am flying), but i want the map to repeat!
|
I'm having a hard time guessing your level of experience with GBA programming. It sounds like you just want a rotation/scaling BG. Is there some reason you want to use a sprite instead of a background?
Now, as for putting the map into a circle shape, I'm not sure exactly what you mean by that. I don't know what a repeating circular map would be - you can't exactly tesselate a plane with circles. Maybe if you explain what you're trying to accomplish more clearly we can be more helpful.
dagamer wrote: |
I was wondering, since we are talking about sprites, is it possible to do like a mode 7 effect with a sprite? That would make it like the map on say Zelda: LTTP but only smaller. Is that what you want?
|
I've never tried (or heard of anyone else trying) to pull a mode-7 to perspective-draw a sprite, but I don't see any reason you couldn't update the matrix every hblank just like a background. Only difference is you couldnt make the sprite repeat.
_________________
"Only two things are infinite: the universe, and human stupidity. The first is debatable." -Albert Einstein
#17743 - DekuTree64 - Sat Mar 13, 2004 7:49 pm
I think for the looping you'll have to use 4 sprites, and calculate up their coordinates based on their rotation angles. And yes, a window would work for making it circular. Maybe like put the map sprites behind the BG, and then set the BG to disable inside the window, so they show through.
Hmm, how big is the map? If it's 32x32 or less, you could just put 4 copies of it into a 64x64 sprite and then all your troubles would be solved.
Or maybe you could put 2D sprite mapping to use and put 4 copies of the sprite data into the sprite memory and move the top left tile around the 2D sprite data like a tile-by-tile map scroller. You could just move the onscreen back 8 pixels when you jump a tile, to give the effect of pixel scrolling.
Or maybe you could do scrolling like most RPGs and sidescrollers do, where you copy in strips of tiles just offscreen. That way there's no limit to how big your map can be.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku
#17746 - Lupin - Sat Mar 13, 2004 7:55 pm
Well, i think deku understood my request. I just want to give the map a circular shape. Well, i think i have to use the 4 sprites method, though i don't know how i would make it repeat forever... The only real problem for me is the repeating part, the other stuff i can lookup somewhere...
damn it, my digicam just broke and i have no screwdriver for it ;(