Showing posts with label GUI. Show all posts
Showing posts with label GUI. Show all posts

Thursday, October 17, 2013

The Job Process

Finished up the revisions to pathfinding. I've been thinking about how to get the robots to automatically pick up and finish jobs, and this is the process I'm going to use.

  1. Create job at location. Jobs have required resources and required labor.
  2. Find the nearest available resources and create a hauling job for each one.
  3. Find the nearest and most qualified robot to complete the job.
  4. Once all resources have been gathered, signal the robot to come complete the task. 

In general, jobs may depend on other jobs being completed. Most will require at least one hauling job to move something from one place to another. The only part of that process I'm still shaky on is finding the best robot for a given job. For example, how far away does a well qualified robot have to be before it's better to just pick a nearby under qualified robot?

Thursday, October 10, 2013

Debugging: Hours of Hard Work Just to Break Even

Today I fleshed out the GUI system and made it usable. I added in a sub-menu to test it out; it should be easy enough to fill out the items as I need them. Aside from that, I got sidetracked with a handful of annoying bugs that took a while to track down. One was in my bitmap importer. It was turning some of my textures red. There was another with a small change I made to the input system. Turns out I just wasn't calling the function. The goal for tomorrow is to be able to order robots to be built. Not sure how long it'll take me to write AI for the bots to actually carry out those orders. I've been playing a little Dwarf Fortress in my spare time hoping that I might pick up some ideas on how to implement it. Additionally, I headed into the city and had a few beers with some people I know, because it's important to leave the house occasionally.

Tuesday, October 8, 2013

Uneventful

I'm trying to put together some kind of event system for the menus. It's making me miss C#. I love C++, but its pretty much terrible when it comes to event driven systems. The whole thing's proving to be a bit more tricky than I anticipated. I've never really thought in depth about how to make a good GUI from a programming perspective. Will continue working on it and have another post tomorrow.

What's On the Menu

Today I renovated the text renderer. Once drawing text was no longer a huge hassle, I started working on the GUI and now I finally have one! The buttons don't do anything yet, but they're there and they're being drawn. Here's a break down of what each button is for:

  • Log - Opens up the mission log. This lists important events in the order they have occurred.
  • Construct - Choose robots and/or buildings that you want built.
  • Orders - Order your robots to perform certain tasks, like mining and paving roads.
  • Stockpiles - Designate where resources and other items are to be stored.
  • Mission - Checklist of mission goals.
  • Robots - A list of all your robots and what they're doing.
  • Jobs - A list of jobs in progress and which robots are working on them.
  • Priorities - Order the importance of various tasks.
  • Status - General status.
Obviously, those are all subject to change, as is the layout and sizing. Tomorrow I will work on getting the buttons to actually do things.