DaFool wrote:Can arrow keys be used for panning?
Hmm. On one hand, it would certainly be possible, and would avoid the need for further UI elements.
On the other hand, I don't know whether it would be so intuitive; bear in mind that presently, it's possible to play the entire thing with the mouse.
On the third (and probably more relevant) hand, the arrow keys are already used if you play with the keyboard for selecting menu items and hotspots (which reminds me, I should really try and remember to add a hover state to the move 'gem' button...), and it would be a little confusing and annoying, I think, to have the camera panning around as you tried to select where to move to.
DaFool wrote:
I think onscreen scrollbar buttons will work, but like iPhone apps tend to be cumbersome.
I was also wondering about just stretching buttons across the whole edge of the window and using the hover event to move the viewport, so the user just has to move the mouse to the edge of the screen to scroll a bit.
The potential problem that I'm most worried about at the moment is what to do with panning versus parts of the battle UI being visible; that is, if there's a load of target buttons on-screen for selecting the target of an attack, what happens when the user scrolls? I'm concerned that either the buttons will be left in place, or the whole context of that attack menu will be lost when the battle redraws itself in a new position, either of which is pretty bad.
DaFool wrote:
Maybe take a cue from 3D engines and have a custom "camera" viewport that can be configured to track the currently selected fighter or enemy.
This is basically the lines I'm working along; the battle itself has a 'CameraX' and a 'CameraY', then I'll have a few Extra classes which move the camera around in different ways.
DaFool wrote:
That means that everyone has to adhere to a standard grid unit so you can calculate how many tiles to the left/right or north/south of the current target should be drawn. I know it's different from the tile/unit engine that was able to use a viewport but in our case we might still need a Boolean to Display /or not so we can draw only a portion of the map. I don't know if this made sense.
I'm not sure I follow that at all, I'm afraid...
The engine knows how big a grid square is in the user's implementation, and how big the screen is, so it's theoretically plausible to check tiles which are off-screen and not draw them if they're not going to be shown. But this would require rendering every sprite which was in an off-screen tile into a Render to find out how big it is and thus whether it needs to be drawn so it can be seen poking on the edge of the screen, which means you're not saving any time. (It's not a value which can be kept, because sometimes those sprites will be animated and have different-sized frames, and under some battle conditions they'll change state and might have a completely different Displayable with a different size).
On the other hand, PyTom tells me that Ren'Py at least tries to work out whether it needs to display a given Displayable or whether it's off-screen and behave efficiently, and I don't have any reason to believe it would do it worse than I would, so I was just going to leave it to Ren'Py.