What Should I Learn First

Talk about anything you want, but keep it within the rules, please.
User avatar
Durge
Senior Member
Posts: 199
Joined: April 19th, 2009, 12:46 pm

What Should I Learn First

Post by Durge »

I know that this is basically the same thing as the thread going on right now, but I have a different question than he does. I am currently in the process of self-learning JASS and trying to understand it better, I'm hopefully going to major in gaming programming (eq2, wc3, etc.). I know that a lot of people say it is a largely different thing than learning to do other stuff in programming, therefore I made a different thread asking you guys, what do you think I should learn to get on the track of game programming?
ImageImageImage
User avatar
Dekar
Forum Drunk
Posts: 2899
Joined: January 17th, 2007, 4:22 pm
Has thanked: 1 time
Been thanked: 1 time

Re: What Should I Learn First

Post by Dekar »

XNA/C#
Don't pm me with Warcraft questions, this is a forum so just make a post!
In the world of thinking we are all immigrants. -Robert Nozick
User avatar
Durge
Senior Member
Posts: 199
Joined: April 19th, 2009, 12:46 pm

Re: What Should I Learn First

Post by Durge »

Ok thanks a ton =), I'll take a look at those.
ImageImageImage
User avatar
haxorico
Super Moderator
Posts: 3197
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: What Should I Learn First

Post by haxorico »

While exploring this. I heard there are some free game-engines out there. But it is all up to you, how far BACK you want to go to make your game?

From my understanding, this is how it goes.

CPU-Language - First level of programing, the CPU only understands 1 and 0, for all I know, you CANNOT code in this langauge.
Assembler - Second level of programing, the commands you write are translated to the CPU-Language.
C/C++/C#/Java etc... - Third level of programming, the commands you write are translated to the assmebler langauge (and from there to CPU-Language)
Game-Engine - Fourth level of programing, the commands you use, are translated to a third level language.

I might be wrong, this is how I understood the things work.
Now, ofcourse it can go further, JASS is translating itself to the Game-Engine language, and the GUI world editor, translate it itself to JASS. So here is what happens.

You have a command on world-editor GUI.
It converts itself to the JASS langauge - If you check out how it does it. You see alot of un-needed lines and stuff that can be removed.
The game reads the JASS code and converts it to its game-engine language.
The game-engine reads the commands, converting them to the 3rd level language (for ex. C++)
C++ converts it to assembler
assembler converts it to CPU Language
the CPU is following the assembler commands.

Now, no translation is 100% okay, again, the best example you can see is write somthing in GUI, convert it to jass and see how many stuff you can remove. Same happens in every stem of the way.

I picked to start coding in 3rd level langauge, I code in VB and in C++. If you want to make a game in C++. I recommend using allegro (google or youtube). I made some dumb stuff with it for learning purposes only. They are dumb and fun only for me as I say to myself OMG I MADE IT DO LIKE THAT! or w/e...

P.S: After I started programing using C++ and allegro (its a library of commands for C++ IIRC) I started being MORE amazed at games and all they ahve to do in-order to make it work. After I did my "animation" of a character just moving around the screen. I look at games like BF3 and COD saying OMFG YOU ARE SICK FOR DOING IT! but meh, just me ;)
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac: 

Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).

Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
owner123
Super Moderator
Posts: 1943
Joined: February 3rd, 2009, 11:28 pm
Been thanked: 1 time

Re: What Should I Learn First

Post by owner123 »

If you're going for a programming language, I recommend C#. Visual Basic has a bunch of stuff in it that other languages don't, that will make you a worse programmer in other languages, like allowing certain implicit conversions..
User avatar
Dekar
Forum Drunk
Posts: 2899
Joined: January 17th, 2007, 4:22 pm
Has thanked: 1 time
Been thanked: 1 time

Re: What Should I Learn First

Post by Dekar »

haxorico wrote:While exploring this. I heard there are some free game-engines out there. But it is all up to you, how far BACK you want to go to make your game?

From my understanding, this is how it goes.

CPU-Language - First level of programing, the CPU only understands 1 and 0, for all I know, you CANNOT code in this langauge.
Assembler - Second level of programing, the commands you write are translated to the CPU-Language.
C/C++/C#/Java etc... - Third level of programming, the commands you write are translated to the assmebler langauge (and from there to CPU-Language)
Game-Engine - Fourth level of programing, the commands you use, are translated to a third level language.
The lowest language consists of so called opcodes. They are just binary sequences though humans are able to understand them if they really want to. You can open a binary using a hex-editor and hack it, I have done it before! There actually is a level below that called microcode for most CPUs that can't be programmed directly. Usually an opcode gets translated into several microcode instructions. Some ancient architectures *cough* Intel *cough* actually have to recompile everything inside the CPU to conceal their shortcomings.

Assembly is mostly a nice way of visualizing opcodes, it also allows you to replace addresses with labels. Once you know assembly you could directly program in opcodes as well if you really wanted to. For example on x86 the opcode 0x90 aka 0b10010000 gets replaced by "NOP" which is short for "No OPeration". (Do nothing)

You shouldn't mix up C#/Java with C/C++ since C/C++ get actually translated into opcodes which then are ran by the CPU, while C# and Java get compiled into Bytecode which then runs inside some virtual CPU. (See: http://en.wikipedia.org/wiki/Jvm)

I don't really feel like commenting on the rest.

I like Java and I would really recommend it, but I feel like for games (DirectX etc) C# has the edge. I couldn't stand being locked in to using microsoft products though. So use C# and XNA which is some game development framework made by microsoft. Beginners really shouldn't learn C/C++ since those languages are inherently dangerous. A professor of mine gave me some C++ code lately (I was supposed to use that for an assignment) that probably would have allowed me to hijack PCs running the resulting application. When I confronted him about it he tried to avoid it by telling me he wanted to increase the compatibility (Which was unrelated BS) and couldn't really understand the problem. Most people using C/C++ produce code containing major security flaws, so just don't.
Don't pm me with Warcraft questions, this is a forum so just make a post!
In the world of thinking we are all immigrants. -Robert Nozick
User avatar
haxorico
Super Moderator
Posts: 3197
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: What Should I Learn First

Post by haxorico »

But I thought C++ is the best language to code in this days :( all this learning for nothing? :(
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac: 

Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).

Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
User avatar
Dekar
Forum Drunk
Posts: 2899
Joined: January 17th, 2007, 4:22 pm
Has thanked: 1 time
Been thanked: 1 time

Re: What Should I Learn First

Post by Dekar »

Well if you plan on investing a ton of time learning all the flaws and inconsistencies go on. I have mixed feelings when it comes to C++, it's some kind of love/hate relationship. If you know you plan to make a living doing software development you'll probably want to learn C/C++ sooner or later anyway, but for most people occasionally developing software it's probably the wrong tool for the job.
haxorico wrote:But I thought C++ is the best language to code in this days :( all this learning for nothing? :(
Dunno what your skill level is, but learning C++ is probably learning OOP and general concepts of modern programming languages for the first 6 months and then learning all the quirks and flaws for the next 3 years. So if you're still in the first phase you don't have much to worry about since you can now easily switch to any other modern language.
Don't pm me with Warcraft questions, this is a forum so just make a post!
In the world of thinking we are all immigrants. -Robert Nozick
User avatar
Dekar
Forum Drunk
Posts: 2899
Joined: January 17th, 2007, 4:22 pm
Has thanked: 1 time
Been thanked: 1 time

Re: What Should I Learn First

Post by Dekar »

Another reason why C++ sucks:

Code: Select all

class InputOutputManager
{
    virtual void displayText(string text);
}

myInputOutputManager.displayText(string() + "Suicide Booth 0.8\n" +
                                     "Please select mode of death. " +
                                     "Quick and painless, or slow and horrible.\n\n");
@haxo:
Can you explain why I need the "string()"? Removing it results in:
main.cpp:32: error: invalid operands of types 'const char [19]' and 'const char [30]' to binary 'operator+'
I give you a hint, it has to do with mixing C and C++ as well as with operator overloading. C++ really is such an ugly language :/
Don't pm me with Warcraft questions, this is a forum so just make a post!
In the world of thinking we are all immigrants. -Robert Nozick