The Mother Board

Motherboards.org forums. Free tech support, motherboard ID, and more.
It is currently Wed Aug 15, 2018 5:42 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Clearing the screen?
PostPosted: Tue Apr 19, 2005 10:20 am 
Offline
Black Belt 1st Degree
Black Belt 1st Degree

Joined: Sun May 11, 2003 8:47 pm
Posts: 1486
Location: Omaha, NE
Hello all, I was just wondering how I would go about clearing the screen in C++. I'm using Microsoft Visual C++ v6.0, and using a C++ Source file. I haven't yet learned how to program a Win32API yet, so hopefully that info helps you determine what would be best. I am basically trying to make a Text-Based RPG sort of like Materia Magica, but a single player version. Right now I'm trying to clear the screen after displaying the main menu and letting the user make their choice. I'm trying to take this step by step really. Once the user get's into the actual game, I'm trying to display the area and the player's info (Health, Stamina, and later I'll add in Spell Points) and then let them make their choice. We'll, I think that I've given enough info to get you started. If you've played the game, shout out some suggestions for how to do certain things. If you haven't played it, CHECK IT OUT! It is so much fun, and then you would be able to help out. In fact, if some people made some classes for certain functions, than we could all work on it. Well, have at it! :twisted:

_________________
Tono Sien


Love is the greatest conspiracy, by the most loving genius.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Apr 19, 2005 11:23 am 
Offline
Black Belt 2nd Degree
Black Belt 2nd Degree

Joined: Mon Aug 09, 2004 7:33 pm
Posts: 2740
Location: Milwaukee - Wisconsin
this shows a way of creating your own little clearscreen function.

http://cpp.enisoc.com/articles/clrscr/

unless you are using the Borland-type C++ compiler, there's no built-in clearscrean.

-Roach

_________________
Lian Li Lancool First Knight Series PC-K59W
Intel Core i7-960 Bloomfield 3.2GHz
EVGA X58 FTW3 132-GT-E768-TR
EVGA GeForce GTX 1070 FTW GAMING ACX 3.0
G.SKILL Ripjaws Series 12GB (3 x 4GB)
Crucial M4 128gb SATAIII SSD x2
Crucial M4 256gb SATAIII SSD
OCZ Saber 1000 960GB Enterprise SSD
Corsair Professional Series HX850 PSU
Dell UltraSharp U2713HM 27" w/drop ceiling mount
Logitech G930 7.1 Headset
DBPOWER RGB LED Keyboard
Logitech G402 Hyperion Fury


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Apr 20, 2005 10:12 am 
Offline
Black Belt 1st Degree
Black Belt 1st Degree

Joined: Sun May 11, 2003 8:47 pm
Posts: 1486
Location: Omaha, NE
Alrighty, got it to work with the system("cls"), now I'm just trying to get this to compile without any errors and try to move on.

_________________
Tono Sien


Love is the greatest conspiracy, by the most loving genius.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Apr 20, 2005 10:16 am 
Offline
Initiate
Initiate

Joined: Tue Jan 27, 2004 1:52 pm
Posts: 53
Location: Denmark
The system() function is a poor choice for Windows, it has a real performance hit which can mount up if you use it often.

You may be interested in my 6 part console programming tutorial. It uses API routines starts slowly but gets into some quite sophisticated techniques. Clearing the screen is covered in part 2.

http://www.adrianxw.dk/SoftwareSite/Con ... oles1.html

_________________
Wave upon wave of demented avengers march cheerfully out of obscurity into the dream.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Dec 17, 2005 11:50 pm 
a simple way to clear the screen is to call the ANSI handler. and pass an ESC[2J to the handler at the point you want the screen cleared.


Top
  
Reply with quote  
 Post subject:
PostPosted: Wed Dec 21, 2005 7:52 am 
Offline
Black Belt 1st Degree
Black Belt 1st Degree

Joined: Sun May 11, 2003 8:47 pm
Posts: 1486
Location: Omaha, NE
Dear lord man! That was half a year ago! I passed with flying colors! Not to mention I kinda surpassed the knowledge of my teacher in some areas! :oops:

Now though, I'm sorting through the source for Quake 3, and am thinking about doing a total conversion with the source... Either way, I'm gonna have some fun!

_________________
Tono Sien


Love is the greatest conspiracy, by the most loving genius.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Dec 21, 2005 11:41 am 
Offline
Mobo-fu Master
Mobo-fu Master

Joined: Sat May 14, 2005 11:49 am
Posts: 7699
what class is this that your doing all of this?

_________________
Join team 33258 today!!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Dec 21, 2005 8:00 pm 
Offline
Black Belt 1st Degree
Black Belt 1st Degree

Joined: Sun May 11, 2003 8:47 pm
Posts: 1486
Location: Omaha, NE
Well I WAS taking a C++ class last school year, but now I'm not taking a class for programming. I am hoewever doing an independent study course on 3D modeling and animation using Maya and 3Ds Max... I'm hoping to incorporate the two classes over the summer with my buddies and either complete a mod, or do a total conversion...

_________________
Tono Sien


Love is the greatest conspiracy, by the most loving genius.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group