Page 2 of 4

Re:I want to learn Visual C++ 6.0, where should i start?

Posted: Tue Nov 12, 2002 1:49 pm
by Joey
can you make GOOD games with visual basic? i mean with qbasic the games suck!

Re:I want to learn Visual C++ 6.0, where should i start?

Posted: Tue Nov 12, 2002 1:58 pm
by Mastercard
Guess what...you CAN make good games with Visual Basic. It really is Visual Basic. The newest version is...I think Visual Basic.NET^^; You can try to find some demo of VB, don't buy it before you have tested it.

Re:I want to learn Visual C++ 6.0, where should i start?

Posted: Tue Nov 12, 2002 4:06 pm
by Tom
You can make games with VB...but haven't even been into game programming...I don't play games :)
Infact alot of really good games where made with VB.

Re:I want to learn Visual C++ 6.0, where should i start?

Posted: Wed Nov 13, 2002 1:39 am
by Schol-R-LEA
You should be aware that Visual Basic bears as much of a resemblance to QBasic as a quicksand pit does to a mud puddle. Both are basically dirt and water, but the quicksand pit is a lot bigger, and looks and behaves very differently from the mud puddle.

<FLAME intensity="thermonuclear">
VB also resembles the quicksand pit in that it looks safe and simple until you step on top of it, at which point you get sucked into a quagmire.
</flame>

Sorry, In needed to exorcise a few personal demons there. I've been struggling with VBA for Access again lately, and I am about ready to throw a fit over it.

As far as C++ goes, while it is certainly possible to learn it as a first language, I don't particularly recommend it. It is a rather big and hairy language (though not as complex as Ada, or Visual Basic) and it is easy to get overwhelmed by it. If anything, it makes more sense to try and understand basic C first, though the two languages use very different approaches in many areas.

I am going to make two recommendations, both of which are going to be controversial in the extreme. I suggest that, if you haven't delved too deeply into C++ yet, that you set it aside and take a look at two other languages first - or rather, two specific books, each in a different language. I am suggesting them because they are, IMAO, the best books to learn how to program from as a novice. I advise reading both of them, one after the other, but which one you should try first will depend on your own preferences.

The first of them, the one I personally would read first, is How to Design Programs, a book which covers programming in general using Scheme as it's main language. The main advantage of this book is that it talks of programming as a discipline, and as a general skill, rather than as just writing code in a specific language. Indeed, the main advantage of Scheme is that there is almost no language to teach, a dramatically different situation from that in C++. It walks through the ideas of program writing in the simplest possible manner, such that virtually anyone could understand it. The excercises build up from the very basic building blocks and eventually take you to some of the most complex areas of program design. Best of all, the book is entirely on line, and the development environment it uses (the excellent and elegant Dr Scheme) is free.

As I said, I knew this would be controversial; Scheme is a language that doesn't get used much outside of colleges, and it is disliked by many. A lot of people will say that reading this book as a waste of time. I disagree, obviously, because I feel that it is more useful to understand to broader concepts first, and then apply them to the specific language you are using, rather than to learn a language and then try to figure out the general principles from there.

The second book is in many ways the diametric opposite of the first, and thus makes an excellent companion: Assembly Language Step by Step, 2nd edition, by Jeff Duntemann. I have lavished enough praise on this book elsewhere that to go on further would be redundant; leave it to say that while the book is not free, it is certainly worth the price you would pay for it.

Many, on seeing me suggest x86 assembly language as a beginnner's language, will probably question my sanity. Were this book not so excellent, I would have agreed; however, Duntemann's writing is top-notch (as science fiction author, he's been twice nominated for a Hugo) and he brings a new clarity to the entire subject, and as such it truly is a suitable presentation for first-time programmers - and will provide insights into later programming work, as well.

Take this advice as you might any other: with a grain of salt. I am far from an authority on learning how to program, and my opinions are, well, a bit on the cranky side to say the least. If it helps you, fine; if not, then it isn't anything to get hung up about. In the end, you have to find the way that works best for yourself.

Re:I want to learn Visual C++ 6.0, where should i start?

Posted: Wed Nov 13, 2002 1:57 am
by Schol-R-LEA
I forgot to mention: for information on game programming, the best two sites I know of are Game Tutorials and GameDev. The former is particularly useful, as it has tutorials and examples ranging from the most basic topics to the most advanced.

Does anyone else know of any other good game programming sites? Just curious.

Re:I want to learn Visual C++ 6.0, where should i start?

Posted: Wed Nov 13, 2002 4:52 am
by grey wolf
http://www.garagegames.com/ is an excellent resource for indie/garage game developers, but i spend more time at http://www.gamedev.net/ anyway.

an excellent book for understanding C++ is "Thinking in C++" by Brucke Eckel, which you can download as free PDFs. in fact, most of his books are available this way. Thinking in C++ requires a knowledge of C as a prerequisite, though.

he also has "Thinking in C#" and "Thinking in Java", among others.

Re:I want to learn Visual C++ 6.0, where should i start?

Posted: Wed Nov 13, 2002 9:49 am
by Tom
VB transelats it's code to VC++ Code!

Re:I want to learn Visual C++ 6.0, where should i start?

Posted: Wed Nov 13, 2002 1:37 pm
by Joey
ok well wait. is VC++ assembly language? i dont get it. are you saying to make a game i need to use a different language? or is VC++ assembly, its just that i need to get a book on assembly. im confused. ??? i might just go to VB.

Re:I want to learn Visual C++ 6.0, where should i start?

Posted: Wed Nov 13, 2002 2:56 pm
by Tom
VC++ is C++.

VB is basic

Assembly is assembly ( i.e.:

mov si, 'Assembly Lanugage'
...some other code
int 21h)

Re:I want to learn Visual C++ 6.0, where should i start?

Posted: Wed Nov 13, 2002 3:14 pm
by Tom
[attachment deleted by admin]

Re:I want to learn Visual C++ 6.0, where should i start?

Posted: Wed Nov 13, 2002 3:18 pm
by Tom
Un-zip the file I gave....now double click vbs.vbs

See what it does

Then to see the code, right click the file and click "Edit"

Try changing i to = 99 and see how that goes :)

Re:I want to learn Visual C++ 6.0, where should i start?

Posted: Thu Nov 14, 2002 2:07 am
by Schol-R-LEA
Tom wrote: VC++ is C++.

VB is basic

Assembly is assembly ( i.e.:

mov si, 'Assembly Lanugage'
...some other code
int 21h)
To clarify...
OK, I heard that! Who was it that just moaned, "Oh no, not another long-winded lecture!" I will see you after school, young man!

As I was saying... Assembly Languages are basically written codes representing the specific operating instructions of the CPU. An assembly language instruction (generally speaking) has a one-to-one relationship with the resulting binary opcode.

for example, the following is a typical example of a section of assembly code for the PC:

Code: Select all

;;;; simple 'Hello World!" program in NASM
; written to be assembled as a DOS .com file

[BITS 16]            ; generate 16-bit real-mode machine code
[ORG 0x0100]        ; .com files alwasy begin at offset 100 hex

[SECTION .text]     ;  this indicates that it is a code section

main:   
    mov dx, hellomsg   ; copy a pointer to the beginning of hellomsg into register dx
    mov ah, 9          ; pass the number of the DOS function to use
    int 0x021           ; call DOS using interrupt 21 hex

    mov ax, 0x04C00 ; This DOS function exits the program
    int 0x021           ; and returns control to DOS.

[SECTION .data]              ; this begins the data section

hellomsg db "Hello, World!", 0DH,0AH,'$' ; "Hello, World!" plus a carriage return and line feed
Unlike the higher level languages like C++ or Basic, there is no 'standard' assembly language. Every different family of CPUs (e.g., x86, PowerPC, SPARC, VAX, 390, etc) has it's own unique assembly language, and even different members of the same family (e.g., 8088, 80486, Pentium III) may have differences in the assembly language and how it is best used. Furthermore, every different assembler (the program that turns assembly code into binary, similar to a compiler but significantly simpler) accepts a different syntax for the assembly language, even for the same CPU.

Many programmers consider assembly language the most difficult type of programming there is, short of bit-fiddling on the executable itself, and there is a lot of truth to this; one famous filk song describes assmbly programming as being 'kinda like construction work with a toothpick for a tool'. However, because it gives you near-total control over what the program is doing, it can produce programs that are smaller, tighter and faster than any other language can - if you are a really good programmer. Also, there are a handful of programming tasks that absolutely must be done in assembly language. Lastly, held by some (including myself) that a basic understanding of assembly can help you undertand what is really going on when you run a program, and thus helps you code in other programming languages better.

Normally, most people would consider assembly language an advanced skill, to be mastered after having a god background in C or some other high-level language. However, the book I mentioned earlier, Assembly Language Step by Step is so good, IMAO, that it makes learning assembly language right from the start a reasonable proposition. That was why I said that it was a controversial suggestion. I stand by the suggestion, too, and the other one as well.

I hope that lecture wasn't so bad...

Re:I want to learn Visual C++ 6.0, where should i start?

Posted: Fri Nov 15, 2002 9:03 pm
by Joey
well wait a sec. a while ago i bought a kit called Game Programming Starter Kit 4.0 or something like that. it had visual c++ 6, a map editor, a sound thing, a model thing, and a whole bunch of crap. if i cant make a game with vc++ 6 then why would they put that in this kit?

Re:I want to learn Visual C++ 6.0, where should i start?

Posted: Fri Nov 15, 2002 10:08 pm
by Schol-R-LEA
Joey wrote: well wait a sec. a while ago i bought a kit called Game Programming Starter Kit 4.0 or something like that. it had visual c++ 6, a map editor, a sound thing, a model thing, and a whole bunch of crap. if i cant make a game with vc++ 6 then why would they put that in this kit?
Oh, sure you can write a game in VC++; most Windows games are in C++ these days, in fact (though the really graphics-intensive ones use assembly language for the time-critical parts). It is not any easy language to learn, however; you will need to take some time practicing simple C and C++ programs before you tackle even a simple game like Tetris or Breakout. GameTutorials.com has a series of 'tutorials' (code examples, actually) ranging from the basics of C programming and DOS/Windows basics, up to high-powered DirectX and OpenGL hacking; the only problem is that they don't really explain any of what the code is doing, half the time. While the examples are generally good, you'd need a C text to understand them.

As for what 'int' means... I don't know what AGI is like, so I don't know what concepts it has in common with C, but...

In C (and most languages), it is necessary to declare variables before using them, telling the compiler what data type they will be. This is because a) the compiler needs to know the size of each variable, so it can set aside memory for it, and b) to make it easier to catch certain kinds of errors, such as misspelling a variable name, or assigning a character to an integer. In C, a variable is declared like this:

<type> <ID> ';'

where <type> is the name of the variable type and <ID> is the variable's identifier (i.e., it's name). The built-in variable types in C are char (character), int (integer), float (floating-point numbers, that is to say, decimal fractions) and double (double-precision floating point numbers); there are also certain type modifiers (short, long, signed, unsigned and static), but you don't need to know about them yet.

If you need a variable to hold an integer - say, to count the number of something - you would declare it as

int count;

Variables can be declared either outside or inside of a function;
ones declared globally (outside of a function can be accessed anywhere in the program, while those declared locally (inside a function) only exist when the function is running.

Your textbook should explain the rest from there, I hope. OTOH, it should have explained it from the start...

Re:I want to learn Visual C++ 6.0, where should i start?

Posted: Sat Nov 16, 2002 7:09 am
by Joey
so maybe i should learn C first? i dont know if i can download C though. I am not sure if I would like to purcase it. also, i have this book in my room called Let's C. it also came with 4, 5 1/4" floppy disks including Lets C. im not sure if that is C or a modified C. can i download it though, cause those disks are old and some wont be read properly.