wc3edit.net

United Warcraft 3 map hacking!
It is currently June 16th, 2019, 4:36 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: December 4th, 2011, 4:33 am 
Offline
Old Wrinkly Member
User avatar

Joined: April 19th, 2009, 12:46 pm
Posts: 234
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?


Top
 Profile  
 
PostPosted: December 6th, 2011, 4:23 am 
Offline
Forum Drunk
User avatar

Joined: January 17th, 2007, 4:22 pm
Posts: 2887
Location: Darmstadt, Germany
Title: Proud to be a Kraut!
XNA/C#


Top
 Profile  
 
PostPosted: December 6th, 2011, 12:50 pm 
Offline
Old Wrinkly Member
User avatar

Joined: April 19th, 2009, 12:46 pm
Posts: 234
Ok thanks a ton =), I'll take a look at those.


Top
 Profile  
 
PostPosted: December 8th, 2011, 3:05 pm 
Offline
Super Moderator
User avatar

Joined: February 24th, 2009, 1:31 pm
Posts: 3792
Location: JEW LAND
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 ;)


Top
 Profile  
 
PostPosted: December 8th, 2011, 9:33 pm 
Offline
Forum Staff

Joined: February 3rd, 2009, 11:28 pm
Posts: 2195
Location: Wisconsin
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..


Top
 Profile  
 
PostPosted: December 9th, 2011, 10:51 pm 
Offline
Forum Drunk
User avatar

Joined: January 17th, 2007, 4:22 pm
Posts: 2887
Location: Darmstadt, Germany
Title: Proud to be a Kraut!
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.


Top
 Profile  
 
PostPosted: December 10th, 2011, 5:29 pm 
Offline
Super Moderator
User avatar

Joined: February 24th, 2009, 1:31 pm
Posts: 3792
Location: JEW LAND
But I thought C++ is the best language to code in this days :( all this learning for nothing? :(


Top
 Profile  
 
PostPosted: December 10th, 2011, 8:07 pm 
Offline
Forum Drunk
User avatar

Joined: January 17th, 2007, 4:22 pm
Posts: 2887
Location: Darmstadt, Germany
Title: Proud to be a Kraut!
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.


Top
 Profile  
 
PostPosted: December 19th, 2011, 6:39 am 
Offline
Forum Drunk
User avatar

Joined: January 17th, 2007, 4:22 pm
Posts: 2887
Location: Darmstadt, Germany
Title: Proud to be a Kraut!
Another reason why C++ sucks:
Code:
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:
Quote:
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 :/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)