Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mis's Seemless Stuff... kinda...
#1
Alright i'm adding Mis's system to my game, but i'm going to change it up a bit after i get it working correctly. The problem for me? Getting it to work correctly :lol:

I've optimized my surfaces (like BigRed did with his tutorial), so the tiles aren't constantly redrawn. So my obvious (or so i thought) solution, would be to blt the surrounding maps all at once like you do with the normal maps. The problem that i run into though is that they aren't blting where they should be.

If anyone has a suggestion as to the best way to do this, please let me know. I thought about just going with my own system for this, but since it's pretty close to what i'm shooting for anyways i think i'm going to use it. Any info would be great :-)
Reply
#2
The main part you are having problems with is the modified blttile subs I guess?
I'm not sure how your system is different, but the change to blttile converts the passed in x and y values into the actual shifted x and y values, so....yea its hard for me to explain because it just kinda makes sense to me :\. I'm not sure what part you don't understand.
Reply
#3
i dont' have blttile subs anymore. i have a bltmap, it blts all of the different types of tiles all at once... one time.

i think i may have a way of doing it though, so i'm going to try it out and see what happens. Smile
Reply
#4
yea but in the bltmap you would blt a tile Tongue
Reply
#5
yeah, i was trying to make it blt the tile, to the left of the current map (i didn't bother with the other directions). Played with it for a bit but couldn't get it working right. I think i'm going to remove it... but if you want to play around with it for a bit before i do i'll shoot you my client source. I didn't really take the time to attempt to understand your system, i think i'm just going to go ahead and write my own.
Reply
#6
I really don't think its much that you have to change :\
Reply
#7
Misunderstood Wrote:I really don't think its much that you have to change :\

hey,

but the seamless map systems always needs "XOffset" and "YOffset", which are updated all the time since they are in the gameloop, and as far as i know, the optimized surface tut wih bltmap will be called one time, and thats about it then o.O
Reply
#8
Ah good point, thanks. Verrigan's version would work, but its much slower than mine.

You would have to blt new regions of the map as they walked, onto your map surface, so it would still require a decent amount of changing.
Reply
#9
yeah that's where i was having the problem. Since the x/y aren't sent to the blt, because it isn't constantly redrawn it didn't work. My though though, was to expand the drawing area if the map had a west/east/north/south etc. and then just start the blt from there (e.g., if it has a west then the drawing size would be from -17 to 15... maps are 16 [0 to 15] tiles wide), then just draw that area and have it scroll anyways. It might work, but i just thought about it this morning and haven't bothered to try it yet.
Reply
#10
What you would do is, you would draw it somewhat normally whenever you do your first draw, then each time they move, you would draw the outer portions of the visible area again.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)