Skip to content

Basic patterns #2362

Answered by eonarheim
ewal asked this question in Q&A
Jun 24, 2022 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @ewal, thanks for the kind words!

As far as patterns go, we've been pretty pleased with how the structure of our latest jam game turned out.

https://github.com/excaliburjs/ludum-50

What we've found that works well generally is the following:

  • Keep the main.ts entrypoint as small as possible (this is where we create a new ex.Engine() and configure anything else at the engine level)
  • Keep all of our assets/resources in one file resources.ts and load them all at once in the main
  • Keep a config.ts for tweaking global constant values easily, we've wired up things like dat.gui or tweakpane that make changing config during development easy
  • Where possible we use onInitialize() for initialization…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@eonarheim
Comment options

Answer selected by ewal
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants