Page 1 of 1
Why doesnt the camera stay centered?
Posted: Fri Oct 14, 2011 5:24 am
by Elvisman2001
Is there anyway to make the camera stay centered over the player's character? I think it would be more comfortable for the player character to remain at the center of the screen and have the background scroll beneath it instead of it actually straying from center. Hope this makes sense.
I must admit that i also have some selfish reasons behind this, but i really don't see why it wouldn't be better. If you can remember back to the old Ultima games, i do believe this is how they worked.
Re: Why doesnt the camera stay centered?
Posted: Fri Oct 14, 2011 5:42 am
by bricks
It's actually much, much better than it used to be. You can actually always stay "centered" if you make a number in the Game Options high enough.
Re: Why doesnt the camera stay centered?
Posted: Fri Oct 14, 2011 7:12 am
by marvalis
Setting the scroll distance to 20 does not make the game center on the player, sadly.
If you want to try that, press escape in game and go to game options, then change the value of scroll distance (as bricks already posted)
It would be nice if there could be an option to always have the map centered on the player.
To do this scrolling beyond the border probably has to be enabled somehow.
Re: Why doesnt the camera stay centered?
Posted: Fri Oct 14, 2011 7:15 am
by darkgod
Hum ? I dont understand, setting it to be higher than half the max number of tiles drawn on screen should always center.
Like if you can display 20x15 tiles, setting it over 10 should work
Re: Why doesnt the camera stay centered?
Posted: Fri Oct 14, 2011 12:27 pm
by Elvisman2001
That worked for me. Awesome.
Maybe not in the appropriate place, but I am supposing it is possible to hard code this in a custom module so that it is how the game works by default and non configurable?
Re: Why doesnt the camera stay centered?
Posted: Fri Oct 14, 2011 12:30 pm
by darkgod
very easy

it's the moveViewSurround call in Player:move
Re: Why doesnt the camera stay centered?
Posted: Fri Oct 14, 2011 4:00 pm
by marvalis
If I set distance at 20, and I come to the edge, then the map does not stay centered on the player:

- edge.jpg (20.66 KiB) Viewed 2195 times
The map does not 'scroll' beyond its border.
Re: Why doesnt the camera stay centered?
Posted: Fri Oct 14, 2011 4:08 pm
by Elvisman2001
Ah. i see. Thats a semi problem then for what i want to do i think.
I'm still fleshing out my design doc so, i will have to wait till that's done. i like to get everything on paper before i do anything.
I'm wanting to go for a real "board game" type feel in a custom module.