1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Is SDL(SimpleDirect Media Layer)for amateurs and bad programmers?

Discussion in 'Software Development' started by NuttyBar, Jul 2, 2012.

Thread Status:
Not open for further replies.
Advertisement
  1. NuttyBar

    NuttyBar Banned Thread Starter

    Joined:
    Jun 29, 2012
    Messages:
    67
    I have been stuck with SDL as a beginner programmer trying to strengthen my C++ programming ability, and have never completed any programs worthy of even noting.

    I have been on and off programming for a while and sadly, over the months, I've gained few helpful knowledge tips/skills in programming altogether.

    I went for DirectX programming time ago, but that was too difficult. It was also discouraging altogether.

    I'm certain that Mac's API(Cocoa?)would be just as bad if not worse in terms of difficulty than DirectX, so that's not worth it either...

    So being stuck with beginner C++ skills and some amateur SDL programming ability, am I just a terrible programmer, or could it be that I need more time to brush up all over again?

    These are some things I can do in SDL:

    1.Blit images to the screen.

    2.Handle input functionality somewhat good.

    3.Go in fullscreen mode.

    4.Move images around the screen.

    I can also do some Windows API programming, such as handling window events, message box input methods, and drawing shapes(never drawn an actual image file though).

    Am I that bad that I should just quit altogether, or am I far enough in for there to be hope on my getting further? I am asking you, not asking you to ask me.

    You are the experienced ones compared to me(although many people exist that cannot program at all, I'm uncertain if an amateur skill in it is worthy of some acknowledgment or praise of succession in the skill by others who are better).
     
  2. Ent

    Ent Josiah Trusted Advisor

    Joined:
    Apr 11, 2009
    Messages:
    5,408
    How long have you been trying? Like anything, you'll get better if you keep practising.

    There are real advantages to being able to program. Becoming a decent programmer often helps you to learn how to listen to people, and to understand what they're getting at even if you think they're wrong. It can help you to think logically, and often to work out why things work the way they do. Then there's the obvious perks of being able to boss computers around and to make cool stuff.

    Should you quit? That's not something that we can gauge. We haven't even seen one line of your code, much less how you've progressed. It's up to you, depending on how you'd value the possible advantages and what you make of likely costs.

    As to your original question, I'm afraid that I have no idea. I've just never encountered it before.
     
  3. NuttyBar

    NuttyBar Banned Thread Starter

    Joined:
    Jun 29, 2012
    Messages:
    67
    I'll write the following code off the heap of my own head with not a single reference after going a few weeks without SDL/C++ and you tell me if you think my code is good:

    Using IDE: Code::Blocks(latest version).
    Using compiler: mingw32-g++.exe(GNU GCC Compiler).
    Using SDL lib directory, SDL include directory, and SDL linker flags: -lmingw32, -lSDLmain, -lSDL.

    Code:
    #include <SDL/SDL.h>
    int main(int args, char*LOC[])
    {
    SDL_Init(SDL_INIT_VIDEO);
    SDL_Surface* IMG = SDL_LoadBMP("defaultimg.bmp");
    SDL_Surface* SRF = SDL_SetVideoMode(800, 640, 32, SDL_FULLSCREEN||SDL_HWSURFACE||SDL_DOUBLEBUF);
    SDL_BlitSurface(IMG, NULL, SRF, NULL);
    SDL_Flip(SRF);
    SDL_Delay(5000);
    SDL_FreeSurface(IMG);
    SDL_FreeSurface(SRF);
    SDL_Quit();
    return EXIT_SUCCESS;
    }
     
  4. NuttyBar

    NuttyBar Banned Thread Starter

    Joined:
    Jun 29, 2012
    Messages:
    67
    Waiting ... and adding this reponse so this thread appears back at the visible top of Software Development.
     
  5. Ent

    Ent Josiah Trusted Advisor

    Joined:
    Apr 11, 2009
    Messages:
    5,408
    I haven't got a clue. I don't use SDL so I don't know what such code should look like.
     
  6. NuttyBar

    NuttyBar Banned Thread Starter

    Joined:
    Jun 29, 2012
    Messages:
    67
    What do you use?

    Maybe I can take a shot at that and you can tell me what you think.
     
  7. Ent

    Ent Josiah Trusted Advisor

    Joined:
    Apr 11, 2009
    Messages:
    5,408
    I'm nearly exclusively into BASIC languages, and it's not worth your while trying to learn that at this stage. I think there are a few helpers around more familiar with the C or Java family languages.
     
  8. NuttyBar

    NuttyBar Banned Thread Starter

    Joined:
    Jun 29, 2012
    Messages:
    67
    C++ is an industry standard.

    You don't use it? :eek:
     
  9. Ent

    Ent Josiah Trusted Advisor

    Joined:
    Apr 11, 2009
    Messages:
    5,408
    Not yet. I haven't even been to university yet, and everything I know I've taught myself. As I said, you're better of asking those with more experience in what you're trying to do.
     
  10. NuttyBar

    NuttyBar Banned Thread Starter

    Joined:
    Jun 29, 2012
    Messages:
    67
    So you're saying I'm more advanced in programming than someone who has over 4,000 posts?

    PS: You don't need to go to universities to learn programming. In fact I'd rather know programming very well, ins and outs, before even thinking about going to university(so it would be easier/faster).

    I've been using C++ for almost a year, but I'm no "expert" in any shape or form. Still on the beginner side, sadly.
     
  11. Ent

    Ent Josiah Trusted Advisor

    Joined:
    Apr 11, 2009
    Messages:
    5,408
    I've been programming for about 5 years, but I use Basic, VBS, VB.net, etc.
     
  12. NuttyBar

    NuttyBar Banned Thread Starter

    Joined:
    Jun 29, 2012
    Messages:
    67
    I would not recommend anyone(with an exception of complete beginners or people who like event-driven programming languages/methodologies)to program under Visual Basic.

    But that's just my opinion ... I generally dislike the way that events are the structures/building blocks of the code itself. It never made real sense to me as to why such a programming methodology would be essential to me.

    Languages like C, C++, Java, etc. allow you to write and structure code yourself, not limiting you to the formation of code under event-driven syntax and work structure.

    To me it seems more "free" to write code in multi-paradigm, general purpose languages, because you can rotate style around in varieties of ways, while still holding all your code functioning together.
     
  13. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1059439