Users browsing this thread: 21 Guest(s)
A Mario fangame! It's a fangame! With Mario!
#63
(09-11-2012, 02:48 AM)Yal Wrote: You could always use a surface, render the tiles to that, and draw it somewhere. Or use two views. I learned a nifty little trick: if you have a view outside the room region (Behind The Black of the top-left corner) and have background color disabled, the stuff drawn on it will feature transparent pixels where there is nothing. If this view is drawn on the screen on top of another view, you can use this effect to e.g. create a non-rotating HUD on a view_angle'd view... or use a normal view for the background and the BDB view for the game.


As for the pixels:
Use a counter so that you move the tiles, say, 1 pixel every 2nd step or so, or every 4th step. (Basically, use a counter to see how many fractions of a pixels the background oughta have moved, and when it's a whole pixel or more, move the tiles and adjust the counter accordingly). I did that with the intro parallax in Shattered World to get the mountains right.

I used that second method, the steps and counters and rounding and stuff, and it works beautifully! I can't believe I didn't think of it before, it makes so much sense seeing the actual code.

Thanks a bundle!
[Image: StickerStageItems.png]
Check out this review blog thing I do! Dragon Ball Xenoverse 2 for Nintendo Switch was the latest review!
Thanked by:


Messages In This Thread
RE: A Mario fangame! It's a fangame! With Mario! - by Zero Kirby - 09-14-2012, 07:42 PM

Forum Jump: