ofxEngine, revived

Hey everybody,

I am writing to announce that I am reviving my ofxEngine project, which is an attempt to turn oF into a working game engine. I know games have already been made using oF, but what I am attempting is making an extensible set of organizational structures to streamline and simplify the process of making a game with oF. I am separating it into 3 main levels:

  1. A set of abstracted base classes to provide game-intensive functionalities (examples would include Cloneables, Thinkables, and SceneNodes)
  2. A set of managerial/workhorse classes to handle the inner workings and to be used to stratify and connect parts of the engine (ie. Configuration, Resources, Input/Interactivity, Networking, Graphics, Audio, etc.)
  3. A system for extending the engine both with_in_ and with_out_ C/C++ knowledge, through class extension, (possibly) dynamic library hooks, and XML-based “Mods”, with an extensible, specialized parser based on ofxXmlSettings.

I am currently, at the time of writing this, about halfway through development of level 1 classes, which could probably actually comprise several small addons already. I will try to post each level of developed code when its done for review. Please let me know what you think, I’m not exactly a professional, so if anyone has any ideas feel free to post them here.

hi shotgunninja,

good idea! I’m currently working on a game that I create using openFrameworks. It’s a tetris-like game where people can use physical objects to build the blocks. This game is part of the music festival LowLands (http://www.lowlands.nl)

would it be possible that you put your code on a svn server? (google code) so I can maybe help a bit?

roxlu

sure, I can try, but my internet connection is usually off, so I don’t know how well that would work… I’ll try to get one set up. First, though, I want to get some more of the abstracts done.

i’d include a scripting language. i use lua in my projects which works very well and is a very elegant language to use.
http://www.lua.org

best
joerg

@joerg: Absolutely! I’ve actually worked a little bit with Lua and Luabind, and I know the Lua language. I’ve been thinking that it would be a good thing to incorporate into the engine, especially since there’s already an attempt to bind oF to Lua in progress in the bindings section of the forums. That also may be a better way to handle the extensibility system than using dynamic libraries, because the dynamic library idea would involve making a multiplatform system for using dynamic libraries (Shared Objects on *nix, Dylibs on Apple/Darwin, DLLs on Windows) for openFrameworks. (Another good idea for an addon, however…) Also, with Luabind, it actually adds on effective Object-Orienting to Lua scripts, and that could be used for non-C++ extensions of the engine.

@roxlu: I’ve set up a Google Code site, although I don’t have my files uploaded just yet (and I haven’t ever really used svn, so I don’t know how it works :oops: ). It’s available at http://code.google.com/p/ofxengine/, so go check it out, I guess. I’ll try to get the code uploaded today if I can, sometime in the future if I can’t.

Well, lots to do! Thanks!

Hey, just a progress note. This is my checklist so far:

DONE ofxFunction
DONE ofxFunction::InvalidException

DONE ofxCloneable
DONE ofxCloneMap

DONE ofxBaseSceneNode
DONE ofxSceneRootNode
DONE ofxSceneNode
DONE ofxScene

DONE ofxThinkable
DONE ofxThoughtKey
DONE ofxThinker

DONE ofxCacheable
TODO ofxCacheData
TODO ofxCacheLoader
TODO ofxCache

TODO ofxLogical
TODO ofxLogicWeb
TODO ofxLogicGate
TODO ofxLogic

TODO ofxAnimated
TODO ofxAnimation
TODO ofxAnimator

TODO ofxEntity

TODO ofxEngine
TODO ofxEngineLoader
TODO ofxEngineMod

Hey hey,

I thought I’d let you know that I’m working on a 3D realtime animation program that’s open source and includes a visual node system, a console for calling functions from string input, a relatively robust renderer, skeletal animation and all sorts of stuff.
I don’t have enough time to document all the things that are going on right now as I am in the middle of production on a theatre piece, but you might find some code very useful.

You can find the project here: http://moviesandbox.googlecode.com

It’s not based directly on openframeworks, though uses some of the classes and hopefully gives some back (like the collada loader).

Just thought it might help, but I hope it won’t confuse.

f

oh funny that you are using some parts of OF !

out of curiosity, how hard would it be to have movie sandbox as an addon (running on top of OF)? I’m thinking of things like CCV which are sitting on top as an addon, which could make development easier for people…

take care,
zach

Hey zach,

I am thinking about it. But i basically have a very strong structure, with all sorts of lists and stuff and I don’t know how scaleable that would be.
I am currently using ofTrueTypeFont but will phase that out with a texture based font (that I intend to develop as an ofAddon).

Also, I think that there are some parts that can be converted to addons but i am not sure about moviesandbox as a whole.

There are also lots of smaller programs like the AR stuff, some skeletal animation tool and some other stuff I am working on that are all-of all the time.

I’ll have more time to think about structures in september if all goes well, and I appreciate any ideas.
I just thought that some of the things might be useful for other people to look at already.

f

well, the plus side of going the Movie sandbox as addon route is that it could help shape the OF code for better use in 3d tools. For example, having the iphone addon meant abstracting the windowing toolkit (which makes it possible to use OF with glfw, other window kits, etc). I’ve seen that and also CCV, and it makes me confident that major systems as an addon can be done and are good challenges for the development of OF.

I’m not sure how much of your event model and system incompatible, but I’d be happy to investigate it.

in the meantime, taking parts out to make addons is always helpful !!

take care!
zach

Wow, what a set of responses, all in the last 12 hours! Awesome to see that people are taking an interest in my engine.

I will definitely be going over movie sandbox in the near future. One of the thing I had intended for the engine, however, was to be a supplemental “organizational structure” to OF to direct it towards game design. After the engine has an adequately robust set of features, I will start hooking it into openFrameworks more, in terms of the libraries used. Movie sandbox just jumped up in my list; however, I am implementing the generic stuff first, then I will later apply that to OF. (Example: ofxCacheData will later be derived for ofImage, ofxXmlSettings, ofShader, etc.)

hi shotgunninja,

what about physics? do you have something in mind for that? I would recommend bullet physics… it would be great if it was included in the initial realse as it’s really handy thing to have build into a engine (maybe with abstraction)

roxlu

I was just thinking of that, and until you had said something, I was going to leave it to memo’s physics for 2D, and the OF-Bullet addon (isn’t there one in progress?) for 3D, but I thought about it again, and it seems like it would be a great thing to add.

EDIT: I found an old post by Memo about a Physics Abstraction Layer library at http://www.adrianboeing.com/pal/index.html that looks promising. I’ll have to check with memo to make sure its not already a part of ofxMSAPhysics or something, but it would make it so much easier than implementing Box2D or Bullet separately.

yeah an abstraction layer would be awesome! I’ve done some tests with MSAPhysics, ofxBox2d and ofxRuiPhysics and I got best performance (for 2D) usign ofxBox2D/box2d. Also bullet physics has a good community as it’s also used by blender. If I could choose I would go for the abstraction layer if possible, or else for box2d and bullet.

btw, there is a nice ofxIniSettings addons build by Companje which is nice for simple ini settings (though I’m not sure if it’s UTF8 compatible which would be nice for strings).

roxlu

Also, I have uploaded some of the complete files at (SVN) https://ofxengine.googlecode.com/svn/trunk, or the project page http://code.google.com/p/ofxengine. (It’s on rev. 8, if only because this is the first SVN project I’ve had hosted :stuck_out_tongue: ) It doesn’t have all of the necessary files yet, just the finished ones. As I get more done, I will get the files uploaded. And if anyone wants to hop onto the project (because I’m not totally sure of what I’m doing), just let me know, and I’ll try to get you in on the project. I might need some help.

hi shotgunninja, how’s your engine going?

In the meanwhile I’ve written a “real-object” based tetris game; though without your engine as it wasnt ready when I started with this game. You can see more info here:
YouCube

I’m still working on it; however, since I’ve started at MSOE (today’s my first day), I might have other things to worry about. Plus, I’ve had a website deadline to meet up until recently. I am going to resume working on it as soon as I finish downloading it from my own repo. (-_-)