/castle-games

Castle's legacy game building environment

Primary LanguageC++OtherNOASSERTION

Castle

This is Castle Games, an environment for creating and distributing lua games for Mac, Windows, iOS, Android, and maybe Linux. The Castle team worked on this in 2018-2019. It is currently in stasis while we work on castle.xyz; however, it might still boot up and run games.

Project Structure

  |-- base              # Lua source for the Ghost engine
  |-- cef               # CEF lib for macOS and Windows
  |-- ci                # continuous integration for automatic Castle builds and releases
  |-- common            # crossplatform native code
  |-- desktop           # Castle's React UI source code
  |-- ghost-extensions  # supporting libraries for the Ghost engine
  |-- love              # Love2d source
  |-- macosx            # macOS-specific native code
  |-- megasource        # windows build stuff
  |-- mobile            # mobile source
  |-- node              # Embedded node server for running some cross-platform operations
  |-- openssl           # openssl lib for Ghost engine
  |-- shared-assets     # static assets that need to be included crossplatform
  |-- web               # built JS bundles for Castle's React UI
  |-- win               # Windows-specific native code

Code Style

  • Run format.sh after making changes to native code.
  • For JS code in the desktop UI, see desktop/README.md.

Run on macOS

See macosx/README.md.

Run on mobile

See mobile/README.md.

Run on Windows

Prereqs

Build and run

Use either Git Bash or WSL to run commands in.

  • Make sure Git LFS is initialized.
  • Go into the 'megasource/' directory.
  • Run sh configure_cmake.sh. You don't need to do this every time, but you need to do it at least on the first build.
  • Run cmake.exe --build build --config Debug. If the build succeeds but is unable to write 'Castle.exe', make sure any existing Castle processes are terminated and try again. On WSL, sh kill_castle.sh under 'megasource/' works for terminating Castle processes.
  • Run ./build/Debug/Castle.exe to launch the Castle binary that was built.

Run on Linux

See LINUX.md.