Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 3 4 [5]

Author Topic: Learning to code - what, why and how.  (Read 6504 times)

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: Learning to code - what, why and how.
« Reply #60 on: June 23, 2009, 12:26:34 pm »

You know it's already page four and I've yet to see someone post something meaningful that had been done with a computer language, (Iji being excluded).
The things I can post on the internet are either too messy or I'm to jealous about their copyright :P

Anyway... When I have more time (This vacations) I will try to tidy up my stuff and show them and see if someone wants to join me in a small game project in c++ (DirectX may or may not be included... leave Win32 Api to me).

IndonesiaWarMinister:  Lot's of programs use little wraps of assembly code when they need very fast processing in a certain part of the program.
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

Mr Tk

  • Bay Watcher
  • Would you like a mint? It's only waffer thin.
    • View Profile
Re: Learning to code - what, why and how.
« Reply #61 on: June 24, 2009, 12:25:04 am »

You know it's already page four and I've yet to see someone post something meaningful that had been done with a computer language, (Iji being excluded).

Ok lets break it down, (with a games based twist because OP said he wanted to make a Rougelike)

Java can be used on any computer, as long as that computer has a Java Virtual Machine. It can also be used as a web application as well. This means that your computer can run on any computer and be GUARANTEED to run exactly the same on each machine due to the VM.

yeah... as long as you forget about classes and polymorphism you should be fine....

So? You can do things which are very similar in C to classes and polymorphism. Structs and functions which will only take a pointer to a struct. Safe difference really. (As a side note objects are quite powerful, however can introduce extra resource requirements to a program)

Also if you can learn C, then your most of the way to C++.

However the problem with C and C++ is that it is not machine specific. If you want to have it for Mac, Linux and PC then there are some functions which will work on one, but not another. However at this point I'd say it's a moot point since your just beginning to learn.

C# is not considered as fast as C, or C++, however C# does have the advanage of being able to use .Net resources, and also gives you easy access to the XNA framework of which if you wanted to buy a membership, you can start making games to play on your Xbox. (All the programs to deal with sound as well are included if you use Visual Studio Express 2008.)

C++ and C# can support DirectX and OpenGL (Java as well through Java 3D but I don't know the details), and C can use OpenGl.

Also using C++ you can use SDL for input handling and drawing 2D graphics. (Java and C# take care of these themselves.)

Also you can use Lua in C and C++ (alot of people use it for AI in games)

And finally some of the other posters have pointed out there are a lot of tuts for C++.

I hope this gives you a bit more information about the languages.
Logged
First ten minutes of play I ate my loincloth and then got some limbs torn off by a super friendly rat. Thumbs up from me.

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: Learning to code - what, why and how.
« Reply #62 on: June 24, 2009, 06:31:04 am »

yeah... as long as you forget about classes and polymorphism you should be fine....

So? You can do things which are very similar in C to classes and polymorphism. Structs and functions which will only take a pointer to a struct. Safe difference really. (As a side note objects are quite powerful, however can introduce extra resource requirements to a program)
What about inheritance?  How can you easyly emulate that?

C# is cool because it's similar to java in the way that it wipes out the trash for you... but for that same matter, it IS slower...

It always ends up in what you want to do... then you have to find the adequate language for it...

if it works for you... (and it's not suboptimal) Use it.

Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

Mr Tk

  • Bay Watcher
  • Would you like a mint? It's only waffer thin.
    • View Profile
Re: Learning to code - what, why and how.
« Reply #63 on: June 24, 2009, 08:53:53 pm »

Ok that's one thing that C++ and Java have over C.

But OO is not the be all or end of programming languages. Sometimes I like C because I don't have to mess around with the scopes of classes, and inner classes.

That's the thing about languages. Know what to use when.
Logged
First ten minutes of play I ate my loincloth and then got some limbs torn off by a super friendly rat. Thumbs up from me.
Pages: 1 ... 3 4 [5]