Yes, you can use a custom engine, since there are no limitations on engines or tools. And an engine certainly counts as general purpose code, so you’re allowed to build it before the jam. Good luck!