1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dismiss Notice

C++ plus SDL1.X or SLD 2.0?

Discussion in 'C /C ++' started by iprice, Sep 15, 2015.

  1. iprice

    iprice Certified Guru

    Joined:
    Jan 31, 2008
    Messages:
    3,281
    Location:
    MK. UK. OK.
    Many years ago I dabbled with C++ and Allegro, more recently (as many will know) I've used BASIC stlye languges such as GLBasic  to create numerous games for GP2X, Wiz, Caanoo and Pandora.

    I don't know if GLBasic will support the Pyra, but I want to develop for the new machine - porting some of my older games and creating brand new ones for the device.

    Therefore I would like to have a crack at re-playing with C++ (using CodeBlocks, probably, although I used VisualStudio back in the day) and some form of SDL. I'll be following Lazy Foo's tutorials to get back on the horse.

    However, which version of SDL will be best to use - SDL 1.X or 2.0? Are the differences significant?

    I will be developing in Windows (boo, hiss!) BTW.
     
    Tags:
  2. Red Ring Rico

    Red Ring Rico Member

    Joined:
    Mar 15, 2008
    Messages:
    117
    Location:
    United Kingdom
    SDL 2.0 has a number of improvements over SDL 1.x, I'd say you should use version 2.  Lazy Foo's tutorials have been mostly updated to 2.0.  Is there any reason you're using an IDE or is it just a preference?
     
  3. slaeshjag

    slaeshjag Advanced Member

    Joined:
    Apr 8, 2010
    Messages:
    2,573
    Location:
    ~Stockholm, Sweden
    If you care about portability to anything but the mainstream platforms, avoid SDL2.
     
  4. Ziz

    Ziz Advanced Member

    Joined:
    Sep 10, 2006
    Messages:
    1,574
    GP2X had not SDL 2 support. I doubt Wiz and Caanoo have.

    The GCW Zero, the Pandora and the Pyra have support. Any following device should have SDL 2 support, too.

    E.g. I have problems with SDL 1.2 and fullscreen redrawing of a whole scene, because the flip (!) is too slow.
     
  5. iprice

    iprice Certified Guru

    Joined:
    Jan 31, 2008
    Messages:
    3,281
    Location:
    MK. UK. OK.
    I've always used an IDE. Wouldn't even know how to compile code written in a text editor. Plus an IDE will help with error catching - spelling, syntax and compile problems etc.

    I doubt I'll be going back to GP2X, Wiz or Caanoo, so those aren't an issue (and I can still use GLB if I do). I'll be targetting Pandora, Pyra, pc and Android. SO, SDL 2.0 would be best then?

    Thanks for your help :)
     
  6. pmprog

    pmprog Advanced Member

    Joined:
    Apr 25, 2011
    Messages:
    3,192
    I found making a CMake file realitively painless, however, I still like using IDEs - primarily for auto-complete :)

    I've yet to play with SDL v2, but the API doesn't seem to be massively different from v1.2 (I could be wrong though).

    Allegro is always a nice option too, and supports a lot more out of the box :)
     
  7. iprice

    iprice Certified Guru

    Joined:
    Jan 31, 2008
    Messages:
    3,281
    Location:
    MK. UK. OK.
    I used Make files many years ago for the Allegro stuff. As a newb back then it was hell on earth (this was pretty much before the internet help sites were any good/existed), so I'll stick with IDEs where possible! :p
     
  8. pmprog

    pmprog Advanced Member

    Joined:
    Apr 25, 2011
    Messages:
    3,192
    CMake are easier than make files... I've still never made a makefile ;)
     
  9. iprice

    iprice Certified Guru

    Joined:
    Jan 31, 2008
    Messages:
    3,281
    Location:
    MK. UK. OK.
    There you go  - shows my ignorance and why I need an IDE! What's the difference?
     
  10. Red Ring Rico

    Red Ring Rico Member

    Joined:
    Mar 15, 2008
    Messages:
    117
    Location:
    United Kingdom
    I'm not going to try and coerce you into using a text editor and makefiles, however, you still get all the error messages from the compiler at the command line.

    SDL 2.0 would be ideal for your situation.  For the most part, SDL is useful for windowing system, audio, and input abstraction.  For 2D games it's also great, though you will need to use OpenGL (ES in the case of the Pandora/Pyra, the differences are minimal between GL and GLES) for 3D if you plan on doing so.
     
  11. iprice

    iprice Certified Guru

    Joined:
    Jan 31, 2008
    Messages:
    3,281
    Location:
    MK. UK. OK.
    3D isn't on my agenda at all. Maybe once I'm comfortable with using C++ again I'll look at text editors.
     

Share This Page

Loading...