Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-08-2007, 11:47 PM   #1
Pete Holland Jr.
LQ Newbie
Registered: Aug 2007
Posts: 1

Rep: Reputation: 0
Getting Back Into Hobby Programming, Searching For Square One

I hope I don't seem like I'm rambling on, I just want to provide enough information so that everyone knows where I'm coming from. I will not be considered a pro in any aspect of this for a long time. ;-)

Last year, I decided, after a long time away from computer programming, to get back into the hobby (previous experience: BASIC on the Timex/Sinclair 1000 and IBM PCjr, some 6502 assembly for the original Atari line-up). So I got myself some books on C++, which I understand to be the universal programming language. It's been coming along bit by bit. I learn more by doing, though, and am looking to try a couple of things. But first, I need some guidance.

Okay, I am still learning in text mode. This is more than fine for the moment. As it is, the screen is basically doing the line printer thing--prints a line, scrolls screen, prints line, scrolls, etc. I grew up playing and making text mode games. It was the programming equivalent of stock car racing--16 colors, 256 characters, go nuts. Not only would I like to relive those old days, but text mode, I would imagine, has the advantage of being nearly universally compatible. I can compile the code with nearly no changes (assuming I use the standard extended ASCII set) on Linux, Mac, or Windows. Nothing that would, say, have the boys from id shaking in their boots, but enough to make some goofy fun stuff.

When I try to search for stuff for text mode programming, I get things like editing C++ code in vi or such, and the books I find explaining some things date back to Win95. There has to be something a little more recent out there. So I'm hoping someone here can help with a few questions. Is there a book or online resource that explains text mode things like repositioning the cursor onscreen and changing text colors? Also, is there a Linux compiler that can produce executables for Win and Macs (compilers for Linux under Linux is pretty much a given), assuming I'm not trying anything that requires a graphics mode or sound drivers or such?
Old 08-09-2007, 03:30 AM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.3
Posts: 17,548

Rep: Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423
Not really my area of expertise, but I think for text mode ctrl, man/google 'ncurses'.
I think the Linux compiler (gcc) has cross-compilation options/libs.
Again, try google for "gcc + mac cross-compile".
Old 08-09-2007, 09:38 PM   #3
Senior Member
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
IIRC 'graphics' programming on a Sinclair or Atari involved 'peeking' and 'poking' values out of/into screen locations according to (x,y) coords. So chrism01's suggestion to use ncurses would certainly give you similar facilities in a terminal window. But using C++ to do that seems a bit like learning to fly a Boeing 747 to do some crop dusting

If you want portability you would be better off with Java, which also has nice graphics/gui libraries and can also run as an applet in a web browser.

For the fun side consider Pygame. Like Basic, python is an interpreted language. Generally you can do things much faster, with much less code compared to C++ or Java. Pygame will also give you sprites, smooth animation and sound, all cross-platform. As interpreted code, it will run without change under different OS.

Just my


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
getting back into programming, which language? suicideducky Programming 26 05-10-2007 06:23 PM
Searching for a tutorial/book on socket programming koodoo Linux - Networking 6 06-07-2005 01:48 PM
mysql - back to square one bshearer *BSD 3 05-29-2005 10:32 AM
Upgrading a 486 (a joyously masochistic hobby) Hosiah Linux - Hardware 1 01-08-2005 12:20 PM
Searching hard traffic bash programming forum satimis General 5 10-24-2004 12:25 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:30 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration