Archived

This topic is now archived and is closed to further replies.

Would you guys like a console rendering library?

This topic is 5043 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, Firstly, despite the title sounding like I'm fishing, I'm posting in Beginners deliberately, so please don't move me to Your Announcements After a side topic on this thread, a thought occured to me. For all you guys dutifully making your first console apps in the promise that it'll help you move on to all the DirectX/OpenGL fun, it may be helpful to get experience of using some form of output API before you hit DirectX/OpenGL. I know that at first it can seem difficult to tell where "built-in" C++ ends and DirectX begins. It could well help you to understand what's going on when suddenly surrounded by a complex graphical API - ie, should help you to understand the various levels of abstraction and seperation at work. To this end, I was thinking of writing a simple rendering API for the console. Essentially, instead of doing printf("some text"); or cout << "some text"; when you want to print, you would call renderer.OutputText(lineNumber, ColumnNumber, colour, text); But, it would make it easy for you to do little windows and things too. You could have a far prettier replacement for int i; cout << "Please enter a number" << endl; cin >> i; by letting you do something more like int i = renderer.GetInteger("Please enter a number"); which would pop an ASCII red-bordered window up in the centre of the console *over* the text that's already there, with "Please enter a number" and a little input box. When the user entered a number the little ASCII window would close, and your original text still be on screen. This would give you experience of talking to a rendering layer and also hopefully make your console games look better by taking care of some formatting niceties for you. So, before I go ahead and write something, I wanted to see if anyone would like it. I should also add the disclaimer that I may have another completely wonderful idea in half an hour and completely neglect to ever implement this Edit: HMMM - I could even build in my ASCII rendering engine to allow picture display... but that might be getting away from the whole "simple API" point. www.coldcity.com code, pics, life [edited by - IainC on February 20, 2004 1:05:12 PM]

Share this post


Link to post
Share on other sites
Sign me up. Would be great but Even better to learn from the code.

If not to much trouble, might be good to make 2 files, one for the simple stuff and another with everything.

Technology can either save us or destroy us. Me ... I say it will destroy us if Microsoft is the example.



[edited by - Xeneth on February 20, 2004 2:52:50 PM]

Share this post


Link to post
Share on other sites
Cool - I'll see if I can whip something up as a side project. I'll stick something in Announcements if anything comes of it.

smitty1276 - Thanks man :D Yeah, it's mine - I wrote it during the ASCII fishtank contest on the forums a while ago... But there are better techniques out there using more characters and stuff. Check out the original thread if you can find it, it was pretty cool

Anyway, I forget the max size - but please feel free to play with it! Have a look at the realtime ASCII raytracer too...

[edited by - IainC on February 20, 2004 5:29:16 PM]

Share this post


Link to post
Share on other sites