Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Journal #4: Holiday

Sign in to follow this  


I didn't do more than a smattering over this last week, mostly because I knew that I had today as part of a three-day weekend (Columbus Day). That meant that, apart from some stuff in the morning, I had a relatively huge block of time to sit around the house and just code.

To start, part of my mouse controls was really bothering me. When I activated my console I would lose mouse input, or more accurately I would stop updating the render position of my mouse cursor. So I did the small amount of work (mentioned in a previous journal entry) to split up my logic control and move the mouse processing to the primary control loop. Which is probably where it belongs. Now my game loop looks like this (roughly):// init logic stack with logic instanceswhile( running ){ while( PeekMessage( ... ) ) { // message stuff } // calculate frame delta Input->Poll( ); // update mouse render position running = process_logic_stack( ); render_logic_stack( ); // render mouse cursor Graphics->Present( );}
I added an output history to my console so that all the commands and the strings that they decide to print are stored for immediate or later display to the user.

Next I got a handle on the rendering of my console. Here you can see it in the single-line mode.


After the user commits a command, this UI goes away. The command and all it's output are still committed to the history, so you can open up the normal console if something goes wrong. You can also see how the logic for the main game isn't processing the mouse position to update that blue tile highlight to be the one that is beneath the cursor (the white square).

Here you can see the standard mode of the console.


The last line is the text in progress (still need a cursor of some kind), and above that is the history. All the "testX" strings are what I typed and, because I don't have very many commands, all the 'fail' strings are the feedback output generated by the console. If it successfully executed something, it wouldn't print out anything unless the command itself printed something out. The history can be scrolled through with fairly standard PageUp and PageDown controls.

The rendering was kind of a pain in the butt, but I only have myself to blame for that. I'd still like to get to an immediate rendering mode to simplify what the console is doing, but that was already part of my todo list. At least I didn't find any new work that I wanted to do because of what I was working on today.

Features to still work in: text cursor, search, auto complete options

I'd also love to hear from anyone out there with regards to features of console systems like this that they like that I might appreciate including both as a user and from a technical implementation perspective.

Until next time!

Sign in to follow this  


Recommended Comments

There are no comments to display.

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!