Page 1 of 1

Best way of doing this

PostPosted: Sun Mar 04, 2012 4:40 am
by Hblade
I want to know what the best way to make "sections" of a map is. Watch in this video how eventually, yes the view stops scrolling, but when he moves onto a different area, it slides over and the views.. limits... are changed, by limits I mean, say for example, the first area is about 3 screens wide, 0 screens tall, but the second area is 1 screen wide, and 2 screens tall, so on so fourth.

Whats the best way of doing this?
http://www.youtube.com/watch?v=xN9WYo0H ... re=related

Re: Best way of doing this

PostPosted: Sun Mar 04, 2012 2:38 pm
by jimmynewguy
You could always make an array view_lim[] and set 0 to be the left, 1 to be right, ect. and then when the player enters a new "region" change the limit variable accordingly. Then when you have the view follow the player just make it's limits be the view_lim[]

Pyrometal did it in retro man
viewtopic.php?f=6&t=6329&p=44881&hilit=retroman#p44881

Differently in GOL
viewtopic.php?f=6&t=6330

And in gelman and raster he switched rooms through doors to switch the view limits.

Re: Best way of doing this

PostPosted: Sun Mar 04, 2012 6:45 pm
by Hblade
Right, and what would the best way be of writing a view limit function? One which I can change based on screen sizes, example:
Code: Select all
SetViewLimit(screens_x,screens_y);


But at the same time, I want it to be in a way where you can walk in the room from ANY angle and it'll still be limited.

By normal means, if you did it this way, you'd enter in the right and the view could scroll right about 3 screens. Well, if you walked in the left, the view wouldn't move left at all, instead it'd still be right 3 screens. So how would I go about making htis happen?

Re: Best way of doing this

PostPosted: Mon Mar 05, 2012 12:14 am
by Hblade
nvm I found it :)