Don't start working on the game prior to the game jam, as it isn't fair to other participants starting from scratch. However, you may use publicly-available assets if you have permission and mention this when submitting (there'll be a textbox).
You can use any engine, including one you made yourself.
• If I have some code from other games that isn't game-specific (e.g. some keyboard handling and code to keep a constant framerate) does using that count as using an engine or starting early?
• Do I need/have permission to use xkcd comics themselves? (My current idea has almost all of the art taken directly from xkcd.)
(Edit: Hope it is allowed, since I've already started.)