Salomonsson.se
Apr 19 2018

Cpp text console application, part 3

Now writing to bufferes and writing those to the output. Writer class that prints text character by character and interprets simple commands (right now only newlines and changes in speed and pauses). Two days left to Ludum Dare.

Tutorial that describes pretty much exactly what I’m playing around with

http://cecilsunkure.blogspot.se/2011/11/windows-console-game-writing-to-console.html

Good to keep as reference!

https://github.com/Tommislav/cppTextEngine/commit/1110c6c53b7abb51c5c5a34364d7f450046d8c35

Mar 15 2018

Cpp text console application, part 2

More fun with your terminal:

  • Colors
  • Write character at position

So far I’m surprised by the speed (the delay you see is actually me pausing the thread)! The last time I tried stuff like this directly in the terminal it flickered like hell. But that time I was using conio.h, this time I write stuff myself using only windows.h.

I’m not using buffers yet, only moving cursor and writing to that position. Guess writing to buffers will make it even faster. But thats for another day…

Feb 11 2018

Cpp text console application

Ok, for the first time in a long while I got two hours that I could spend on programming! Need to refresh my c++ knowledge quite a bit (the metro siberia part below uses OpenFrameworks to do all the heavy work for me). But in these two hours I still managed to:

  1. Create a makefile (my very first one)
  2. Code a small console application in VIM (and compile it using :make)
  3. Have the program print out text letter-by-letter
  4. Read the content of the text from an external text file
  5. Store config flags, such as speed or pause in the text document

Not very exciting, and now the time is up. Time to hit the bed. Felt good to do some programming anyways.