Need to Replace Console With a Grapics Version

Everything else that doesn't fall into one of the other PB categories.
oldefoxx
Enthusiast
Enthusiast
Posts: 532
Joined: Fri Jul 25, 2003 11:24 pm

Need to Replace Console With a Grapics Version

Post by oldefoxx »

Console is simple and easy to use. But it has gotten too small as monitor resolutions have climbed higher. It is not implemented the same on every system (has to be coded differently to fit each operating system), and only offers these choices: Color (background and character), placement (by row and column), and whether the character blinks or not. And it automatically scrolls the screen vertically once you reach the end of the last line.

Simple concept, easy to use, but masks the difficulties of making it happen. It's all drawn, pixel by pixel (a pixel is the smallest picture element a monitored can be measured down to, and is just one spot among the many that surround it).

There is no real control over displayed font or size. To make the Console type to appear bigger, you have to magnify it somehow. There are ways to do that of course, but not any real good ones. If you want the tyoe to be bigger, you need something besides the simple console to make it happen.

It's still all done in software. of course, but you need different graphics libraries to set the color and effectively turn each pixel on or off as needed. And you want that library to meet certain other requirements:

(1) Be cross-platform compatible, meaning that there are versions for each operating system that PureBasic runs on.

(2) Be free and readily available, so that everybody can get it or has it already.

(3) Be as simple to use as Console, but allows you to specify a few added features, namely:
(a) How may columns to display
(b) How many rows to display
(c) The font to use (such as a named TrueType)
(d) The size of the font
(e) Whether the character spacing should begin one character's width over or not (to center a line exactly).
(f) And a greater range of color choices for the foreground and background. In fact, the background could be made totally transparent with the right software, or replaced with an image.

There are a number of graphics engines that are cross-platform, and the problem really is solvable. What it does represent though is a challenge to find a restricted library that does these several things simply, and would be almost a drop-in replacement for existing calls to functions in existing Console programs. That lobrary would certainly do more, but you want routines added specifically for handling text over the Console area.

These are my thoughts on the subject. What do you think? While everybody is free to do it their own way (and some have already done so), it just seems to me that this is something that could benefit everybody. When I start off coding (either learning a language or trying something new), I might want to put something on the screen so that I have visual confirmation of my results. Designing or using a form is not where I'm at when this happens. I could write to a file then bring that up, but a Console seems more to the point.
has-been wanna-be (You may not agree with what I say, but it will make you think).
chris_b
Enthusiast
Enthusiast
Posts: 103
Joined: Sun Apr 27, 2003 1:54 am

Re: Need to Replace Console With a Grapics Version

Post by chris_b »

What are you asking for here? PureBasic has no control of how a console app looks, it's simply outputting text and accepting text as input. How it's displayed is typically decided by the OS, or for example a terminal emulator if you're running your program remotely.
oldefoxx wrote:It's still all done in software.
Nope. The program might be running in VGA text mode - eg. run a console app in WindowsXP then [ALT]+[ENTER] to switch to fullscreen.. now your computer is sending text directly to your graphics card, there's no software rasterization happening.
Post Reply