Recommended Posts

hey i''m currently learning ''learn C in 24 hours'', i''m up to learning about arrays and pointers.
My main question is, how do you actually get a game started??
like changing graphic mode and displaying pictures....
oh i''m also learning pascal at school, so some help with pascal about game programming would be helpful
thanks for your time
-GaMeStA

0

Share this post

Link to post

Share on other sites

Write lots of console apps doing each of the topics you learn from the book. It may be boring, but there are lots of new things to learn (and hence, get wrong) when you start writing games. If you don''t know the language well, youre going to have lots of problems (I can vouch for that ).

Once you have a good grasp of the language start looking at DirectX (specifically DirectDraw) and you can do all of your graphical stuff.

Share this post

Link to post

Share on other sites

If you would like to learn how to do your own software rasterization (Meaning draw everything up on the screen yourself) then you will need to learn a little about programming for graphics modes. The only book that I know about(I''m sure there are others out there) is the Black Art of 3D Game Programming. It''s old (c.1996) but the rendering techniques that it uses are still in use today. It will teach you how to set up the computer for graphics displays using mode X drivers. You will learn how to transform and light polygons and then chade them on the screen. I left out alot of intermediary steps(line drawing and scan conversion of polys) but I think you get the idea. If you know these routines then OpenGL and DirectX tend to make a bit more sense.

0

Share this post

Link to post

Share on other sites

If you are currently learning c then you probably like to take a look at http://www.voodooextreme.com/articles/jake/cintro.html . This is a introduction into c from a game programmer called Jake Simpson working for Raven. Perhaps this introduction form a pro in the game programming field can keep you more motivated to learn than your current book. And there are also some links for further infos about learning c.

Have fun!

Bjoern

0

Share this post

Link to post

Share on other sites

If you have any specific questions about TurboPascal, just drop me a line (you can write me a mail...)I have a long experience with that language, and I think I''m good enough to answer your question But at the moment I''m programming in C++, and that will be the language I''ll keep programming in...To put it in a nutshell: Don''t start programming games in Pascal, C++ is much more powerful (whatever compiler you use...), because TurboPascal is a bit too conservative with memory allocation and so on...

Personally I wouldn''t recommend learning C (as all the others told you before ), I''d rather learned C++ (there''s not really a big difference...you have the possibility to write an object-oriented code, but I think that''s all...)

Share this post

Link to post

Share on other sites

So do you reckon i shouldn''t learn C?doesn''t must game programmers for console use C?because i want to program games for windows first, to get experience then move on to console programming.thanks for your time

Share this post

Link to post

Share on other sites

Another thing that you must keep in mind is that the code to your first game will be crap. It will be a learning process, and about half way through you will realize all the things you did wrong.

I also suggest that you learn more about structured programming before taking on a big project. It isn''t the kind of thing you can learn from books. You can only learn it from experience and other peoples code. I don''t do a lot of code with a procedural structure, so I can''t tell you were to find it, but for OOP design try programming in Java. It will force you to learn it. Just don''t get stuck in Java.

Another thing you can try doing is helping on a mud or some other online game, or at least look at the code for one. I really learned OOP programming on an LPC mud. They have a whole class tree which shows you how it can actually be useful.

Once you have a good OOP class tree the code all fits into place. If you don''t you''ll find your self using global variables, and constantly coping and pasting code. You''ll have to make changes to your old code everytime you add in something new.

0

Share this post

Link to post

Share on other sites

Ooh, that book sucks! That is the book that I started with. As for not learning C, I think that is a bad idea. C++ is just another method of writing C code. It will be much easier to grasp C++ if you know C well. Once you have C and then C++ down, move on to Win32. Win32 sucks and you probably wont use it much, but you will have a much easier time with DirectX if you are atleast familiar with how Win32 is put together. Ive been writing Win32 for 6 months and am about to move on to DX. I have been writing a tileing engine in Win32 GDI for awhile now, and I plan on converting to DirectX when I have that down. Ive been coding for 2 years total so dont get frustrated. Learning to make games takes a lot of study, and is still a very difficult thing to do. With a little (lot) of perserverance, you can be a good game programmer.

0

Share this post

Link to post

Share on other sites

Well, you should learn C++ aswell. That''s what DirectX is all about. As for console programming, ick, it apears that Microsoft may be starting a monopoly on that market aswell. So, I guess it would be best to know DirectX (Microsotf), which uses C++. Don''t get ahead of yourself. You won''t get very far with a knowledege of arrays and pointers.

Share this post

Link to post

Share on other sites

To learn C++, you''ll have to learn C anyway, so it isn''t really a matter of "Should I learn C or C++?", but more of a "Should I learn C and continue on to learn C++?". As for that second question, I say go for it. C++ can to a lot of nifty time/effort saving things if you know how to use it well (I don''t claim to, but I have found a few very cool uses for it).

As for general tips: Read, read, read, and experiment, experiment, experiment. Like the others said, once you learn a new topic, play around with it for a while until you really understand how it works, even its you think it''s something trivial. Also, read everything you possibly can on programming, code design, etc. If there is a topic that interests you, there is probably a paper relating to it somewhere on the net, and most likely on this here gamedev.net site.

Share this post

Link to post

Share on other sites

Ok, Lets get the facts straight, The first thing you need to do is learn C( if you start with C++, you will get confused and write bad code without even knowing the basics of what your errors are. ). Then, once you know C and you''ve made a couple of little apps, you learn C++ ( with the knowledge you get by learning C, you will understand more clearly what Objects do and how to write good code ) then move on to Win32 API ( you have to go through that if you want to understand the basis of windows programming and also the basis on what DX was made ) and finally DX... Anyhow, that is how I learned it and it worked for me. Though I wouldn''t recommend as all the others before me already said, to write a game with the little knowledge you have at the moment. I would keep on going until I''ve finished the book as you will surely use Structs and Pointers in your game as most programmer do...