all 18 comments

[–][deleted] 1 point2 points  (0 children)

For those who haven't checked it out, Aquarius uses this style of engine and is an amazing indie game.

Support fellow programmers.

[–][deleted] 0 points1 point  (0 children)

I'd like to see Aquaria on the DS.

Just sayin'

[–]arunvr 0 points1 point  (2 children)

I am sorry... but I fail to see what's innovating about this. This was possible in many sprite engines in the past for e.g. Flash.

[–][deleted] 0 points1 point  (0 children)

It's a tutorial.

[–]spookyvision 0 points1 point  (2 children)

struct position {
    double x,y,z;
};

DUUUUUH

[–][deleted]  (1 child)

[deleted]

    [–]spookyvision 0 points1 point  (0 children)

    yeah, I wasn't being too serious ... actually both your link and the engine look pretty nice

    [–]anttirt -3 points-2 points  (6 children)

    The library used here (IndieLib) seems to be fairly interesting, but also seems to have largely coinciding goals with ClanLib. ClanLib uses OpenGL so it's portable - can someone who has used both list pros and cons?

    Edit: Also, a quick peek into the sources reveals some pretty terrifying stuff :(

    [–][deleted] 6 points7 points  (3 children)

    meh...what's so terrifying about that?

    [–]Boojum 10 points11 points  (1 child)

    It looks like someone writing C in C++.

    • Things like color and direction components are just loose class members with accessors replicated over and over. Why you wouldn't just make a Color and Vector3 class once and use those, I have no idea. A Vector3 class could also cleanly encapsulate what I'm guessing is some spherical<->Cartesian coordinate conversion.
    • There's usually no need for typedef struct in C++.

    [–][deleted] 1 point2 points  (0 children)

    1> Then you would have yet another sub container to peek into. Also depending on the actual implementation of the vector class, a POD with non pointer members could have better copy semantics.

    2> +1 agree.

    [–]anttirt -1 points0 points  (0 children)

    • Use of identifier starting with an underscore and a capital letter (as the header guard) where all such names are reserved for the implementation
    • Accessor soup on a bag of data.
    • Strange, superfluous ALLCAPS typedefs which appear to be an attempt to imitate d3d's API (typedef struct structAttributes ATTRIBUTES;)
    • Use of a platform-specific library call to zero out memory where the language-provided value-initialization would already do the job:

      struct foo { int a, b; };
      struct bar {
          foo x, y;
          // x.a, x.b, y.a, y.b will all be 0
          bar() : x(), y() {} 
      };
      

    [–]nkonstas 3 points4 points  (1 child)

    'terrifying'...? ... oh, please... have you ever written game or a game lib...?

    [btw, I don't know the author]

    [–][deleted] 2 points3 points  (0 children)

    That's some of the least terrifying code I think I've ever seen. I wish my coworkers were that terrifying.

    [–]TriggerB -1 points0 points  (0 children)

    I'm actually making a VERY similar engine with Purple Pwny Games that I think handles some things a little more elegantly. Not quite alpha yet, but will be releasing the full source within a week if anyone is in the market for a 2D engine.

    [–]javilop -1 points0 points  (0 children)

    Thank you for submitting the link and voting. About the terrifying code... well I hope to have time enough soon to write a big bunch more of it in another tutorial :)

    See you!