Re:Show HN: Crown – A flexible game engine written from scra...
by andrewmcwatters on Thursday June 22, 2017 @01:09PM
(#14613681)
Your use of `require` is incorrect.
[ Parent
| on HN ]
Re:Show HN: Crown – A flexible game engine written from scra...
by dbartolini on Thursday June 22, 2017 @01:15PM
(#14613738)
Can you elaborate on this?
Re:Show HN: Crown – A flexible game engine written from scra...
by andrewmcwatters on Thursday June 22, 2017 @02:04PM
(#14614081)
Re:Show HN: Crown – A flexible game engine written from scra...
by andrewmcwatters on Thursday June 22, 2017 @02:02PM
(#14614070)
Re:Show HN: Crown – A flexible game engine written from scra...
by dbartolini on Thursday June 22, 2017 @02:15PM
(#14614158)
All resource paths (.lua files are resources like any other) in Crown are unix-style and do not include the extension.
I have a custom loader that deals with it: https://github.com/dbartolini/crown/blob/master/src/lua/lua_...
Re:Show HN: Crown – A flexible game engine written from scra...
by andrewmcwatters on Thursday June 22, 2017 @03:21PM
(#14614609)
I would recommend that you extend `package.loaders` instead. You risk breaking expected `require` functionality. Then you get the benefits of both!!
https://www.lua.org/manual/5.1/manual.html#pdf-package.loade...
Re:Show HN: Crown – A flexible game engine written from scra...
by dbartolini on Thursday June 22, 2017 @03:25PM
(#14614639)
I already do so: https://github.com/dbartolini/crown/blob/master/src/lua/lua_...