Frames for Console C++

Does anyone know how to split a C++ console app into two frames.

I know about API but I want to use C++ not C, also API is too complicated for me right now :) Also, if anyone knows a frame tutorial for c++ that'd be great :D
Help is apperciated
Generally: you don't. I've never even heard of anyone wanting to do this before.


Sounds like you are trying to misuse the console. Why do you want to do this?
I want it to make a text rpg game..

If anyone knows how to make borders that would also be helpful
I assume you mean something like the independent "Sliding Panals" or Frames that you see on webpages written in CSS or Java? The ones that are really just redirects for other websites imbedded in the parent site?

You actually can't do this at all, not for the console that is emulated on Windows NT platforms. This is nothing to do with the C++ language, this is because the environment that the Command Console (cmd.exe) is based off of, MS-DOS, is single task and single thread oriented and does not have all of those "fancy" things like memory managment or process schedulers. The best you can hope to do is fake it, but this would be a lot more work, would give you poor results and would still require you to learn the Windows API pretty well for interprocess communication. See Here:

http://en.wikipedia.org/wiki/MS-DOS
http://en.wikipedia.org/wiki/Cmd.exe

I asked my local Linux Guru and have been informed that the Linux Console is multi-task capable and would be able to launch child processes to manage each "Frame", but this still leaves you with the problem of interprocess communication (learning the Linux API) AND the issue of returning output from multiple sources to the same window, then rendering it.
Last edited on
closed account (z05DSL3A)
Have a look at the following, it may be what you want.
http://en.wikipedia.org/wiki/Curses_(programming_library)
I want it to make a text rpg game..


You shouldn't use the console for this. It will be harder than the alternatives and will look uglier.

Read this for details: http://www.cplusplus.com/forum/articles/28558/
Last edited on
You know, I'll bet that no one wishes more then Disch for this site to have sigs in the forms.

@ OP: I'm with Disch about %95 on this, you could REALLY half-ass something that would be slightley easier then learning a new lib, but I highly suggest against that option since it would be a lot more work and Libs are so much fun once you get the hang of them. Also no one here is likely to help you with the resulting cluster**** code.

So when you say
I want to make a text rpg game..
Do you mean like a text based game where you type in the commands and read the storyline, like a Choose Your Own Adventure book? Or an ASCII Rogue style game where the characters and the world are represented with letters and symbols instead of images? This will let us know which direction to point you in for your next step. Sorry if all of this is getting redundent, I still remember getting started myself and I have to tell you once you embrace external libs the world opens up for you.
Last edited on
it seems like it would be more fun to wrap a text box with a stream class so you can output to a real windows text box using streams. then on the sides you could put buttons that act like slots and in the top middle make a alternating spot that shows your stats and a screenshot of yourself and the "playfield" in old school doom style. maybe im getting ahead of myself but it just seems like so much more is possible if you use real windows and stuff instead of console.
Last edited on
it just seems like so much more is possible if you use real windows and stuff instead of console.


This is true. I can't even express how true this is.

The console is severely crippling. It's nice for quick and dirty text dumping, but for anything else it sucks to work with.

This is true. I can't even express how true this is.

The console is severly crippling. It's nice for quick and dirty text dumping, but for anything else it sucks to work with.



I see..
Well...
Does anyone know how I'd learn to use windows without having to learn API? or is it unavoidable..

BTW, I'm making a "choose your own adventure" type of text game.
Last edited on
Does anyone know how I'd learn to use windows without having to learn API?


"API" just means "Application programming interface". Any kind of library has an API. Even iostream (cout) has an API.

You probably meant "WinAPI" which is the Windows API. And, no, you don't have to learn that.

If you want a game with any kind of drawing/graphics/text, then SFML is very easy:

http://www.sfml-dev.org/ <-- get it and follow the tutorials on this site


If you're just going to be printing text and nothing else, then NCurses is probably a better fit (Grey Wolf linked to it earlier).


Just don't be driven to text-based programs because you think they'd be easier. Graphics are not as hard as you might think.
Thanks Disch :)
Topic archived. No new replies allowed.