Home General Discussion

Learning to code

polycounter lvl 12
Offline / Send Message
kwakkie polycounter lvl 12
Ill cut this short: Im thinking about learning a programming language so Im able to prototype game ideas I think of in my spare time, on a amateur kind of level. So, I was wondering if any other artists here had experience with learning a programming language, and how hard the learning curve was. Did you give up? What programming language/tools did you find hard/easy to learn?

Two programmer friends of mine and coders at work tell me it's really not THAT hard to learn, but I am still curious about the trials and errors of other artists before I start ordering/borrowing/reading those mammothsized programming books :P

edit: I forgot to mention this: Im not looking for tips about stuff like game maker, as I want to be able to code for multiple platforms :)

Replies

  • Justin Meisse
    Options
    Offline / Send Message
    Justin Meisse polycounter lvl 18
    I've tried and given up many times, I even took classes as a teenager but gave up after C++

    If you find any good programming tutorials that actually explain what you're doing rather than just "type this code in, compile and your done!", let me know!
  • Ruz
    Options
    Offline / Send Message
    Ruz polycount lvl 666
    I tried learning blitz 3d and got a demo up and running, but then got someone to help me

    because at some point unless you have a natural aptitude for it then it just becomes too

    much.

    The part I struggled with is that you actually have to be creative with the code at some point ie

    knowing enough about the language to think laterally and use that to produce what you want.

    might be better to get an established game engine and learn some scripting like unreal or similar
  • Daaark
    Options
    Offline / Send Message
    Daaark polycounter lvl 17
    C# will suit you very fine. It's an easier, more productive C++, and has a large system library to help you do common tasks. The XNA library makes it easy to get little demos and prototypes running in seconds.

    You can also try the Blender Game Engine, it's built right in, and you can use your models instantly without writing up a loader. You just program behavior in. It uses Python, which is also a great beginner language.

    The problem is, you have to really WANT to learn programming. You wouldn't be a very good modeler if your mindset was that you just wanted to learn to click a few buttons and have your scene materialize. Lots of people give up because they are impatient and thing that after reading every single paragraph, they know enough to get by.. then they get stuck on trivial things and give up.
  • notman
    Options
    Offline / Send Message
    notman polycounter lvl 18
    I agree on the C# reference. Like Daaark said, the XNA developer package is all based on C#. You can even download the C# Visual Studio Express package for free. It will also give you a pretty solid base for any other program languages you may encounter.
  • super_villain
    Options
    Offline / Send Message
    super_villain polycounter lvl 11
    I took some classes in college. I used c++, assembly, and machine language. It was hell when I first started, it wasn't until the second semester that it "clicked." All of the sudden, the logic of the language (c++ in this case) made sense, and instead of taking 6 hours or so to write a program, I could do it in less than one.

    My advice for you would be to come up with something you want to do with some code or scripting language, and have at it. If you really are interested in doing it, you will figure it out. Just like people who wanna learn 3d. If someone is really into it, that person doesn't need to take a class, just a solid drive and a willingness to make mistakes. Good luck with it.
  • hobodactyl
    Options
    Offline / Send Message
    hobodactyl polycounter lvl 18
    I've done some C++ and recently did some C# with XNA, but pretty much everything Daaark has to say is fo realz :P The first tutorials for programming usually are something like "type this code in, compile and you're done!" to get your hands dirty, but then you can start seeing what the code is actually doing if you get a little further into it. NeHe's tutorials are great for having a line-by-line description of what's going on. Even if you're not wanting to do OpenGL they can help give you an idea of how some of the stuff works.

    EDIT: caseofchill somehow always seems to say the right thing :D
  • Kovac
    Options
    Offline / Send Message
    Kovac polycounter lvl 18
    Good points above. I'm not good at any language in particular... I'm in the same boat as many where I can read and tweak some code easily but can't write it from scratch for the life of me (copy/paste ftw!). I'd suggest starting small either way, and using something like UnrealScript or Torque Script to just do basic gameplay related tweaks/mutators seems like a realistic thing to jump into. Since my only interest in programming is making games I've tried to stick to just learning game related script/code (which obviously doesn't work too well for me). I've always gotten hung up on sitting down and actually getting through a book, as everything will make perfect sense up until a cutoff where it all just turns into hieroglyphics... hopefully you don't have the same issue!
  • Daaark
    Options
    Offline / Send Message
    Daaark polycounter lvl 17
    hobodactyl wrote: »
    NeHe's tutorials are great for having a line-by-line description of what's going on. Even if you're not wanting to do OpenGL they can help give you an idea of how some of the stuff works.
    NEHE's tutorials have gotten a bad rap lately for being horribly out of date, and teaching bad habits or techniques.

    I advise against using internet tutorials for learning programming. Go get a good book and read it all the way through. NOT A LEARN C++/C# IN 24 HOURS book either. Get a proper book. Do the exercises, and make sure you understand each chapter.

    Here's are MS's C# tutorials if you want to jump in. But I still advise getting a book intended for a programming newbie.
    http://msdn.microsoft.com/en-us/library/aa288436.aspx

    I tell people on the XNA forums not to take art advice from programmers, and I'll tell you here not to take programming education advice from artists. ;) You get the exact same half informed quality of input in both cases.
    I've always gotten hung up on sitting down and actually getting through a book, as everything will make perfect sense up until a cutoff where it all just turns into hieroglyphics... hopefully you don't have the same issue!
    Heh, like in art tutorials where they go from having 4 lines in step 1, to a complete city in step 2.

    The trick there is to read multiple books, and understand programming as a whole, instead of just the single minded view of any one author or language.

    I had to kill some time in a library one day, and casually read through a C++ beginner programming book by John Smiley. It was written like you were sitting in a class, and the chapters were written like actually days in the class, with students asking the questions you are probably going to ask when reading that stuff.

    He won't teach you to be the best programmer in the world, but he writes very casually, and makes you understand all the basic stuff very well. He doesn't cover everything, but the stuff he covers is very thorough, and you'd feel confident enough to jump off from there into more complicated stuff.

    That Visual C# 2008 book he lists on that link is probably a very good bet.
  • Richard Kain
    Options
    Offline / Send Message
    Richard Kain polycounter lvl 18
    Languages like C# are considered a "high" level language. This is because C# handles most memory management for you. This makes the language less powerful, but it also makes it less complicated, and easier to learn and use.

    High level languages and scripting languages are easier to learn, and usually easier and faster to use. They usually focus on Object-oriented coding methodologies.

    Low level languages are much more focused on efficient memory management. They are harder to learn and use, but they get you closer to the actual hardware. Because of that you can wring more power out of them. Most graphics drivers and rendering engines are written in low-level languages. Anything that is performance intensive benefits from low-level languages. Low level languages include C and C++. One of the lowest languages of all is Assembly. (coding for specific hardware)

    For the purposes of game prototyping, I would definitely recommend a high-level or scripting language. If you aren't trying to code your own rendering engine, there's no need for a low-level language. And there are plenty of rendering engines available that support the use of high-level languages. C# is a good choice. It isn't that hard to learn, and is nicely object-oriented. Also, it is one of the .NET languages. The principles you learn for C# translate over to all the other .NET languages. If you can code in C#, it is just a matter of syntax to code in any of the other .NET languages.

    If you want to try a scripting language, I would recommend Python or Actionscript. There are several existing engines that support Python, like the Blender Game Engine and Panda3D. Actionscript is great for making quick simple web games.
  • Kovac
    Options
    Offline / Send Message
    Kovac polycounter lvl 18
    I tell people on the XNA forums not to take art advice from programmers, and I'll tell you here not to take programming education advice from artists. ;) You get the exact same half informed quality of input in both cases.

    Haha very well said, Daaark. Thanks for the links!
  • Daaark
    Options
    Offline / Send Message
    Daaark polycounter lvl 17
    If you want to try a scripting language, I would recommend Python or Actionscript. There are several existing engines that support Python, like the Blender Game Engine and Panda3D. Actionscript is great for making quick simple web games.
    Small correction. Python isn't a scripting language. It's fully featured and "general purpose", meaning that you can do anything with it. It often gets used as a scripting language which is a plus. Because you can program your own stuff with it (Panda3D, Blender GameEngine) and then still use it to interact with your 3D modeler, like Blender, or I think Maya adopted it too (Alongside the old MEL), when it IS used as an embedded script language.

    C++ is both high and low level, and getting higher level (optionally) with each new update of the standard. It's also multi-paradigm (modular/OOP). But it's mostly geared towards OOP these days.
  • doc rob
    Options
    Offline / Send Message
    doc rob polycounter lvl 19
    It REALLY depends on what kinds of ideas you're trying to prototype. If you tell us that, we can probably point you to the best couple of options to explore.

    It would be like making a post that asks "I want to make game art, how should I learn?" Well, that DEPENDS on what sort of game art, doesn't it?

    Don't make the mistake in thinking that you need to "learn how to program" in some sort of general sense to get your ideas working. You will pick that up along the way in doing something that you care about. The best way to learn is to start doing, and there are tons of ways to do that nowadays. You will learn how to program along the way of hacking your cool ideas together with the best available tools.

    So, what is it you want to make?

    Daaark, I think you underestimate the experience level of a lot of the artists on these boards. I know of plenty of people here who have written shipping code for games, even though you may only know them from their artwork.
  • Daaark
    Options
    Offline / Send Message
    Daaark polycounter lvl 17
    doc_rob wrote: »
    Don't make the mistake in thinking that you need to "learn how to program" in some sort of general sense to get your ideas working.
    Horrible advice. And that's what makes people never know how to do anything and give up. In order to do ANYTHING, you have to know how to break it up into a series of steps using the language and how it works.

    A person who learns how programming works knows how to use the features of the language to get their job done. Because they have an understanding of what they are actually doing.

    A person who didn't learn to program instead starts a new thread on some programming forum asking how to do every one of these trivial steps and then gets taken for a ride by the answers of those who realize what this 'programmer' is doing. And the end result is 'All I ever learned to do was paste code, LOL'.
    Daaark, I think you underestimate the experience level of a lot of the artists on these boards.
    I've seen some of the stuff here when it comes to coding. Impressive. That's not what I meant. But you need to know how to filter the advice you get. Someone who is taking all the posts HERE at face value won't be able to separate the good from the ones who are clueless.

    In fact, Richard Kain once posted something about C++ in the engine thread that was nothing but paragraphs of mis-information. It was an 100% misunderstanding of OOP and the use of header files. No one called him on it. How many people will here in kwakkie's situtaion will read that and take it at face value?

    You don't ask how to program on an artists site, for the same reason you don't go to the butcher to align your satellite dish or fix your breaks. ;) It'll be a bumpy road.
  • Kevin Albers
    Options
    Offline / Send Message
    Kevin Albers polycounter lvl 18
    Another vote for c# and XNA!

    I tried to learn a bit of modern programming several times, and was overwhelmed by the learning curve, but when I tried to learn it via C#/XNA, I was able to make good progress and get over the initial hump.
  • Richard Kain
    Options
    Offline / Send Message
    Richard Kain polycounter lvl 18
    Daaark wrote: »
    In fact, Richard Kain once posted something about C++ in the engine thread that was nothing but paragraphs of mis-information. It was an 100% misunderstanding of OOP and the use of header files. No one called him on it. How many people will here in kwakkie's situtaion will read that and take it at face value?

    Hey! I never claimed to be an expert in this area. I learned what I know of C++ from an older book on C++ programming. I didn't bother learning any of the more updated standards of the language because I didn't enjoy coding with it. And I never claimed to fully grasp how header file references and OOP work in C++. In fact, that was why I stopped using C++, because I couldn't figure out how to properly code with it in an OOP approach.

    If no one but you called me on it, it just means that there are precious few C++ coders on these boards. And what does that tell you about how artist-friendly that language is?
  • doc rob
    Options
    Offline / Send Message
    doc rob polycounter lvl 19
    Daaark, in my experience watching other hobbyists get their feet wet with making games, the path you're describing is putting up a huge wall. You're asking people to climb over that wall to get to the fun stuff - actually making games. It's a perfectly viable path to take, and lots of people do to great success, but it is by no means the only path.

    Modern, free stuff means taking that approach is no longer obligatory. An artist at work here was raving to me about Unity the other day because he was able to put together a little interactive 3D scene with little work. He posted a link in IM and I was able to play it. Did he read a programming book to do it? No. Does that mean he is on a "horrible" path to making whatever game he wants to? Absolutely not.

    Here's a path I've seen lots of people take to low level languages:
    HTML->Java->C

    There are a million variations on that. Lots of game artists take something like:
    Game Engine->Scripting->C++

    Flash is more popular than anything these days and you don't need to read a fucking book to get your feet wet. Is it nice to have one on the shelf to reference? Yes.

    But, again, what is best for the OP depends entirely on what specific type of project he has in mind.
  • arrangemonk
    Options
    Offline / Send Message
    arrangemonk polycounter lvl 15
    i leanded programming with a book from "hartmut ernst"
    its a professor at my uni
    you can learn about the basic problems when programming and stuff
    but when it comes to graphics you mostly already know the algorithm and spend your time in the helpfiles for the libraries your using to find the function for this except for c, i c im doeinig every algorithm by hand, because one does not use c for big projects anymore
    and i hate c++ because of the syntax, i havent found any tutorial about the c++ syntax, kinda seems like "hmm we have ti make classes and not mess up our c... bl bla bla"
  • Daaark
    Options
    Offline / Send Message
    Daaark polycounter lvl 17
    doc_rob wrote: »
    It's a perfectly viable path to take, and lots of people do to great success, but it is by no means the only path, and what I'm suggesting is not "horrible advice."
    There is an additional wall to get over, no matter what scripting language you use. The basics of programming don't change.
    Hey look I put this object on the screen, and it can do some basic things. Now I'm going to make these other objects follow it, and then I want to make the closest object blow up.

    Okay, simple enough. But this is what it leads to.
    Hey guys. I pasted this movement code I found in a random post here to make these units move. It kind of works... I think, I just pasted it I don't even understand it, How do I get my unit to move when I move the mouse? How can I make the closest one blow up?

    Simple really. You tell the closest unit to blow up. :) Why is that even a question?
    How do I find out which one is closest?

    Whhaa? Sort them by distance.
    ...How do I find out the distance?

    Your objects have a location, which is of type Vector3. The vector class has a member function that get get the distance to another vector. Use the location of the enemy unit as the argument.
    :poly122:

    What's a class, what's an argument, what's a function? I typed vector3 and nothing happened. I think this is bugged.

    You need to store the return value.
    What's a return value? Nevermind, I pasted this code and it still doesn't work... why?

    (and this continues for 20 years)
  • Justin Meisse
    Options
    Offline / Send Message
    Justin Meisse polycounter lvl 18
    BAH! Coders get to draw crappy stick figures and pontificate on how "making games is easy" but there seems to be no method for an artist equivalent of coder art (artist code?)
  • Richard Kain
    Options
    Offline / Send Message
    Richard Kain polycounter lvl 18
    but there seems to be no method for an artist equivalent of coder art (artist code?)

    This is what programs like Flash, Unity 3D, and Blender try to address. Instead of having to do coding for everything, they give you the ability to construct your objects visually, and then apply simple conditionals to specific instances of your objects. They provide a more visually approach to setting up scenes, while handling a lot of the organization for you.

    Of course, we're still not quite there yet. And the industry has been leaning so heavily towards specialization that is unlikely to happen anytime soon. An ideal "artists" game development solution would require that all necessary elements be packaged together. But it is common for most game development elements to be addressed separately.
  • Rick Stirling
    Options
    Offline / Send Message
    Rick Stirling polycounter lvl 18
    BAH! Coders get to draw crappy stick figures and pontificate on how "making games is easy" but there seems to be no method for an artist equivalent of coder art (artist code?)


    Maxscript. My scripts are the equivalent of a stick figure.
  • Daaark
    Options
    Offline / Send Message
    Daaark polycounter lvl 17
    BAH! Coders get to draw crappy stick figures and pontificate on how "making games is easy" but there seems to be no method for an artist equivalent of coder art (artist code?)
    Because artist code doesn't compile, and usually ends with a linker error pasted in a forum post. :thumbup::poly142:
  • Richard Kain
    Options
    Offline / Send Message
    Richard Kain polycounter lvl 18
    Wow, Daaark. Ease up on the cynicism. We get your point. People ought to learn the basic tenents of coding properly, and not bother other persons with constant requests for a leg up. There's no need to harp on it to this degree. The guy was asking for a push in the right direction, not a diatribe.

    As to kwakkie's question, cross-platform compatibility can be a bit tricky. If you go for C or C++, you won't have any problems. Those languages are compatible with pretty much every platform.

    If you are going the .NET and or C# route, you will be a little more constrained. (a lot of the guys here have been recommending C#, myself included) Thankfully, there is still a viable solution for this. http://mono-project.com/Main_Page Mono is a runtime that allows .NET programs to run on most platforms. It will allow you to develop C# programs and run them on Windows, Mac, and Linux. Do keep in mind that Mono is not compatible with XNA. XNA is a Windows-only development library, and if you want to use it, XNA is constrained to that platform.

    Python is cross-platform, and I don't believe you will have any problems there.

    Actionscript runs with the Flash Player or AIR, so it is as cross-platform as those solutions. Thankfully enough the Flash Player and AIR run on quite a few platforms. The biggest issue is that the performance you will get from the Flash Player is not going to be very high. On the plus side, games developed with it can be run in any browser with the Shockwave plug-in installed. Actionscript 3.0 can handle 3D graphics, but you would be developing for a very low-poly spec if you go that route. If you want to learn AS3, download the Flex 3 SDK from Adobe's site, and download the latest version of FlashDevelop. You will also need to download the latest Java runtime if you haven't already. (the Flex 3 SDK's compiler requires Java)
  • Daaark
    Options
    Offline / Send Message
    Daaark polycounter lvl 17
    Wow, Daaark. Ease up on the cynicism.
    The above was meant as a joke! I LOL'd when Justin coined the term.

    The real artist code I think comes from visual shader editors. There are tons of articles with coders lamenting what the artists did with them.
    As to kwakkie's question, cross-platform compatibility can be a bit tricky. If you go for C or C++, you won't have any problems. Those languages are compatible with pretty much every platform.
    Only at their basic level. Everything else is implemented in libraries, which have their own platform issues. You can also run into the big and little endian thing. You have to purposely write 'multiplatform code' in order to not have any troubles. In some cases, you have to write a different version of some things for each platform (if not using a library that obscures that away).
  • Justin Meisse
    Options
    Offline / Send Message
    Justin Meisse polycounter lvl 18
    didn't even notice that in the first post: if you want to do amateur programming wouldn't cross-platform compatibility be the last thing on your mind?

    also, I'm a sad panda that I lost my disks for Game-Maker. I can't find it anywhere on the internets
    rsdgm_box.jpg
  • doc rob
    Options
    Offline / Send Message
    doc rob polycounter lvl 19
    Daaark wrote: »
    Okay, simple enough. But this is what it leads to.
    ....
    (and this continues for 20 years)

    It could lead to that, if the person involved is a giant fuckface that doesn't want to try. If that's the case, he won't get through your book either.
  • kwakkie
    Options
    Offline / Send Message
    kwakkie polycounter lvl 12
    Hey guys, thanks for all the replies, and daaark for your specialism on the subject! I never expected this topic to have this many replies actually, shows how passionate a lot of the artists here are!

    Anyway, the reason I started this post was not to ask for support or anything, but to learn from experiences of other artist that have tried the same. In my opinion most artist have a very different drive in creation of game assets. It's hard for an artist to work an entire day on something, and not have SOMETHING to show for it in the end, while a coder has the discipline and patience to work on some code all week that is optimised like the effin matrix, and still get it's drive from that ;)

    Also, I dont want to program a single game thats multiplatform, but if I happen to think of a game that would work great on the iPhone, I'd like to have the option open to actually code for it, if you know what I mean :) (ie: probably going with C, still need to decide what version specifically).

    Anyway: all of your comments have helped a lot, thanks! I think I'm going to wait with learning to code untill I get 'that' one great idea that wouldn't be too hard to code, and try to accomplish it step by step(I learned myself to script ASP and PHP webshops, sites, newsletter systems, sql querys, so Im not a total noob, I even had turbopascal classes for two years at high school lol :P).
  • Richard Kain
    Options
    Offline / Send Message
    Richard Kain polycounter lvl 18
    Ohhhhh. You're interested in making an iPhone game / app. You should have said so from the beginning. The iPhone dev kit requires the use of Objective-C. (a version of C specific to the Mac OS) I believe that other languages and libraries can be used in conjunction with the iPhone dev kit. But you will want to know at least a little bit of Objective-C.

    I think that C# can be used for iPhone apps through Mono, but I'm not certain of that. I know that iPhone games can be made using Unity 3D, and Unity 3D is programmed using Mono.

    There are a few existing engines that can already be used for iPhone development. You might want to look into those, as they would probably allow for much faster prototyping.
  • notman
    Options
    Offline / Send Message
    notman polycounter lvl 18
    I thought the iPhone used java, like many other phones (other than Verizon phones **Grrrr).

    Anyway, I'm surprised at all the drama over this, but I agree with much of what Daaark said. Personally, I think working from a book is much better than the web. That isn't to say that they should be used together, but I find it hard to switch back and fourth between a webpage and my code. Web sites also tend to leave out the description and just post the code and show you the expected outcome. Books tend to explain and break it down.

    Again, C# is a great learning language, and if you need to go lower level (c++ or c), you should have a good base, but you'll proabably never have a need to go that deep unless you really get into coding. But, based on your iPhone comment, I would research the tools and code necessary for it, if that's where you want to go.

    Good luck and feel free to ask questions. One of my degrees is in Computer Science, and I code in C# for my job. I'm sure others here do code for a living too :)
  • dejawolf
    Options
    Offline / Send Message
    dejawolf polycounter lvl 18
    from my own experience, and feeble attempts at grasping code, you simply have to sit down, and spend more than 3 hours on it.
    programming is problem solving, so if you're having a problem, you must try your best to solve it, by any means.
    another very good thing to do, is a lot of trial and error. find code that works, then try and change various things and see if you broke something after compiling, and learn it incrementally like that.
    also, don't be afraid to test your knowledge. if it looks like you think you understand something, try it out. if it doesn't work, well, its your job to change it around until it does.

    a third very important thing with programming is learning to think in numbers, instead of words,
    and translating things in real life into lists.

    say you have 3 objects, a hammer, a sledge and a fork.

    how would you do that in code?
    well, you'd do this:

    hammer is 1, sledge is 2 and fork is 3.

    so you'd tell in your code, if equippedobject = 1 attack damage = 50,
    if equippedobject = 2 attack damage = 75, etc.

    fourth, to learn to program geometry, you need to know trigonometry, calculus, algebra, and stuff like that. i haven't properly learnt it, so i'm not sure how everything holds together exactly.

    also, you need iron-handed focus on what you're doing. programming fucking hurts your brain the first times you do it, because of all the variables and shit you need to focus on.
    but just remember that the pain means you're pushing your limits, and learning something :)

    most programming languages has some common things that runs through them all.
    these things are in short order, functions, loops, variables, arrays, and statements.

    functions for example is probably the single most important part of any programming language. and understanding functions is VITAL to being able to program.
    C++ is a good place to start learning the very basic stuff,
    as you'll get to know the components of programming which goes through most of the programming languages, but i only recommend you learn command-line C++ at first,
    since doing stuff like windows programming or game programming will require external libraries that rarely work the way you want them to, and will take considerable amounts of energy and time to understand through C++.
    i think you'll be surprised how enjoyable it can be to make your own command line programs that do stuff you want them to do.

    i warmly recommend starting off GUI programming and basic geometry and graphics programming with visual basic, i was literally able to make a web browser with MS visual basic in less than an hour, with one of the tutorials. there's an express edition available from MS for free, which you can download.
    just beware that the new 2008 version of VB is incompatible with old VB, so some tutorials on the web won't make functional code anymore.

    oh and last, get some good programming books.these books double as reference, so you don't need to read them cover to cover.
    herbert schildt's C++ the complete reference pretty much contains everything you'll ever want to know about the basics of C++, and with it you'll be able to do some pretty cool command line stuff, which is vital for the "under the hood" workings of a game.
    the item list example above is just one use.
  • ElysiumGX
    Options
    Offline / Send Message
    ElysiumGX polycounter lvl 18
    I've been trying to learn the basics of programming. I want to start simple. Enough to possibly prototype ideas in 2D.

    My favorite language to learn is Python. It's easy to understand, and quick to write. Also, it's very powerful, widely used, and cross-platform.

    I've been slowly making my way through this book in my free time.
    http://www.amazon.com/Python-Programming-Absolute-Beginner-Second/dp/1598631128/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1239763026&sr=8-1

    It starts at the very beginning, and gives clear explaination as to why things are, and what is happening. The best part...every example and challenge in the book is a game of some sort. Mostly command window games...but the ending introduces GUI and a the use of Pygame for creating an Asteroids clone.

    After I'm done, I'll probably move on to this book for more advanced study:
    http://www.amazon.com/Beginning-Game-Development-Python-Pygame/dp/1590598725/ref=pd_sim_b_6

    If I'm still feeling comfortable with code, I'll make the switch to a C language. They say once you learn one language, picking up another is simple.
  • kwakkie
    Options
    Offline / Send Message
    kwakkie polycounter lvl 12
    Thanks for all the replies again guys :D

    Just for the record: no I dont want to program for the iphone specifically(I work on iPhone games as my daytime job ;)), but I used it as an example. Who know what great piece of hardware will be released in a year or two, and what amazing new functions it has that could be used for some great games, i just want to learn a common language and be prepared for when that hardware comes. :)
  • Daaark
    Options
    Offline / Send Message
    Daaark polycounter lvl 17
    ElysiumGX wrote: »
    They say once you learn one language, picking up another is simple.
    Yes, it's usually just a syntax switch. Programming is programming. You are learning python, but also the basics of programming itself. You are doing loops, and function calls, and all that other stuff.

    I once helped someone do their python assignments for school, and I had never seen python code before.

    As for C. You should learn C++ or C#, not just C. Unless you want to do iphone stuff, in which case you need to use Objective C as Kain said. The biggest differences are that C uses {}s for scoping, where python uses whitespace, and that C++ and C make you have to manage your own pointers and memory.

    I moved directly from C++ to C#. There was only a few syntactical differences, but it's really not the same language underneath, and I still have to learn over time to write code that is better suited to C#'s ways of doing things. There is a nice book for that.

    Trying to move from Basic to C was not pretty at first. I tried to do too much in C before I fully understood it all.
  • Justin Meisse
    Options
    Offline / Send Message
    Justin Meisse polycounter lvl 18
    Daaark: I just started messing with Unity and it seems magical. Since you can use C#, Javascript, or Python which would you say is the friendliest?
  • Daaark
    Options
    Offline / Send Message
    Daaark polycounter lvl 17
    Daaark: I just started messing with Unity and it seems magical. Since you can use C#, Javascript, or Python which would you say is the friendliest?
    C# or Python.

    Python IF you have other products that can use it, like Maya, simply because it will pay off in more ways then one.

    I'll be learning Python myself soon so that I can start adding some custom tools to Blender. I just put it off because I'm doing too many things at once, and the Blender Python API will be changing with the upcoming 2.5. My only experience with it so far has been helping someone do some assignments a few years ago, but I didn't actually have to learn anything about how stuff worked, it was just simple data assignments and operations. :D

    Just make sure to stick with what you pick! So many people flounder back and forth between a few languages every time they hit a gap in one of them, and then years pass and they never learn anything. I imagine that learning C# and Python at the same time would be killer, especially since tabs in python are used for scoping, and tabs in C like languages (which are freeform) have no meaning, and just help human readability.
  • jerry
    Options
    Offline / Send Message
    I just want to say that going from C# (managed) to c++ will be a nightmare. I did it the other way around and that is fine.

    I know you don't want to learn c++ but just for anyone else reading. I would recommend c# or python but c# comes with a framework and python might be a little harder to prototype a game.

    Edit: don't learn C it's old, whatever Daaark said about it is correct.

    GL.
  • Daaark
    Options
    Offline / Send Message
    Daaark polycounter lvl 17
    jerry wrote: »
    Edit: don't learn C it's old, whatever Daaark said about it is correct.
    I only said learn C++ instead because it has pretty much taken over the game industry. C and C++ are different now. There's a ton of embedded devices where C is the only option. I doubt anyone in this thread is taking that route.

    Might as well just read about them.

    !~CLICKY~!
    Tim Sweeney's anti C++ stuff...
  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    My artist to coding converison went like this:
    basic - just very very simple stuff at school, I wouldnt consider coding now ;)
    java - at university, courses... we learned a lot about algorithms and data structures. Java or C# make it easier to do this, as they take care of memory management.
    maxscript - doing very simple stuff, but also reimplementing some things learned in Java.
    C - first diving a bit into quake2/3 sourcecode, then custom engine coding
    Lua - for game/tool scripting, like it a lot. Very powerful but "simple/minimal" concept language.
    C++ - for 3dsmax SDK coding, nowadays more generally applied, although I still like "raw" C.

    The last three I use on daily basis

    While I dont have much experience with c#, due to similarity to Java, I would recommend it or even a simpler script stuff for starting. Fpr c# probably tons of tutorials, and also a bit more "officially pimped" game tutorials/frameworks (XNA..).

    As for iPhone, you can use regular C/C++ just fine. Only little code has to be done with objective-C (mostly getting input and display setup) and there are open source frameworks for that.

    --

    as for learning programming, I would start simple and really go thru the basic stuff. I think its not good to say "bah skip the boring stuff, like creating a list class or sorting algorithms". Many might just "read" those coding books, and skip over all the beginning stuff, as they read it as "oh I get it, its simple". However its really important that you actually type stuff yourself, as simple as it looks, and then expand from that / play with it.

    And once a certain knowledge of how to create algorithms (dissecting problems into small problems...) and how to manage data (not memory, leave that to high-level language), how to "reuse" code for different problems... once it made "click". Go beyond.

    The problem is that if people skip basics, and want "fancy" stuff, they go to "api learning" to quickly. Ie looking thru code libraries to find out how to display stuff, get mouse coordinates, draw lines...

    Evolution vs Revolution imo is the key, grow with the tasks you set yourself.

    At the end the "language" learning is often basically syntax, while "programming" is the content. Language is often interchangeable and doesnt "break" your thinking. It's not like you will have to decide now which language you learn, and that's it forever. Use any "high-level / script" language which you get into easiest, get the basics laid down and then go along.

    If you really want to do take it to professional level in PC/console games you will end at C++, but you dont have to start with, nor does this have to be your goal. Learn what makes you happy and gets the job done you want to do.
    Similar how people will almost always recommend people to try the mainstream modelling apps to decide which one users like/get the most success/fun at the beginning.
Sign In or Register to comment.