Good examples of 2D game engine architechture.

I was wondering if there were any really good examples of 2D game engines that integrated 2D graphics, AI and collision detection in to the framework. I understand how to implement each of those things individually, and they are well documented, but when it comes to combining these things in to a usable framework I’m stumped.

Also it would be nice if the engine had some basic examples of a completed game. If there aren’t any great examples of engines or it would be too difficult to grasp the design decisions, are there any good games that incorporate all of these elements that I should look at?

Here is a full source code of a 2D Engine written in Java (example games included^^). You can browse the code online or check it out via SVN :):
http://code.google.com/p/nostaljia/

PuppyGames quietly released the source for either Titan Attacks or Revenge of the Titans, I can’t remember which. It’s not going to win any awards for Mind-Blowing Elegance in Code Architecture, let alone make up a reusable framework, but they damn sure write some of the best performing java games out there, and that counts for a lot.

Cas, now that I’ve sufficiently flattered you, care to post the link again? :slight_smile:

It’s RofT source, just without the assets so you can’t compile-run it. You can find the link in… jungle of RotT thread :persecutioncomplex:

Actually the best architecture is the one you make yourself AND you’re comfortable with it no matter how messy it is.

This.

Though preferably not too messy in case you need to make a few changes.

I do intend on making my own engine but I’m trying to improve my programming at the same time. I’ve already cobbled something together with collision detection etc but I’m just looking for some ideas on how to make it better.

I’ll take a look at these suggestions, nostaljia looks pretty good.

Thanks.

As Mr. Cas is not around i just leave this here:

Source of Revenge of the Titans
http://www.puppygames.net/blog/?p=914

P.S. I like reading code. Moar sources plz ;>