lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 9/8/2017 8:30 AM, Soni L. wrote:
Cratera is a games-oriented Lua fork, focused on keeping patchsets
minimal.

https://bitbucket.org/TeamSoni/cratera

The current patchset is only 63 lines, and fully
backwards-compatible with Lua 5.3.4, making it quite suitable as a
Lua alternative for game development.

Most games nowadays use components one way or another, and Cratera
adds built-in syntax for them. While "component syntax" is the
preferred name, it can also be referred to as "runtime traits".

  "Most games nowadays use components one way or another"

I'm not familiar with this "components" thing, or maybe I just didn't look in the right places. I am also confused by "runtime traits".

Would you be so kind as to give a sort of layman's introduction to this component thing? If it's in your Cratera syntax then I guess it is still sort of on-topic for this list. TIA.

The syntax is a simple syntax sugar, reminiscent of Lua's own OOP
syntax, and is defined as:

    object:component.method() --> object.component.method(object)
    object:[Component].method() --> object[Component].method(object)

The ability to use object components in addition to string
components allows this syntax to integrate cleanly with existing
runtime class/type systems.

--
Cheers,
Kein-Hong Man (esq.)
Selangor, Malaysia