Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Sign up now

Oh my glorious code!

4: Adsense
  • You cannot reply to this topic
21 replies to this topic

#21 Sik_the_hedgehog   Members   


Posted 11 August 2013 - 11:02 PM

Not necessarily. What I meant was doing some minimal coloring of whatever you're outputting, without taking over the entire console


That's exactly what I meant... =P

Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

#22 BGB   Members   


Posted 12 August 2013 - 09:23 AM

If stdout supports ANSI escape codes (e.g. the terminals on *nix or DOS with ANSI.SYS) you could use the escape codes for even more interesting stuff without moving away from the standard library. Colors everywhere!


ANSI codes are nifty...


FWIW, the console in my engine also supports them to some extent, though not to the level that allows a full UI (this currently requires hooking console events and drawing directly into the console buffer), thus leading to the funkiness of doing a DOS-style UI inside of a 3D engine (I actually have an in-engine text editor with a vaguely similar color scheme and style to QBasic and MS Edit, though actually a little worse as it partly handles most non-trivial commands VI-style...).


as-is, it would require some tweaks to the console, and probably something analogous to stdout/stdin, such as to allow "programs" the ability to receive user-input (beyond generally being one-off console commands). at that rate, it would almost be worthwhile to throw together a little logic to allow console-commands to trigger loading/executing self-contained script files.


say something like:

function main(argv:string[]):void
    var s:string;
    var a:string[];
            { ... }

I once considered possibly supporting render-to-texture with consoles, say to allow consoles to be textured onto in-game objects, but never did much with this.

Edited by cr88192, 12 August 2013 - 09:24 AM.