Jump to content
  • entries
    943
  • comments
    5,899
  • views
    924,331

Framework, Lua, and the programmers who love them


Josh

4,247 views

 Share

We're finishing up 2009 by resolving some longstanding design issues that haven't been particularly critical, but have weighted on my mind. Framework is not like the main engine. It's far more high-level, and is also the kind of code people want to customize. I don't like locking the user into my way of doing things. However, the interaction between Lua, C++, and Framework commands are a real issue, which we started to see immediately as Lua became available. This was resolved by compiling Framework into the engine DLL and providing the source code in the BMX folder. Most people will be happy with the default settings, but a few will want to write their own renderers, and fortunately they still can. Most importantly, Lua can access the Framework commands, so all the water and atmospheric effects will work the same in C++ and in the editor. In the end, we finally wound up doing something I said we never would: There are commands like SetBloom(), SetNearDOF(), etc. However, since this is open-source code built on top of the buffer and shader systems, I am happy with it. The user still has low-level power, but is supported by a lot of default code that does most of what they want. This is the design I have always tried to provide.

 

The solution we arrived at with Framework can also be applied to other systems that are commonly needed, yet don't quite fit into the main engine. Providing open-source code, and then compiling it into the DLL and adding a Lua interface seems to be a good solution for anything like this. The next system I could see handled this way is AI. I am carefully watching the work Chris Paulson is doing with the recast library, and I think it has a very promising future.

 

Oh, and in other news Penumbra is finally available on Steam! Penumbra is a physics-driven game that uses the same physics library we use, Newton Game Dynamics. I highly recommend this series, both for learning and for fun.

 Share

12 Comments


Recommended Comments

Penumbra was available since March 6th 2009 on Steam. I'm not sure what the finally available thing is...I've had it since then.

Link to comment

I guess something is wrong with your link: "ReCast is an icecast2-compatible streaming server supporting MP3 and Ogg Vorbis streams out of the box. Logging can be enabled for any source (making it very suitable for radio stations where logging is compulsory) and clients can request any time range..."

Link to comment

perhaps he means finally 'on sale' as a pack?

 

I'm glad he pointed it out, cause I took the $10 'risk' to get both games. :D

 

 

(*edit* interesting...I see: Penumbra: Black Plague, Penumbra: Overture, and

Penumbra: Requiem in my Steam games tab...guess it's 3 games for $10?)

Link to comment

Last time I talked to the author, he said he was having trouble getting a response from Valve, so it being on Steam is news to me. I'm glad it worked out for them.

 

Penumbra is the model of an efficient and successful low-budget game. Everything about it is designed to minimize required production resources and maximize the depth of experience. For example, use of an intercom system allows them to have personal interaction with another character, and the only resources it requires are voice acting.

Link to comment

Framewe(o?)rk is now implemented in C# and available for download. Took me an hour and a half only. :D Awesome work, thanks again.

Link to comment

By the way, I was re-reading this entry when something puzzled me: You try to provide a "low" level engine (comparatively to Framewerk) and hesitate about integrating high-level commands (Framewerk's) into your DLL for access. Although I must say that if you started scripting, you can no longer consider your engine "low-level", and such rendering methods are just at the same level as scripting a game in the editor.

Link to comment

You could still use the buffer commands to write your own rendering routines, though I doubt anyone will do that in Lua.

 

I'm glad we are moving upwards, and not wallowing around in the fundamentals anymore.

Link to comment
You could still use the buffer commands to write your own rendering routines, though I doubt anyone will do that in Lua.

 

I'm glad we are moving upwards, and not wallowing around in the fundamentals anymore.

It wasn't a criticism, I was just wondering. I like the new system too, and although I'm not a Lua fan, I will surely enjoy the compiled Framework. The only thing I use Lua for is "prefabs" (attaching a point light to my lamp post), which could ideally be replaced by actual prefabs.

Link to comment

Don't get me wrong, I'm all for scripting. I would just prefer a scripting language with a syntax that sticks closer to the clean...well at least familiar syntax of C/C++. Hands down my favorite scripting languages are TorqueScript and JavaScript. I hate the Torque engine but the scripting syntax of TorqueScript is awesome.

Link to comment

is this feature related to this issue ? http://leadwerks.com/werkspace/index.php?/topic/480-removing-null-framewerk-message/page__hl__null framewerk__fromsearch__1

 

do you mean C++ and lua code can share the same framework ? layer worlds and cameras can be created in c++ and used in lua ? or the opposite ?

 

will you provide a sample tutorial of mixing c++ code and lua ? for example loading the scene with lua to get exact same result as the editor and running the game with c++ ?

 

:unsure:

 

EDIT: okay, i finally understood, it's about the new framework commands included in the LE header. And i got some explanations on how it works in the Getting_Started_With_Lua.pdf tutorial. For me it's a good,solution :D , because i don't want to modify the framewerk... but i still wonder how others will be able to mod the framewerk now ? i don't understand how its possible ?

Link to comment

I'll add a mechanism whereby you can add a postfilter effect into the renderer.

 

Lua's OO implementation is a bit weird, but in the end you can still go entity:SetPosition(), so I am happy with it.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...