What is TinyEngine?

TinyEngine wraps the functionality and power of C++ into an easy to use library for Python. Functionality is divided into two modules: TinyEngine and TinyMath.

Github Repo

TinyEngine Feature List and Tutorial

TinyMath Feature List and Tutorial

Prebuilt TinyEngine Download

 

Example Games

spaceinvaders

Space Invaders utilizes drawing rectangles, text and images; player keyboard input; rectangle collisions; frame rate capping; and sound effects.

To play: left and right arrow keys move the player back and forth, and space shoots a projectile.

30705015_2143020869047577_5562638653034856448_n

Asteroids utilizes player input, vector math, frame rate capping, and line rendering.

To play: A and D rotates the ship back and forth,  W and S to move forward and back, and space shoots a projectile.

30724574_1707612755991524_7427122361826017280_n

Space Race utilizes image rendering, sprite animation, frame rate capping, and rectangle collision.

To play: Space to jump, S to boost down, W to boost up, P to pause, O to un-pause.

Post-Mortem

We are pretty happy with how TinyEngine turned out. For only have a few weeks to complete the project, we are proud of the work we put in and the library we developed. TinyEngine is a simple yet very usable 2D game engine for Python, and is very extensible. All of us have expressed some interest in continuing to work on TinyEngine after this semester is over.

We felt we did a good job of separating out our c++ and python code. This is the first project where we did a very clean job on making sure our game logic was totally separate from our engine code. We built a game engine and then made a variety of games to show off our engine and what it is capable of doing. This was made easier because we also did a better job of communicating. We met up more often and sooner than previous projects. We’d have long discussions about what needed to be in the c++ code and what we thought was reasonable to ask of people using our engine. Because of these more frequent meetings and more in depth discussions about the project, we made a solid python game API.

Something we felt was both good and bad was re-scoping our project. Our original idea was to build a GUI game creation tool for 2D top-down dungeon crawlers. We were very excited by this idea, but it was definitely out of scope for a 3-week time window. We are glad we recognized that this original proposal was too large and re-evaluated what we could feasibly do (and ended up with TinyEngine). However, we wish we had re-scoped sooner. The project timeline had already been shortened, and when initially planning we had forgotten that we’d only have 3 weeks instead of 4. When we finally got around to working on the project, we had around 2 weeks left. This was when we’d realized we needed to re-scope or there was no way we’d finish our game engine in time.

If we had more time, we would have liked to implement some of the features we’d discussed in our planning. We had a back-and-forth about having some notion of a “GameObject” defined by our engine, and eventually settled on just exposing the functionality to the Python code due to time constraints. The idea would be that we could have a list of GameObjects and just tell the engine to render them all, check for collisions, handle them, and update them. However, we hadn’t reached this discussion early enough to solve the problem without having to completely halt development until we figured it out. Thus, the feature was dropped from our initial work on TinyEngine.

Advertisements