Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Andrew

Members
  • Posts

    1,165
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Andrew

  1. Greg Holden.

    Emarosa.

    Cinematic Sunrise.

    (Megan) Washington.

    Paramore. Seeing them next year wot.

    Still listening to Say Anything, got their acoustic album "Say Anything's Secret Origins" and I downloaded their free Myspace Transmissions acoustic EP.

    Oh. AND SISQO. That tho-tho-thothothong

  2. http://sslaxx.twu.net/SDLCollide.zip is some collision detection library I found a while back. Had to fix it up to get working with GCC 4.4.x.

    I'll check that out when I get a chance. For now, I created an Entity class with a 3D vector for position and updating those objects and updating the surfaces using the position x and y coords.

    entity.h

    class Entity
    {
    public:
        Entity();
        ~Entity();
    
        Vector3 GetPos() const;
        void SetPos(const Vector3 pos);
    
    private:
       Vector3 position;
    };
    

    app.h

    Entity hero = new Entity;
    hero->SetPos( /* wherever */ );
    SDL_BlitSurface( heroSurf, NULL, screen, &destRect );
    

    Like, similar to that. Then create a bounding box (using SDL_Rect) and basically use an early-out to check the sides. Like, if the left of rect x is greater than the right of rect y, it can't possibly be overlapping on the horizontal. etc etc

    Dunno if it's the best way but it's how I did my (terrible) breakout clone in my school game programming framework.

    Edit: there's obviously more to it, but yeah. Soon as I get something working (ie: an actual level perhaps) I'm planning on releasing the source for people to scrutinize and help me improve.

  3. Well, I don't keep the lights on, so at night, black on white is similar to looking "at a light bulb."

    Offtopic: I haven't worked much with collisions, but I'd recommend looking at this is you already haven't: http://lazyfoo.net/SDL_tutorials/lesson18/index.php .

    I need to start looking into that shit though, if I ever plan on developing a Sonic fan game. But who the hell around here would want to play that?

    Per-pixel collision is probably a bit MUCH for what I want, but that's a great link. Thanks!

    Edit: It also took me a day to realise I've been following those tutorials without meaning to. I always Google for sdl tutes and I seem to always manage to find my way to Lazyfoo.

  4. C++ and SDL is really straightforward, once you get the hang of it. What tutorial are you using?

    It's mostly the collision stuff. I reckon if I stopped being a little bitch and just did it myself I should be okay. I wanted to check out GML purely because Spelunky was made in GM, except after looking around I didn't enjoy the fact that I still had to use DnD for events, which is silly.

×
×
  • Create New...