Programming

  • Niven
    18th Jul 2012 Member 0 Permalink
    I've started doing some c++ programming, since I've always wanted to learn to program. One thing that I've wanted to do, was some graphics with programming (any graphics at all, from shapes to snake game to pictures to whatever else). I recently, today, heard about opengl, which I think it whats primarily used for graphics. I was just wondering, how much skill someone would need to have in c++ to be able to learn opengl. Two examples of programs I've wrote are http://pastebin.com/SsZRAASG and http://pastebin.com/0YSDj1kY . So what do you guys think? Would I be able to learn opengl or would I be completely lost

    edit: The notes in the programs are there for me. I like to put them there to help remember what everything does
  • mniip
    18th Jul 2012 Developer 0 Permalink
    opengl is really complex
    C++ sucks

    you are really lost
  • jenn4
    18th Jul 2012 Member 0 Permalink
    @Niven (View Post)
    @mniip is having a bad day or something, he's negative for anything. Personally I don't like C++ very much, but I also think that every coder does things in his/her own way and language of choice, no matter does others like that way/language or not. OpenGL, I believe you can learn OpenGL if you just have enough of interest and motivation to try it until you learn it.
  • boxmein
    18th Jul 2012 Former Staff 0 Permalink
    @jenn4 (View Post)
    Well, he is right. OpenGL is awfully complex.
    @Niven (View Post)
    If you want some easier stuff to start up, try using Unity 3D to create some easier games. Then move on to Java or so and later on, down to the heavy artillery, C/++.
    Use SDL to utilize OpenGL and OpenAL and you're on a roll.
  • Niven
    18th Jul 2012 Member 0 Permalink
    @jenn4 (View Post)
    So you're sayin I should try it and see what happens?

    @boxmein (View Post)
    What's the major difference between c++ and java? And is Unity 3D actually writing out code, or just drag and drop objects to make a game?
  • The-Con
    18th Jul 2012 Member 0 Permalink

    @Niven (View Post)

     Opengl wouldn't be too hard, but I didn't like it because in comparison to SDL it was a bit harder

    As far as combinations between them go... I just avoid that because I can never seem to set up thing right, and end up stuffing everything up.

  • Niven
    18th Jul 2012 Member 0 Permalink
    @The-Con (View Post)
    So, does SDL allow for as much freedom/creativity as Opengl or is it more limited?
  • MasterMind555
    18th Jul 2012 Member 0 Permalink

    @Niven (View Post)

     Okay, you just started C++, one very complex and difficult language, and want to jump in OpenGL just like that?

     

    I hope you learned another language or at least the basic of object-oriented programming, because it is very easy to be overran by the difficulty. 

     

    If you really want to learn C++ now, take it slow! Make sure you understand what you are doing totally or it will hit you in the back later. Here's some things I noticed in your code that you should improve: 

     

    - Formatting : It makes you code way clearer to put a space after a colon and around operators.

    - Gotos : http://stackoverflow.com/questions/46586/goto-still-considered-harmful

    - Object Oriented Programming : Not really something you should improve, but rather learn about. It will be very useful in object oriented game programming, trust me.

     

    You can PM me if you have any other questions

  • Niven
    18th Jul 2012 Member 0 Permalink
    @MasterMind555 (View Post)
    Well, I had just heard about Opengl and not how difficult it was, or the skill needed to do it. That's why I created this thread. I was unsure about it and decided to ask people about it before continuing with anything. Thanks for the constructive criticism.
  • boxmein
    18th Jul 2012 Former Staff 0 Permalink
    @Niven (View Post)
    Java is somewhat simpler to write, it has a different way of being object oriented and it runs on Windows, Mac and Linux alike. Most of the things are handled by objects, so you have little generic code to write.

    Unity3D is kind of an unified platform, similar to Flash where you create various display objects in-game and use them with your code.