473,811 Members | 2,820 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Library for random-access console screen functionality?

Hi,

I'm just learning cpp, and something I've had on my mind for awhile is
to make a little "virtual console screen" class structure.

In it I want to be able to do "text animation" - moving letters across
the screen position-by-position, and whatnot.

First thought was to make a 2d array representing the screen, do
whatever updates i want, then cout it all - update by update, frame by
frame.

I assume this would be absurdly slow?

Is there a library already out there that contains this sort of
functionality? It'd be cool to check approaches taken by others...

Just to be clear - I'm imagining this all taking place in console-text
output - no graphics of any sort are in view here.

Apr 15 '06 #1
2 1956
On Sat, 15 Apr 2006 10:59:56 -0700, sherifffruitfly wrote:
Hi,

I'm just learning cpp, and something I've had on my mind for awhile is to
make a little "virtual console screen" class structure.

In it I want to be able to do "text animation" - moving letters across the
screen position-by-position, and whatnot.

First thought was to make a 2d array representing the screen, do whatever
updates i want, then cout it all - update by update, frame by frame.

I assume this would be absurdly slow?

Is there a library already out there that contains this sort of
functionality? It'd be cool to check approaches taken by others...

Just to be clear - I'm imagining this all taking place in console-text
output - no graphics of any sort are in view here.


it's not c++ specific, but under unix, curses and its successor ncurses,
are used for text handling on CRTs.
Apr 15 '06 #2
noone wrote:
it's not c++ specific, but under unix, curses and its successor ncurses,
are used for text handling on CRTs.


And even on TFTs, too.

Apr 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
1899
by: Hung ho | last post by:
Hi. I just finished reading an introductory Python book called "Python Programming for the absolute beginner" by Michael Dawson. I found it very interesting, and easy to follow. Python does really look similar to C/C++ and Java. In the book, the author imported other modules that were from the standard library of Python. I tried reading some of the modules in the standard library in Python's Lib folder. I'm just a beginner to Python, and didn't...
8
5237
by: Felix Wiemann | last post by:
Hi! I want to create a module myproject.ui.curses, which needs to import the curses library. However, if I just write ``import curses``, the module imports *itself* instead of the standard library's curses module. Is there any (reliable) way to access a module of the standard library if the names conflict as in this case?
2
2441
by: F. Petitjean | last post by:
I have written a script to find the modules which export the largest number of names. The gc.getreferrers(*objs) function gives also an idea of the dependencies between the modules. The code (statsmod.py) : #!/usr/bin/env python # -*- coding: latin-1 -*- """
2
2626
by: Phipps Xue | last post by:
Hello All, I wanna write an small game which need to generate a random string each time. It should go like this. TCHAR tmpStr; unsigned int nLen=50; TCHAR seedStr=_T("dummy seed"); int ret = randomstr(tmpStr, /*returned random string*/
9
8301
by: TheOne | last post by:
Would anyone please point me to a list of reentrant C library functions? I want to know which C library functions are safe to use inside a signal handler across all platforms. Does GNU C library make few other functions reentrant on Linux platform? I have searched a lot on the web for it but without any success. Man page of signal(2) has listed system calls (POSIX 1003.1-2003 list) which are safe(reentrant) but thats not sufficient for...
10
1825
by: mwt | last post by:
So in a further attempt to learn some Python, I've taken the little Library program (http://groups.google.com/group/comp.lang.python/browse_thread/thread/f6a9ccf1bc136f84) I wrote and added several features to it. Readers now quit when they've read all the books in the Library. Books know how many times they've been read. Best of all, you can now create your own list of books to read! Again, the point of all this is to get used to...
13
2098
by: Richard G. Riley | last post by:
In another thread it was pointed out that I'd made a booboo with strcpy : one that that I've, if I'm honest, made many times before. Not out of badness, just because since I first programmed C back in 1986 (and have done so for about 25 % of the time since then) or so I never really looked at the manpage for strcpy : this combined with K&Rs famous pointer lessons which lead to 2 or 3 versions of a linear start to finish strpy implementatin...
4
1698
by: Bill Jackson | last post by:
Is there a preferred random library? scipy.random random Besides scipy's library returning ndarrays, is there any other advantage/disadvantage?
0
1512
by: Akkad | last post by:
ok let met tell u what is the problem , i have downloaded the code GD library code from interent and when i am using it the picture is not appearing on the page. i don't know why ? i am using PHP 4.0.6 on Appache server under linux operating system. so plz if someone have an idea about the problem plz answer me. <?php
9
5482
by: Lars Uffmann | last post by:
Is the ctime library really that poorly designed, or is it just me looking to do things the wrong way? The whole concept of the struct tm seems way too highlevel for my taste - this is something that I would implement myself if needed. I have started programming c++ long before I did Visual Basic, and even before Visual Basic was around. However, one has to give credit, where credit is due: What's wrong with the (imo really good) VB...
0
10644
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10394
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10127
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9201
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4336
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.