Sign in to follow this  
BHXSpecter

Is working in terminal/console really a waste of time?


Recommended Posts

BHXSpecter    3119

A beginner somewhere else asked about learning game dev and was doing terminal/console games. A guy replied with:

 

If you're interested in game dev... working in the console is a complete waste of time. Don't do it.

I have never considered anything programming-wise a waste of time because I view everything as a learning experience. Unfortunately, I've seen this sentiment again and again. I'm the kind of guy that wants to give beneficial advice to beginners rather than lead them down a path that isn't helpful toward their development as a programmer. So I figured this was the best place to ask if that quote is accurate or not. I'm genuinely curious about this because I only see it in a site or two, but see it repeatedly on them and I have yet to find anyone in the industry that will answer my question when I post it to them via email or twitter. 

Share this post


Link to post
Share on other sites
slicer4ever    6760

every programmer has to start somewhere, and lopping in graphics while trying to learn the fundamentals would be insane.

 

also, modern consoles are rather advanced, and nearly everything has them.  hell lynx is a web browser in a freaking console terminal.

Share this post


Link to post
Share on other sites
Bacterius    13165

If you mean drawing stuff to the terminal, it's not that different than drawing to a screen. A terminal has a frame buffer, with characters instead of pixels, all this can be abstracted into update, draw, display routines. There's nothing special or unusual about drawing to the terminal, and everything you learn there can be applied to graphical games as well, you still have an event loop, the game logic is identical, and so on. Sure, there are GUI frameworks today that can be set up in a few clicks, but that doesn't mean terminal-based games can't teach you anything.

 

And even if you're not writing a text-based or ascii-graphics game, you will certainly want to at least be familiar with how to interact with the console (both manually, i.e. through the shell, and also programmatically) for all the tooling surrounding your game (or any software in general), especially automated tasks like packing assets, converting a bunch of models and textures, setting up your testing platforms, and so on, which probably won't have a convenient GUI to do it. Really, having an understanding of how to integrate console programs into your workflow is an essential skill, though admittedly not the most pressing one for a new developer.

Share this post


Link to post
Share on other sites
BHXSpecter    3119

I just finally felt like I had to ask because everyone acted like I had an antiquated view because I still recommend people make a few terminal programs and games just to get a good grasp on languages and the key things that are true between all games. Just glad to see I'm not as antiquated as others have told me on different sites.

Share this post


Link to post
Share on other sites
jbadams    25677

I'd actually like to hear from some of the people who feel that console programs are a waste of time -- obviously for certain language or technology choices a console isn't available or isn't the normal approach, but for more traditional languages I'd like to hear some of the reasons people consider it a waste, and what approaches they might suggest instead.

 

Anyone willing to explain that viewpoint? cool.png

Share this post


Link to post
Share on other sites
ilreh    293
Actually I can't think of a more fun and efficient way to learn a language. Many people dive into a certain API or framework right after their hello world tutorial because they want fast results. As always the devil is in the details and a convenient API doesn't make up for lacking basic skills. However I'm with jbadams on this. In the end it doesn't matter that much which project you messed with when you started out.

Share this post


Link to post
Share on other sites
Bacterius    13165


INB4 TTYs with indirect lighting and ambient occlusion.

 

It's probably been done... after all, converting videos to ascii is a thing, so you could technically hook up a terminal to a graphics pipeline and there you go. But I really meant the architecture in general, obviously you usually go for different forms of artistic output with such limited resolution (top-down view, for instance).

Share this post


Link to post
Share on other sites
Hodgman    51234

When learning C++ I started off in the console, like most of us do, and it was of course a great learning area for a beginner - NOT a waste of time.

However, I really started to understand games when I started modding Half-Life 1, where the code for a real-time game loop was already written, and I could insert small sections into this existing real-time system. At the time, I didn't even understand how game loops worked, or how their event callbacks worked, or the logic behind the flow-of-control in general... but I still was writing interactive real-time gameplay!

Jumping around in as many different programming environments as possible is going to be beneficial.
 

INB4 TTYs with indirect lighting and ambient occlusion.

I was talking the other day to someone about Watch Dogs (IIRC, I think), and they mentioned it has an ASCII-mode renderer easter egg in there ;)

Share this post


Link to post
Share on other sites
MichaelBarth    341

I started writing programs in the console in C++ as well. Do I feel like it was a waste of time? Not exactly. I think starting with console programs helped me to grasp the fundamentals of programming, but I do wish I had worked with something more graphical.

 

The console helped me learn the basics like if, else, classes, and such. But it took me a LONG time. I couldn't grasp the concept well because there wasn't much there for me to work with. Without my good friend YouTube, I don't think I would have learned. I wish it was explained to me how other stuff works, like in order to start making basic games you should look into OpenGL\DirectX and libraries associated with it.

 

I didn't really begin to grasp everything until I switched to C# for a while messing around with the XNA Game Studio. It was TREMENDOUSLY helpful. Because everything was right there and I could finally see how things worked. Do I think learning how to program in the console is a complete waste of time? Not at all. But if you're looking to go into game programming, it may be more beneficial to start with something else.

 

You have no idea how excited I was when I re-made Pong in C# with XNA. It was an amazing feeling, like something was actually coming together. It was the simplest of games and it was a wonderful start. Then I moved back to C++ with the SDL library and I felt even better. I wish I had started with making a simple Pong clone in the first place.

 

I see a LOT more use for the console now that I've actually learned quite a bit. But starting out with it, I thought the console wasn't all that helpful. I think what actually made me like it was making a simple text adventure game. That was the kind of idea I needed to like the console. Because up until then I couldn't think of much use for it. All I could think was what in the world was it good for? Although now I think the console is pretty amazing. This is my long answer, I wish the poll had a third option.

 

Also, I think it may be important to mention, that I didn't have a teacher, and that may skew my view a bit. YouTube was my teacher. I was learning on my own.

Edited by Spirrwell

Share this post


Link to post
Share on other sites
rip-off    10976
The reason I would recommend starting with the bare minimum is that it allows the beginner to focus on learning the core concepts first. In most languages, a beginner who starts with graphical libraries has to deal with more mystery boilerplate code at the start, and that this could result in a way of thinking where such code is accepted more readily. I believe that programmers starting with such a mentality are at risk of avoiding understanding such code and instead developing programming techniques where such code is copied from another source and tweaked until it acts as required.

Notice that I didn't mention the console specifically. I don't think that the console has any magical abilities, but rather it is the presence or absence of "ignore this for now" supporting code (or at least minimising such code). If the language they are using has built in, simple support for graphics then I don't think there is the same risk, such as many of the old Basic dialects or perhaps if they're learning Javascript in a web browser.

I could be wrong, but that is what I think. Edited by rip-off

Share this post


Link to post
Share on other sites
Aardvajk    13207

I've always felt that learning C and then C++ at the command line was an excellent start, since you are then far more aware of the process of compiling translation units, linking them together etc. I feel had I started with IDEs, I may never have gotten a grasp on exactly what the IDE was doing for me behind the scenes, which has often been useful knowledge when things go wrong.

 

But what is a "waste of time" anyway? Sounds like the kind of blanket opinion that gets thrown around without a solid basis.

Share this post


Link to post
Share on other sites
mhagain    13430

I've always felt that learning C and then C++ at the command line was an excellent start, since you are then far more aware of the process of compiling translation units, linking them together etc. I feel had I started with IDEs, I may never have gotten a grasp on exactly what the IDE was doing for me behind the scenes, which has often been useful knowledge when things go wrong.

 

But what is a "waste of time" anyway? Sounds like the kind of blanket opinion that gets thrown around without a solid basis.

 

I think the OP is talking about something completely different: writing a console-mode program, which may (or may not) be done using an IDE.

Share this post


Link to post
Share on other sites
ferrous    6137

I wouldn't call it a 'complete waste of time', but I do believe it's an entirely unnecessary step.  It isn't that hard to work with pixels instead of ascii characters, and making a graphical ascii game, one is going to spend a lot of time looking at ascii charts picking out things to represent monsters or what have you, and honestly, that really is knowledge that's mostly not ever going to be used ever again.

Share this post


Link to post
Share on other sites
L. Spiro    25622

Anyone willing to explain that viewpoint?


It’s not something I would ever recommend.
While it is not necessarily a waste of time, it is an inefficient use of time considering all the alternatives.

If you want an easy way to draw better-looking graphics, mIRC Script and Q-BASIC are better alternatives, and even C# is beginner-friendly.
If you want a simple no-cruft way to explore loops and logic, mIRC Script’s syntax is quite similar to C but the compiler is much more beginner-friendly and most of the environment is already prepared for you so all you have to do is open the code window and code. No main loops, terminal creation, key-scanning/reading, etc.
If you want to learn more specifically about game programming rather than programming in general, modding a game is much more valuable.


Terminal window coding in preparation of learning game programming is only a way to trim cruft and focus on more digestible bits here-and-there, but the problem is that it doesn’t serve any one dish better than the alternatives do. Even as a complete package, most alternatives trump it, as they overall offer basically everything terminal programming does and more. Modding will still hold your hand over looping and logic but also give you a more motivating experience related to actual games.


It may not be useless, but there is no reason to ever do it.


L. Spiro

Share this post


Link to post
Share on other sites
BCullis    1955


If you want to learn more specifically about game programming rather than programming in general, modding a game is much more valuable.

 

This group right here is where most of the facepalm moments come from in the "For Beginners" section of this site, though.  I think this group, more than any other, needs the console programming time to get past the CS101 problems.

Share this post


Link to post
Share on other sites
Lith    429

 

Terminal window coding in preparation of learning game programming is only a way to trim cruft and focus on more digestible bits here-and-there, but the problem is that it doesn’t serve any one dish better than the alternatives do. Even as a complete package, most alternatives trump it, as they overall offer basically everything terminal programming does and more. Modding will still hold your hand over looping and logic but also give you a more motivating experience related to actual games.


It may not be useless, but there is no reason to ever do it.

 

I agree with you but there are some alarm bells going off, I fear your advice may be misunderstood.

 

Notice what I highlighted. If the person is learning game programming, then yeah, I completely agree. But it seems to me like this advice already assumes the person knows a language already. If a person wants to learn a new language, say C++, then I feel that they should get some console/terminal experience before they move on.

 

Better learn how to #include and cout before you try linking graphics libraries and allocating memory.

Share this post


Link to post
Share on other sites
Prototype    2014

Game programming has nothing to do with graphics, sound hardware or anything. You could make a chess program and move the pieces on a real board, for example.

 

My first ever game was made on an electric typewriter, by sheer lack of a real computer (mind you, this was the pre- home computer era). I would draw cave-like structures on paper and hold a key on repeat while twisting and turning the paper-feed barrel to steer through the 'level'. It wasn't a whole lot of fun, but it was a game. As far as I'm concerned, limitation will only sparkle your imagination and perserverance.
 

So yes, I think the console is a fine place to start. You learn how to program, and that's just enough at that point. If you cannot enjoy that, you might not really be interested in programming.

Share this post


Link to post
Share on other sites
Anri    971

Its merely a case of keeping things as simple as you can, and to your current level of skill and knowledge.

 

If you are beginner at writing games, or just breaking in with a new language, then a console-based game is an excellent idea.  It ensures your knowledge of programming and of your chosen language is sound before you move on to more ambitious projects. 

 

The next step, and a good exercise, would be to then convert your command-line game into a visual application game, with text boxes, buttons etc.  If you are using an OOP language such as C++, Java or Visual Basic then you will find it easier to separate the UI code from the underlying game code.  This is good because you then gain the ability to develop tools such as level editiors for more action based games when you come to them.  Hard-coding a level, for an R-Type style game, is not something I would recommend!

Share this post


Link to post
Share on other sites
BHXSpecter    3119

I think I wrote console-based programs for all of four months before getting bored with that garbage. No regrets. However, a lot of tooling, utilities, scripts, etc are frequently console based. So it's quite important to be able to work with standard streams (stdin/stdout/stderr), piped streams, console IO, unattended processing, etc. Console programs are valuable and so is writing them.

First thing that comes to mind is converters. Most of the converters I use for audio and video files are all console based. Even after 20 years I still go and do console programs. Here ( http://codeviewer.org/view/code:4072 ) is one I made to make my son impressed tonight, just a simple program to take the vowels out of a name and replace them with z.

Edited by BHXSpecter

Share this post


Link to post
Share on other sites
Buster2000    4310

Learning anything is NEVER a waste of time.  There are threads on GD ever week with things like "am I wasting my time with C# now that XNA is dead", "am I wasting time learning Java".  The answer is that learning any skill will always benifit you in some way.

Share this post


Link to post
Share on other sites
Francis Pierot    110

I'd be surprised if any MMO server worked in anything else than console mode.

 

But if you plan to do a display client of your game using console mode, of course this is probably a waste of time.

 

Still, you can do it in ASCII... Like we used to, years ago!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this