Jump to content
  • Advertisement
  • entries
  • comments
  • views

Cleaning up the controls and stuff

Sign in to follow this  


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:

Sign in to follow this  


Recommended Comments

Glad to see this coming along nicely :) the new camera system sounds practical.

Share this comment

Link to comment
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

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!