Cleaning up the controls and stuff

Published March 30, 2012
Advertisement
Today I didn't do a whole lot with the graphics, and instead revisited the control loop for the combat state. Initially, the way the combat state worked was that all the player-controlled objects and all the enemy objects would be dumped into a Turn List. Each update (which happens about 4 times per second), the loop would check to see if the current active object was done with its turn. If finished, it would hand a BeginCombatTurn message to the next in line. Entities would execute their actions in turn, each receiving a specified number of Movement Points to act per turn. The camera was locked to the currently active object at all times, scrolling around to follow the object, and scrolling rapidly to center on the next object in turn. It was pretty effective and smooth, and I liked the feel of it, but it was a tad limiting to always have the camera locked on an object. This meant that you couldn't see anything but the immediate surroundings of the object, which isn't really good for a turn-based tactical RPG.

So today I tweaked the loop a bit to allow scrolling the view by moving the mouse to the edges of the screen. This scrolling is allowed during certain input states such as MovementSelect and AttackSelect (currently the only two states, besides WaitingForCommand and NoCommands). As soon as an action is executed, the camera will center on the acting object once more. When control passes to a non-player entity, the camera again will center as before. This allows a bit more freedom to examine the battlefield, while still retaining the camera-centering that keeps the player focused on whatever action is occurring.

The change has definitely increased the tactical feel of the whole thing. Next up on the plate is to write the overmap state code, for travel mode, and to implement the transitions to swap between Travel and Explore modes. There are a few design questions I need to iron out. Hopefully I can get some of that done tonight so that tomorrow I can go back to fleshing out the set of combat actions or tweaking the interface some more.

EDIT: Also, I decided I didn't like the health/energy bars I recycled from the real-time GC prototype. Too smooth and shiny, not befitting the wood-themed interface. Same with the button icons, but I still kind of need those, whereas I could safely remove the bars since they kind of offended me.

At any rate, here is a current screen showing not much new except how the new screen scrolling allows for selecting longer paths and seeing more of the terrain than before:

iT0H8.jpg
1 likes 3 comments

Comments

O-san
Glad to see this coming along nicely :) the new camera system sounds practical.
March 30, 2012 09:21 AM
JTippetts
Thanks. Although, I think the next game I make I'll try to license your Nimrod engine. I'm really liking some of the stuff you're doing with it. :D
March 30, 2012 12:12 PM
Programming020195BRook
I'm first! ;)
March 31, 2012 02:39 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement