Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 7th, 2008, 4:00 PM   #1
KuraKai
Newbie
 
Join Date: Mar 2008
Posts: 25
Rep Power: 0 KuraKai is on a distinguished road
Console Game Development

I am starting to work on a game for the console, there are currently three things that I need to figure out how to get done first before I work on it.
The first one is secured password input, where character inputs are replaced my either other characters or just a blank spot.
The second one is updating just a single portion of the console output, like to change just the bottom right without having to update everything else.
Finally is a clearing the console or clearing a portion of it.
Does anyone have any help for this?
KuraKai is offline   Reply With Quote
Old Mar 7th, 2008, 6:07 PM   #2
Brent
Highly Adaptive Penguin
 
Brent's Avatar
 
Join Date: May 2005
Location: United States
Posts: 249
Rep Power: 4 Brent is on a distinguished road
Re: Console Game Development

What operating system and compiler are you running?

here are some links I found on google.com

www.gametutorials.com
www.ultimategameprogramming.com
www.gamedev.net
www.cprogramming.com
Brent is offline   Reply With Quote
Old Mar 7th, 2008, 6:57 PM   #3
KuraKai
Newbie
 
Join Date: Mar 2008
Posts: 25
Rep Power: 0 KuraKai is on a distinguished road
Re: Console Game Development

Windows and the Compiler for Visual Studio, the first two links are from 3D Games and the first one is for a book I have to purchase! The third one shows some nifty handiness of encryptions and stuff but was mostly meant for 3D games. And the fourth one shows me some nifty formatting of text, but none of them answered my questions.
KuraKai is offline   Reply With Quote
Old Mar 8th, 2008, 7:33 AM   #4
Seif
Hobbyist Programmer
 
Seif's Avatar
 
Join Date: Jan 2006
Location: UK
Posts: 213
Rep Power: 3 Seif is on a distinguished road
Re: Console Game Development

check out the <windows.h> header. It pretty much has all you need. Check the MSDN for console reference . http://msdn2.microsoft.com/en-us/lib...87(VS.85).aspx
Seif is offline   Reply With Quote
Old Mar 8th, 2008, 8:11 AM   #5
Ancient Dragon
PFO God In Training
 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 499
Rep Power: 4 Ancient Dragon is on a distinguished road
Re: Console Game Development

I think pdcurses might be one way to solve your problem, and its free.
__________________
I Like Ike. Vote for Dwight Eisenhower this November.
--This message brought to you by the the Procrastinators Club Of America.
Ancient Dragon is offline   Reply With Quote
Old Mar 8th, 2008, 10:02 PM   #6
Gennadios
Newbie
 
Join Date: Mar 2008
Posts: 3
Rep Power: 0 Gennadios is on a distinguished road
Re: Console Game Development

I programmed a console Tetris clone a while back, this is the function I used to set the cursor position to the location that needs changing, it should be what you're looking for:

c++ Syntax (Toggle Plain Text)
  1. #include<windows.h>
  2.  
  3. void gotoxy(int x, int y);
  4.  
  5. void gotoxy(int x, int y)
  6. {
  7. COORD point;
  8. point.X = x;
  9. point.Y = y;
  10. SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), point);
  11. }

It will also allow you to overwrite any input, so you can replace critical inputs with asterisks or whatever you'd like.

You can also use the if(kbhit()) and getch() statements to get sensitive inputs without them being printed onscreen.
Gennadios is offline   Reply With Quote
Old Mar 8th, 2008, 10:53 PM   #7
Ancient Dragon
PFO God In Training
 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 499
Rep Power: 4 Ancient Dragon is on a distinguished road
Re: Console Game Development

Quote:
Originally Posted by Gennadios View Post
You can also use the if(kbhit()) and getch() statements to get sensitive inputs without them being printed onscreen.
You could only if you have a compiler that supports those two functions. They are non-standard and are not available to many (most) compilers. Which is a pitty because I like them too.
__________________
I Like Ike. Vote for Dwight Eisenhower this November.
--This message brought to you by the the Procrastinators Club Of America.
Ancient Dragon is offline   Reply With Quote
Old Mar 9th, 2008, 7:32 AM   #8
Irwin
Newbie
 
Join Date: Mar 2008
Posts: 9
Rep Power: 0 Irwin is on a distinguished road
Re: Console Game Development

Stupid methodology by the previous posters, it is quite simple to just parse results from ReadConsoleInput and do all the raw handling from there.
Irwin is offline   Reply With Quote
Old Mar 9th, 2008, 4:34 PM   #9
KuraKai
Newbie
 
Join Date: Mar 2008
Posts: 25
Rep Power: 0 KuraKai is on a distinguished road
Re: Console Game Development

I now have another question for this, How do I make Win32 Console GUI. If you take a look at the BIOS or even the Windows Installer for XP you will notice they have GUIs that are done in with ASCII. I tried to work this out by doing...
C++ Syntax (Toggle Plain Text)
  1. cout << (char)169 << (char)196 << (char)196 << (char)196 << (char)170 << "\n";
  2. cout << (char)179;
That looks like a start but it quickly becomes obvious that there are going to be gaps and there not going to be connected properly. Is there any other way of accomplishing this?
KuraKai is offline   Reply With Quote
Old Mar 12th, 2008, 1:24 AM   #10
Game_Ender
Professional Programmer
 
Game_Ender's Avatar
 
Join Date: May 2006
Location: Maryland, USA
Posts: 306
Rep Power: 3 Game_Ender is on a distinguished road
Re: Console Game Development

Did you look at the pdcurses link posted above? Its basically a console GUI library that works on Windows. It should have most if not all of what you need.
__________________
Robotics @ Maryland AUV Team - Software Lead
Game_Ender is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Game Development King C++ 26 Mar 10th, 2007 8:44 PM
Video Game Console Course lostcauz Coder's Corner Lounge 9 Sep 29th, 2006 11:09 AM
The Black Art of Video Game Console Design lostcauz Book Reviews 0 Apr 26th, 2006 7:31 PM
Qesution: Program for casual game development kazbadan Other Programming Languages 20 Sep 28th, 2005 1:04 PM
Game Development question n3o_X Coder's Corner Lounge 0 Aug 5th, 2005 11:57 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:41 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC