PlaneShift

Fan Area => The Hydlaa Plaza => Topic started by: RussianVodka on April 18, 2004, 12:11:01 am

Title: Help a n00b programer.
Post by: RussianVodka on April 18, 2004, 12:11:01 am
Hi, i just started programing a couple of days ago... Im using C++...  

Well, first off, i wanted to ask if anyone knows of any good toturials (hopefully online). Curently i am using \"The cplusplus.com\" (http://www.cplusplus.com/doc/tutorial/).

And then second off all.  I was wondering if i were to program a PC game (yeah, i know, im geting ahead of myself), how much of it would actualy be in C++? I know that some time ago my friend programed a game in Visual Basic (or something like that), and it turned out prety good. And it was only a couple of hundred lines of script (i typed more while practesing commands and their variations).

Please dont flame me, remember im still a newb with this stuff.
Thanx in advance.
Title:
Post by: Icefalcon on April 18, 2004, 01:35:40 am
check out lythia\'s text based rpg, he made it using C++
Title:
Post by: RussianVodka on April 18, 2004, 02:10:53 am
Ok.

And i have one more question. What is better for programing, Linux or Windows?

I always thought that Linux was better for things like these...
Title:
Post by: lynx_lupo on April 18, 2004, 10:20:44 am
That tutorial is great - I used it too; short and concise.

http://www.slo-tech.com/script/forum/izpisitemo.php?threadID=76592&mesto=konec  <- many c/c++ links.

On Unix based OSs there are more compilers available and they\'re free. On window$ you could count them on the fingers of a sloppy carpenter. :D
 I know of M$VC++, mingw, *gw.
But M$VC++ is treacherous, it has unstandard libs - some unstandard commands, which wouldn\'t work on other compilers and OSs....

There are also more other apps available(for support) on Unix(..) and they\'re free examples. ;)
Probably there\'s also more dev environments and packages and docs and support for them.
Title:
Post by: dfryer on April 19, 2004, 08:08:32 am
One advantage to developing using Linux is that it\'s more likely that you will end up using open, cross-platform tools (e.g. it will be easier to make your programs run on Windows and Mac OS X).   GCC (standard C/C++ compiler for Linux) is very widespread, cross-platform and fairly well-made.

Much of what you write will depend on the libraries you use - learning the basics of C++ is a start (and there\'s a *lot* to learn!) but if you want to write graphical games, interact with databases, etc, etc, you\'ll need to learn to use other libraries (in the same way that Planeshift uses CrystalSpace).  

VB makes it really easy to get a running application which has menus, windows and buttons, but quickly runs out of steam after that :)  Learning to limit the scope of your projects is very difficult, but try to choose small projects for yourself which extend the limits of what you know (e.g. learning to use part of a new library, or some programming technique.)

If you (and others) wrote a large PC game, there are several approaches programming-language wise - one is to do everything in C++ (or some suitably fast compiled language).  Another approach is to make the \"engine\" in C++ and then use a scripting language (e.g. Python or Lua) to provide specific behaviour - this is done in the open-source space game Vegastrike (I think they use python..).  This is a more flexible approach, but managing the interface between the scripting and the main engine is another layer of complexity.

Anyway, good luck with your programming endeavors, I\'m certainly enjoying learning!
Title:
Post by: AendarCallenlasse on April 19, 2004, 08:13:40 am
If your serious about learning to program Russian, I would suggest buying books on the subject.  I\'ve looked at online tutorials before, but books that I have bought are much more in-depth and easier to understand than online ones.

They are rather costly...I think the cheapest one I have bought was about $40.  But the most expensive $60.  So if you have the money that\'s the way to go.

Also if you are completely new to programming in general I found that learning a simpler language first worked well for me.  Before getting into C++ I learnt Pascal which is a very simple language and helped me learn the basics of programming very quickly.  The languages differ a lot but the basics are the same.

Anyway, good luck :)
Title:
Post by: dfryer on April 19, 2004, 09:29:19 am
It\'s true that C++ is a nasty language to learn first off, since there\'s so many details which make little sense to a beginner (subtle differences between arrays, pointers, references, local and heap objects, that sort of thing) can cause all sorts of havoc.

I taught myself Pascal, then Object Pascal, then C and now C++ (along with Perl and some others just for kicks). Still, C++ can be used as a first language as long as you\'re tough :)
Title:
Post by: tangerine on April 19, 2004, 07:49:35 pm
C++ is not a good language to start programming because it\'s one of the most complex.

Anyway here are two C++ books:
http://mindview.net/Books/TICPP/ThinkingInCPP2e.html
http://docs.linux.cz/cplusplus.5.1.1/
Title:
Post by: RussianVodka on April 20, 2004, 01:36:06 am
Well, my dad is a scientist, and he needs to sometimes use C++ for his work. So, so far, what ever i didnt get from the turorial he was able to explain to me. ( i just wish all of his explanations were as \"to the point\" as the turorial\'s)

So, it hasnt been to hard to learn so far.
Title:
Post by: lythia on April 20, 2004, 09:55:25 am
i bought teach yourself c++ in 24 hours (well actually my brother bought it, but) which is pretty good but i wouldnt have been able to do much without him.