Grace (Alpha 4) - object-oriented framework for LÖVE

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Grace (Alpha 4) - object-oriented framework for LÖVE

Post by BlackBulletIV »

Hey guys,

Just thought I'd let you know about my object-oriented framework for Love, which I've named Grace (it was named this because love and grace go hand in hand, and also because, at least in my opinion, the framework makes things more "graceful"). It goal is to provide object-oriented oraganisation to a game (or whatever you're making with Love), and to aid in development by providing utilities for common tasks.

My reason for creating this is because I'm an organisation freak (it comes naturally being an OOP fan). I found that I could easily get into a disorganised mess when working with the functional style of plain Love.

Here's a quick list of common features copied from the README file:

* Organisation through the use of Worlds, Entities, Layers, and Tags.
* Drawing and updating callbacks for Worlds and Entities.
* Physics support in Worlds and PhysicalEntities.
* A Camera class.
* A few classes to help with data structure (these will be expanded).
* A tweening system.
* Many utility functions for maths, colors, data, easing, and more.
* Time scaling.
* And much more to be added...

Take note this has just hit Alpha 2 (EDIT: now alpha 4), and it's not fully tested. If you come across any bugs, it would be greatly appreciated if you could report them in the issue tracker.

Here's the GitHub repo: https://github.com/BlackBulletIV/grace
You can learn a lot more by reading the README file.

Tell me what you think,
BlackBulletIV
Last edited by BlackBulletIV on Thu Feb 24, 2011 8:58 am, edited 6 times in total.
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Grace (Alpha 1) - object-oriented framework for LÖVE

Post by slime »

Damn that's a lot of code. Nice work!
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Grace (Alpha 1) - object-oriented framework for LÖVE

Post by BlackBulletIV »

Thanks :). I did a line count a little while ago and it said 5500 (not including third party libs), it's probably 5500-6000 right now. And it's only going to grow! :)
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Grace (Alpha 2) - object-oriented framework for LÖVE

Post by BlackBulletIV »

Alpha 2 has been released. Here's the change log:

* [Added] Ability to check whether any mouse button or key is down.
* [Added] Ability to check whether any alphabetical or numeric was pressed, released, or is down.
* [Added] The Colors module, which has a list of common colors.
* [Added] The getAlpha and getDigit methods to Input.
* [Fixed] LinkedList now returns node and the value for it's iterator.
* [Fixed] Debug now displays shapes.
* [Removed] Debug no longer prints body angle (that was only there for testing purposes anyway).
* [Added] The Images module, to store images.
* [Added] The Fonts module, to store fonts.
* [Changed] The Colors module is now the class Color.
* [Added] Metamethods to Color class.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Grace (Alpha 2) - object-oriented framework for LÖVE

Post by kikito »

I gave it a cursory look and it looks very good. I specially like the fact that you include tests. And everything is commented, which is nice.

Keep up the good work!
When I write def I mean function.
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Grace (Alpha 2) - object-oriented framework for LÖVE

Post by BlackBulletIV »

Thanks kikito! Oh really, why's that? Yes I'm rather strict on making sure everything is documented.

By the way, thanks for middleclass, middleclass-extras, and all that. If you look in the README's acknowledgements section, I've listed out the things you've done that have helped.
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Grace (Alpha 3) - object-oriented framework for LÖVE

Post by BlackBulletIV »

Well, alpha 3 has been released. Quite a number of big changes:

[Added] Input mappings to Input module.
[Added] Ability for graphics to update themselves.
[Added] Graphics can be turned invisible and inactive.
[Added] Spritemap class, for sprite animations.
[Fixed] Camera now displays correctly.
[Added] MouseInteractive mixin for mouse interactivity.
[Fixed] utils/init.lua now includes all files properly.
[Changed] If the entity's shape is not a circle, position will be set off the body for PhysicalEntities.
[Added] The CenteredGraphic class, which makes graphics rotate around the centre of an entity.
[Fixed] Timer no longer throws errors.
[Changed] LinkedList now sets the node's value properties to nil in the clear method.
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Grace (Alpha 3) - object-oriented framework for LÖVE

Post by BlackBulletIV »

I've posted a demo of a gravity well simulation using Grace here: http://love2d.org/forums/viewtopic.php?f=5&t=2422
Araqiel
Citizen
Posts: 54
Joined: Sat Oct 30, 2010 7:33 pm

Re: Grace (Alpha 3) - object-oriented framework for LÖVE

Post by Araqiel »

I like this framework. I'm crazy about organization myself, so it's pretty well suited to me. The problem is... there's almost no documentation other than some (sometimes vague) comments in the code. If you could show me an actual usage of this, it'd clear things up immensely. I'm not sure what to do with what.
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Grace (Alpha 3) - object-oriented framework for LÖVE

Post by BlackBulletIV »

Ah finally someone breaks the silence in this thread. Glad to hear you like it.

No documentation? What on earth? Have you seen the big comment blocks above most methods, classes, and modules? Sure, there may be almost no outside-of-code documentation, but there's quite a bit in the code. If you want to get a quick overview of how the thing works, look at the README's overview section. This should give you some pointers on where to look for specific documentation in the code, and how to think about the framework. The only reason for there not being a whole heap of formal documentation, outside of code and all, is because the framework is in Alpha, and therefore is very likely to change a lot from now to when it hits 1.0.

Anyway, if the overview and documentation in the code doesn't cover something you need, let me know.
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests