Archived

This topic is now archived and is closed to further replies.

kikkler

Is learning to write games in dos worth it?

Recommended Posts

I''m new to the whole game progremming scene, though i had the passion for it for a long time. anyway i got myself some books about the subject and browsed them a little. One of the books which i seem to get along well with talks about writing a dos based, 3d game engine, something like descent/quake 1. now i''m pretty sure i want and will focus on windows platform most of the time - so my question is - should i spend the time, read the book, learn the main concepts and techniques and afterwards do the transition to windows? or should i start with windows right now? thanks

Share this post


Link to post
Share on other sites
DOS lets you focus on basic theories. If you are new to programming in general, I''d learn DOS first. On the other hand, if you already know a fair degree about C/C++, and would just like to learn more about game development go with Windows.

Share this post


Link to post
Share on other sites
Dos
e
a
d

Seriously, there is no reason to learn dos anymore, thought that shouldent stop crossplatform programming if thats what your after. Learn an API like SDL (www.libsdl.org) and read up on the tutorials, then you can actualy go somewhere. Otherwise learn winAPI programming and DirectX.

Share this post


Link to post
Share on other sites
for the learning experience then yes.
also learning to program game in DOS will get you
very acquainted with console game programming.
if you choose to do that, instead of [u]computer[/u] game programming.

Share this post


Link to post
Share on other sites
Well, i dunno about that, XBOX is in directX, and the rest of them could be emulated better with some of the librarys around here then with DOS programming.

Share this post


Link to post
Share on other sites
well Dreamcast programming you can use straight C but
most of the time tweak and major improvements are necessary
to the API as well as the code. also GBA uses a number or IRQs
and assembly to program their (homebrewn) games; though i will
admit C is most likely used in the majority of the programming
project. ...and PS2... big assembly if you want very good quality games. so yeah DOS is still useful. not necessary but useful nonetheless.

Share this post


Link to post
Share on other sites
IMHO there''s no point in focusing exclusively on DOS - DOS is the domain of the embedded systems programmer these days.

But there are a lot of libraries which are portable between DOS and Windows.

Certainly I wouldn''t waste much time fiddling with DOS-specific memory management, interrupts, IO etc.

Mark

Share this post


Link to post
Share on other sites
quote:
Original post by Onemind
DOS lets you focus on basic theories. If you are new to programming in general, I''d learn DOS first. On the other hand, if you already know a fair degree about C/C++, and would just like to learn more about game development go with Windows.


Your comment is totally wrong. If you want to focus on the basics, like algorithms you should go higher level, not low level. What is a beginner going to learn from memory manipulation in mode X or 320x200 VGA ?
Instead people should start with C# and managed directx, it''s easy, readable, is strict enough to prevent the usual errors like a for loop from 0 to 10 on an array size 10 (should be 0-9), etc. Then if you are one of those that thinks only about speed then you can go to C++.

DOS forces you to do everything yourself, do a lot of work before you even get anything on the screen, and then a lot of work to make it run fast. When you have done this and go to C++ with directx, your knowledge and work is wasted.

Share this post


Link to post
Share on other sites
quote:
Original post by Onemind
Instead people should start with C# and managed directx, it's easy, readable, is strict enough to prevent the usual errors like a for loop from 0 to 10 on an array size 10 (should be 0-9), etc. Then if you are one of those that thinks only about speed then you can go to C++.



c#.... go home kid.

[edited by - rebelcoder on April 22, 2004 7:09:51 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by rebelcoder
quote:
Original post by Onemind
Instead people should start with C# and managed directx, it''s easy, readable, is strict enough to prevent the usual errors like a for loop from 0 to 10 on an array size 10 (should be 0-9), etc. Then if you are one of those that thinks only about speed then you can go to C++.


c#.... go home kid.


I wonder who''s the kid here.
Starting with C# and Managed DirectX or GDI+ is a very good idea.


Share this post


Link to post
Share on other sites
quote:
Original post by rebelcoder
c#.... go home kid.



Ooh, ooh, mommy - it's a language zealot!

Seriously, Fidelio66 was merely pointing out that C# is a good language to start with. I totally agree. Learning C++ (which I assume is your language of choice, rebelcoder) is hell. I have been thinking about doing more development in C#, to speed up the development of non-performance-critical code.

Of course, you're probably too busy programming a GUI in Win32 & C++ to listen to the benefits of any other language...

[edited by - doctorsixstring on April 22, 2004 7:24:05 AM]

Share this post


Link to post
Share on other sites
Looking back, I personally saw no real benefit of starting to learn in DOS environment outside of learning some of the language features of C/C++. I knew Windows game programming is where I wanted to end up, and so I stuck around with DOS/console (ie, Windows command prompt, not xbox/PS2/etc type console) programming just long enough to get a good grasp on some basics such as conditional and looping structures, file I/O, and pointers, to name a few.

Share this post


Link to post
Share on other sites
quote:
Original post by doctorsixstring
quote:
Original post by rebelcoder
c#.... go home kid.



Ooh, ooh, mommy - it''s a language zealot!

Seriously, Fidelio66 was merely pointing out that C# is a good language to start with. I totally agree. Learning C++ (which I assume is your language of choice, rebelcoder) is hell. I have been thinking about doing more development in C#, to speed up the development of non-performance-critical code.

Of course, you''re probably too busy programming a GUI in Win32 & C++ to listen to the benefits of any other language...



Thanks. What I meant was that most people, especially beginners, who fiddle with simple games usually have a time period of a few weeks or a few months. The first days/weeks are enthousiastic, then it slows down as people cannot motivate themselves to keep working on it, especially if they are stuck. So it would be the best thing to choose something where you can get the most work done the easiest way, instead of making things artificially hard.

With an environment like C#/managed directx you can focus on the actual game logic and algorithms, while with C++ you would spend more time on headers, classes and memory management and less on the actual game. And with a DOS game you would probably spend a month setting up the screen and quitting it once you managed to move a 16x16 sprite from left to right.

Share this post


Link to post
Share on other sites
hmmm...

Let me ask you..what did you first learn to program? Console applications yes? When people ask how to learn to program games, there asking you how to learn to program.. People that know how to program only need to know _what_ is fun, what _works_, what is _good_, just creativity and art...

If you didn''t first program in console applications, then, my friend, you have no place to judge..

What console applications teach you: How complicated several things can be that you program. A very in depth knowledge of the syntax of the particular language, what you can do what you can''t do..how you should use pseudo code because 10 pages just from your head _will_ turn out wrong.

Starting out the easy way by jumping into an easy, simple way to program in an API..isn''t the way to go. You don''t understand the underlying concepts and ideas and what your code is actually going through. That sort of knowledge/way to go about programming leads to missunderstanding, error prone code, and missunderstanding at _why_ things take millions of lines of code to build.

If you work with simplicity at something that isn''t simple..your doing something wrong. People will expect simplicity if they think simplicity. People need understanding, if they don''t have it then there mind goes in 5000 directions at once when they find out that what they need to program will take 50 pages of code..

Now that isn''t to say that you won''t attain full exposure and knowledge if you start simple, it''s just better to get an idea of what your getting into before you do..

Share this post


Link to post
Share on other sites
There just isn''t any reason to start programming in dos. Windows skeletons aren''t hard to find, and you won''t have to mess with dos memory conventions. When it comes to the 3D principals these are similar between dos and windows, and you''ll find a lot more helpful resources if the project is started under win. Basically if the only help you have is this one book, you''re going to run into things you want to do that book simply doesn''t teach. Finally when it comes to Quake 1, you can find the source for Quake 2, and 3 at http://www.idsoftware.com/downloads/. These will provide you everything Quake 1 does and much more.

Share this post


Link to post
Share on other sites
quote:
Original post by Ranger50000
There just isn''t any reason to start programming in dos. Windows skeletons aren''t hard to find, and you won''t have to mess with dos memory conventions.


When was the last time you had to mess with dos memory conventions, programming a console application?

Share this post


Link to post
Share on other sites



When was the last time you had to mess with dos memory conventions, programming a console application?




About four years ago when I had it my head that a dos game with a really great concept could still suceed in a windows driven world. But that memory managment made the game buggy and I could never fix it. Its been so long since I touched it that I don''t even have the source on my computer anymore.

Share this post


Link to post
Share on other sites
I would start with windows right now and learn C/C++. You''re gonna wanna learn it eventually if you wanna program competitive games for the windows platform.

Share this post


Link to post
Share on other sites
quote:
Original post by Ranger50000

About four years ago when I had it my head that a dos game with a really great concept could still suceed in a windows driven world. But that memory managment made the game buggy and I could never fix it. Its been so long since I touched it that I don''t even have the source on my computer anymore.



But that''s only after you know your programming language good enough to actully make games, that you need any lowlevel memory management, for writing directly to the graphics card for example. Console applications in text mode doesn''t need any more special memory management than a windows application. And no one here is recommending that he should write any graphical games in dos, so the memory management will never be needed, except the default c++ memory management, but you need that for windows programming too.

Instead console applications give you a big advantage over windows ones, when learning a language. For example, while getting some output in windows is fairly easy, using messageboxes(if you ignore the for a beginner, magic parameters) like the windows handle, input is quite a bit hearder, even with something like MFC. Even managed c++ and winforms contains a lot of redundant stuff, that you really shouldn''t need concern about when learning a language. In contrast to this, console applications contains nothing extra, except the required main function.

But of course if you already have a solid programming language knowledge, and have done some programs of your own then Windows is a much better choice. If you haven''t programmed anything on your own, then I recommend making some simple text based game, like guess some guess the number game or something.

Share this post


Link to post
Share on other sites
Reply to fredizzimo

In case you haven''t read the post, he''s talking about learning how to script a 3D engine! That''s about as advanced as you can get. Kikkler said roughly "I want to make a game like Quake or Decent". Now where in that did you get "I want to make a ''Hello World'' app and I''m not sure how.
He said he was new to "game" programming not programming in general. I wasn''t saying all dos programming is bad. I learned Basic in dos then Pascal then C then C++ then Prolog (huge waste of time).., BUT that was when I was learning the basics NOT trying to code an advanced 3D game. My advice to stay away from dos was on the part about a 3D dos game not learning basics.

Share this post


Link to post
Share on other sites
First of all you have to learn c++... if you don't know how to make a hello world prog then you certainly can't make a quake game... especially that the fact that a large group of developers and designers had to create quake... if you never programmed in dos before then I sure hope you have LOTS of time to learn windows programming with c++ on the other hand if you want to do it in VB then go right away to windows since its really easy... or even better try to make a simple website if you want fast results



[edited by - snyp on April 22, 2004 7:56:08 PM]

Share this post


Link to post
Share on other sites
Reply to Ranger50000

Well, yes, I was actually commenting your stament more, than the OP

quote:

There just isn''t any reason to start programming in dos. Windows skeletons aren''t hard to find, and you won''t have to mess with dos memory conventions



That should read graphical games, instead of just programming. In addition to that, I also have a slight feeling that kikkler''s general programming knowledge isn''t quite ready for it yet. If it was good enough, I think he would have found out if learning game programming in dos is worth it or not, by himself, but I could of course be wrong.

Share this post


Link to post
Share on other sites
If you''re interested in doing DOS-style programming it might be good to use windows, but do all your own drawing to a simple linear frame buffer. Either roll your own drawing routines to a GDI bitmap, which you can blit to screen every frame and deal with a minimal amount of windows code, or use a library like SDL to provide it for you. I used to do alot of programming in DOS when I was starting, theres plenty of oporitunity to learn. However, dealing with memory is tough, if you''ve only got a 16bit compiler you''re dealing with 64k sement size and segmented memory. You can work around that, or find a 32 bit compiler(which shouldn''t be hard) but you''re still dealing with DOS, which is becoming increasingly incompatible with each new Windows release. So, if you''re interested in writing your own graphics stuff, roll your own, and if you aren''t find a simple library and try to deal with windows as little as possible. If you want to move up so something of relese/commercial quality in the future you''ll need to deal with windows and move up to DX/OGL.



Ravyne, NYN Interactive Entertainment
[My Site][My School][My Group]

Share this post


Link to post
Share on other sites
I''m not sure if "DOS" and the "console" (as in cout) are the same thing, but if they are, then yes I recommend you start out with the console first.

It''s not necessary to make an entire game with DOS/the console but do it to test out theories, functions, aglos, etc. I think it''s a BAD idea to jump straight into Windows programming, you need to get a solid foundation in programming first. For that, you can''t beat cout in simplicity.

I''ve always thought that a well-designed game was just the logic (maybe playable with ASCII in console-mode, even), surrounded by a graphics wrapper. I''ve always tried to design my games around this principle. So if you have a great idea, write a stripped-down version for the console, and if it works, migrate the code to SDL/DirectX/whatever. I''ve used this on every game I''ve made so far and it''s worked beautifully.

In short, separate content from presentation. The console is ideal for this.

Share this post


Link to post
Share on other sites