Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Starting with SDL

  1. #1

    Starting with SDL

    Hi guys,

    I've just started to look around, reading articles and past posts.
    I've decided to start working with the JEDI-SDL and I'm currently
    looking at the demos that come with the lib.

    I'm going to fiddle with the Shooting demo to understand the basics
    of the lib.

    If you have any suggestions or links that can help me it will be cool



    CheGueVerra

  2. #2

  3. #3

    Starting with SDL

    Thanks, for the link, the Shooting demo that is in the SpriteEngine demo
    folder, uses each element of the Chapters of that link, that helped me to
    understand more the lib.

    I noticed though that all the classes were cluttered together, so my first task,
    will be some refactoring, so it will be easier to modify behavior and add
    features. I'm not sure that a manager for all Sprites in the Sprite engine is a
    good idea .. has anyone followed that path before?

    When I work I try to have the least global vars as possible, I noticed that
    most exemples do the opposite, is this a standard in game programming,
    because my refactoring mind will go crazy accepting those pratices...

    :evil:

    CheGueVerra

  4. #4

    Starting with SDL

    Global vars can not be avoided in games, at least in my point of view
    From brazil (:

    Pascal pownz!

  5. #5

    Starting with SDL

    I would say it depends on the programmer and how he decides to construct the game. A well structured game (according to OOPD) can be made without global vars, but sometimes it may just be easier to make a variable global.

    About the examples, I have the impression that they were made quick (thereby not caring to much about OOPD) to demonstrate SDL and not to demonstrate how you would program a well designed game.
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  6. #6

    Starting with SDL

    Thanks for your answers,

    I was wondering if I was attacking this in the right mind set, the last post
    gives me the confirmation that I wanted.

    I know that in the everyday, boring, Application development, in a rare case
    I might use global vars, but I try to restrain from doing so.


    Once I refactored it, without any new additions, but just better OOPD
    can I post the code here somewhere to get the advice of the game gurus that
    are members of this site?

    CheGueVerra

  7. #7

    Starting with SDL

    Well, I have finished refactoring the Shooting demo,

    It was good way for me to learn how all the pieces go together. (In that demo)

    I'm going to start plying with it and see, how easy it is to add features and
    such.

    Anyone have some tips on how to create a scoreboard on the screen?

    I would appreciate if anyone would look at the refactorred code.

    For comments, code review, or share good pratice.

    CheGueVerra

  8. #8

    Starting with SDL

    Well, where I stand currently:

    I've got the scoreboard in there but for now I'm using the
    TTF_RenderText_Shaded method, which is ok for the demo I created
    but would like to get a better look and feel on it, suggestions?

    Other than that, the next item on my list is the user starting with 3 planes,
    which means preparing the battlefield for reentry and such. I would like to
    add this on the scoreboard in something of the sorts
    Which would take the a spaced reserved a the bottom of the screen.

    StandardText + UserScore + OffSet Space(Dynamic) + [SpritePlayerLife]*n

    I'm also going to start working on some silly story line...

    I've been using GraphicGale to explore the editing of the images for the sprites
    BTW, I just colored a copy of the original plane to be a laser firing enemy
    and reversed, the original laser image work.

    The hardest part for me will be the time consumed by my little graphic talents...

    I'm having fun, changes from reading all those Medicals libs and APIs.

    CheGueVerra

  9. #9

    Starting with SDL

    Well the scoreboard looks the way I wanted it to, So i'm pretty happy about that.

    The reentry, simple, but effective, I guess.

    Still haven't started the story line, but I have a couple of ideas of game play I want to try first.

    Going to bed, it's been a long time since developing kept me awake all night.

    CheGueVerra

  10. #10

    Re: Starting with SDL

    How I get a pixel color with SDL?. Like GetColor() C function
    Live programming, eat programming, breath programming and die programming

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •