Best way of doing this

Talk about making games.

Best way of doing this

Postby Hblade » Sun Mar 04, 2012 4:40 am

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
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Best way of doing this

Postby jimmynewguy » Sun Mar 04, 2012 2:38 pm

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.
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: Best way of doing this

Postby Hblade » Sun Mar 04, 2012 6:45 pm

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?
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Best way of doing this

Postby Hblade » Mon Mar 05, 2012 12:14 am

nvm I found it :)
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest