From cbc2cb468d6a74e0f8c18d9790a50ecba1b4d4bd Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 30 Dec 2022 14:57:16 -0500 Subject: [PATCH] v2.0.0: updated readme and doc files --- README.md | 12 ++++--- desktop/build.gradle | 13 ------- docs/getting-started-android.md | 32 +++++++++-------- docs/getting-started-desktop.md | 62 +++++++++++++++++++++------------ docs/getting-started-ios.md | 42 +++++++++++++++++++--- docs/recommended-changes.md | 28 ++++++++------- 6 files changed, 117 insertions(+), 72 deletions(-) diff --git a/README.md b/README.md index 420aed93d..439cbc979 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,16 @@ # Shattered Pixel Dungeon -A Roguelike RPG, with randomly generated levels, items, enemies, and traps! Based on the [source code of Pixel Dungeon](https://github.com/00-Evan/pixel-dungeon-gradle), by [Watabou](https://www.watabou.ru). +[Shattered Pixel Dungeon](https://shatteredpixel.com/shatteredpd/) is an open-source traditional roguelike dungeon crawler with randomized levels and enemies, and hundreds of items to collect and use. Its based on the [source code of Pixel Dungeon](https://github.com/00-Evan/pixel-dungeon-gradle), by [Watabou](https://www.watabou.ru). -Shattered Pixel Dungeon currently compiles for Android, iOS and Desktop platforms. It is available from [Google Play](https://play.google.com/store/apps/details?id=com.shatteredpixel.shatteredpixeldungeon), [the App Store](https://apps.apple.com/app/shattered-pixel-dungeon/id1563121109), and right here on [GitHub](https://github.com/00-Evan/shattered-pixel-dungeon/releases). +Shattered Pixel Dungeon currently compiles for Android, iOS, and Desktop platforms. You can find official releases of the game on: +![Get it on Google Play](https://shatteredpixel.com/assets/images/gplay-badge.png) +![Download on the App Store](https://shatteredpixel.com/assets/images/appstore-badge.png) +![Steam](https://shatteredpixel.com/assets/images/steam-badge.png) +![Github Releases](https://shatteredpixel.com/assets/images/github-badge.png) If you like this game, please consider [supporting me on Patreon](https://www.patreon.com/ShatteredPixel)! -There is an official blog for this project at [ShatteredPixel.com](https://www.shatteredpixel.com). +There is an official blog for this project at [ShatteredPixel.com](https://www.shatteredpixel.com/blog/). The game also has a translation project hosted on [Transifex](https://www.transifex.com/shattered-pixel/shattered-pixel-dungeon/). @@ -17,4 +21,4 @@ If you'd like to work with the code, you can find the following guides in `/docs - **[If you plan to distribute on Google Play please read the end of this guide.](docs/getting-started-android.md#distributing-your-apk)** - [Compiling for desktop platforms.](docs/getting-started-desktop.md) - [Compiling for iOS.](docs/getting-started-ios.md) -- [Recommended changes for making your own mod.](docs/recommended-changes.md) \ No newline at end of file +- [Recommended changes for making your own version.](docs/recommended-changes.md) \ No newline at end of file diff --git a/desktop/build.gradle b/desktop/build.gradle index 91a5ea090..97f35f7ac 100644 --- a/desktop/build.gradle +++ b/desktop/build.gradle @@ -66,8 +66,6 @@ runtime { imageName = appName } - //TODO everything works but there is some jank and default icons, esp. for installers and linux - // look into --resource-dir flag for further improvements if (osName.contains('windows')) { targetPlatform("win") { jdkHome = jdkDownload("https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jdk_x64_windows_hotspot_16.0.1_9.zip") @@ -76,10 +74,6 @@ runtime { jpackageHome = file("./build/jdks/win/jdk-16.0.1+9") imageOptions = ["--icon", file("./src/main/assets/icons/windows.ico"), "--java-options", "-XX:+IgnoreUnrecognizedVMOptions"] - - installerType = "msi" - installerName = appName - installerOptions = ["--win-dir-chooser", "--win-menu"] } } } else if (osName.contains('linux')) { @@ -90,10 +84,6 @@ runtime { jpackageHome = file("./build/jdks/linux/jdk-16.0.1+9") imageOptions = ["--icon", file("./src/main/assets/icons/icon_256.png"), "--java-options", "-XX:+IgnoreUnrecognizedVMOptions"] - //assumes ubuntu linux, changes needed to generate .rpm files - installerType = "deb" - installerName = appName - installerOptions = ["--linux-shortcut"] } } } else if (osName.contains('mac')) { @@ -108,9 +98,6 @@ runtime { //append .apple because com.shatteredpixel.shatteredpixeldungeon was taken =( "--mac-package-identifier", appPackageName + ".apple", "--mac-package-name", "ShattererdPD"] - - installerType = "dmg" - installerName = appName } } } diff --git a/docs/getting-started-android.md b/docs/getting-started-android.md index 3d2164a77..29bbebece 100644 --- a/docs/getting-started-android.md +++ b/docs/getting-started-android.md @@ -1,37 +1,39 @@ -### Prerequisites +(Last Updated December 2022) + +## Prerequisites To compile Shattered Pixel Dungeon for Android using this guide you will need: -- A computer which meets the [system requirements for Android Studio](https://developer.android.com/studio#Requirements) -- (optional) a GitHub account to fork this repository, if you wish to use version control -- (optional) an android phone to test your build of Shattered Pixel Dungeon +- (required) A computer which meets the [system requirements for Android Studio](https://developer.android.com/studio#get-android-studio) +- (recommended) A GitHub account to fork this repository, if you wish to use version control +- (recommended) An Android phone to test your build of Shattered Pixel Dungeon -### Installing programs +## Installing programs Download and install the latest version of [Android Studio](https://developer.android.com/studio). This is the development environment which android apps use, it includes all the tools needed to get started with building android apps. It is optional, but strongly recommended, to use version control to manage your copy of the Shattered Pixel Dungeon codebase. Version control is software which helps you manage changes to code. To use version control you will need to download and install [Git](https://git-scm.com/downloads). You are welcome to use a separate graphical git client or git CLI if you prefer, but this guide will use Android Studio's built-in git tools. -### Setting up your copy of the code +## Setting up your copy of the code If you are using version control, fork this repository using the 'fork' button at the top-right of this web page, so that you have your own copy of the code on GitHub. -If you do not wish to use version control, press the 'clone or download' button and then 'Download ZIP'. Unzip the downloaded zip to any directory on your computer you like. +If you do not wish to use version control, press the green 'code' button on [this repository's main page](https://github.com/00-Evan/shattered-pixel-dungeon), and then 'Download ZIP'. Unzip the downloaded zip to any directory on your computer you like. -### Opening the code in Android Studio +## Opening the code in Android Studio Open Android Studio, you will be greeted with a splash page with a few options. If you are using version control, you must first tell Android Studio where your installation of Git is located: - Select 'Configure' then 'Settings' - From the settings window, select 'Version Control' then 'Git' -- Point 'Path to Git executable:' to 'bin/git.exe', which will be located where you installed git. +- If it wasn't auto-detected, Point 'Path to Git executable:' to 'bin/git.exe', which will be located where you installed git. - Hit the 'test' button to make sure git works, then press 'Okay' to return to the splash page. After that, you will want to select 'check out project from version control' then 'git'. Log in to GitHub through the button (use username instead of tokens), and select your forked repository from the list of URLs. Import to whatever directory on your computer you like. Accept the default options android studio suggests when opening the project. If you would like more information about working with Git and committing changes you make back to version control, [consult this guide](https://code.tutsplus.com/tutorials/working-with-git-in-android-studio--cms-30514) (skip to chapter 4). If you are not using version control, select 'Import project (Gradle, Eclipse ADT, etc.)' and select the folder you unzipped the code into. Accept the default options android studio suggests when opening the project. -### Running the code +## Running the code Once the code is open in Android Studio, running the Android build will require either a physical android device or an android emulator. Using a physical device is recommended as the Android Emulator is less convenient to work with and has additional system requirements. Note that when you first open and run the code Android Studio may take some time, as it needs to set up the project and download various android build tools. @@ -41,17 +43,17 @@ This guide includes a [section on physical android devices...](https://developer ... and [a section on emulated android devices.](https://developer.android.com/studio/run/emulator) -If you frequently wish to run your code for debugging purposes, and the changes you make are to platform-independent modules (such as core and SPD-classes), you may find that running the [desktop build](getting-started-desktop.md) is more convenient. +If you frequently wish to run your code for debugging purposes, and the changes you make are to platform-independent modules (core and SPD-classes, which is most of the code), you may find that running the [desktop build](getting-started-desktop.md) is more convenient. -### Generating an installable APK +## Generating an installable APK or AAB -An APK (Android PacKage) is a file used to distribute Android applications. The Android studio website has [a guide which covers building your app into an APK.](https://developer.android.com/studio/run#reference) Note that the option you will likely want to use is 'Generate Signed Bundle / APK'. +APK (Android PacKage) and AAB (Android App Bundle) files are used to distribute Android applications. The Android studio website has [a guide which covers building your app.](https://developer.android.com/studio/run/build-for-release) Note that the option you will likely want to use is 'Generate Signed Bundle / APK'. APK files are best used when you are not trying to upload your app to Google Play, otherwise you must provide Google with an AAB file and they will used that to generate APK files for you. -Note that APKs must be signed with a signing key. If you are making a small personal modification to Shattered Pixel Dungeon then your signing key is not important, but **if you intend to distribute your modification to other people and want them to be able to receive updates, then your signing key is critical.** The Android studio website has [a guide on signing keys.](https://developer.android.com/studio/publish/app-signing.html#opt-out) +Note that APK and AAB files must be signed with a signing key. If you are making a small personal modification to Shattered Pixel Dungeon then your signing key is not important, but **if you intend to distribute your modification to other people and want them to be able to receive updates, then your signing key is critical.** Google will also sign your app for you on Google Play, but you can provide them with the same key that you use to sign your own APKs. The Android studio website has [a guide on signing keys](https://developer.android.com/studio/publish/app-signing.html) that covers both personal and Google Play distribution. Additionally, note that by default Shattered Pixel Dungeon uses R8 on release builds. R8 is a code optimizer which decreases the size of the APK and improves performance, but also makes error reports more difficult to read. You can disable R8 by setting minifyEnabled to false in [android/build.grade](./android/build.gradle). If you wish to keep R8 enabled, you can learn more about it [here.](https://developer.android.com/studio/build/shrink-code) -### Distributing Your APK +## Distributing Your App The Android Studio website includes [a guide for ways to distribute your app.](https://developer.android.com/studio/publish) diff --git a/docs/getting-started-desktop.md b/docs/getting-started-desktop.md index 47d1319e4..e03d1459f 100644 --- a/docs/getting-started-desktop.md +++ b/docs/getting-started-desktop.md @@ -1,66 +1,82 @@ -## Quick Setup +(Last Updated December 2022) + +# Quick Setup If you merely wish to build the game from source, or make small personal changes to the code, then the project can be built with minimal setup: - Ensure a [JDK (Java Development Kit)](https://www.oracle.com/java/technologies/downloads/#java11) is installed on your computer. (Minimum Java 11, which is the version Android Studio uses) -- Copy the code by pressing the 'clone or download' button and then 'Download ZIP'. Unzip the downloaded zip to any directory on your computer you like. +- Copy the code by pressing the green 'code' button on [this repository's main page](https://github.com/00-Evan/shattered-pixel-dungeon), and then 'Download ZIP'. Unzip the downloaded zip to any directory on your computer you like. - or optionally use version control (see full setup for details). - Open a command prompt from the project's root folder and type `./gradlew desktop:debug` to run the game in debug mode. - Type `./gradlew desktop:release` to build a release JAR file, which will be placed in `/desktop/build/libs`. Any code changes you make will be applied when you newly run or compile the game. -## Full Setup +# Full Setup Performing a full setup is strongly recommended if you wish to make changes to the code beyond very minor personal modifications. -### Prerequisites +## Prerequisites To compile Shattered Pixel Dungeon for desktop using this guide you will need: -- A computer which meets the system requirements for [Android Studio](https://developer.android.com/studio#Requirements) or [Intellij](https://www.jetbrains.com/help/idea/installation-guide.html) -- (optional) a GitHub account to fork this repository, if you wish to use version control +- A computer which meets the system requirements for [Android Studio](https://developer.android.com/studio#get-android-studio) or [Intellij](https://www.jetbrains.com/help/idea/installation-guide.html) +- (recommended) a GitHub account to fork this repository, if you wish to use version control -### Installing programs +## Installing programs Download and install the latest version of [Android Studio](https://developer.android.com/studio) (or [Intellij](https://www.jetbrains.com/idea/download)). Either software includes all the tools you will need to compile the game. -Android Studio is recommended over Intellij as it is required to compile the [Android version](getting-started-android.md) of the game. If you prefer Intellij and are certain you do not need Android functionality, you may use that instead. This guide will assume Android Studio is used, but the two programs are very similar. +Android Studio is recommended over Intellij as it is used by the developer, and makes compiling the [Android version](getting-started-android.md) of the game simpler. If you prefer Intellij you may use that instead. This guide will assume Android Studio is used, but the two programs are very similar. It is optional, but strongly recommended, to use version control to manage your copy of the Shattered Pixel Dungeon codebase. Version control is software which helps you manage changes to code. To use version control you will need to download and install [Git](https://git-scm.com/downloads). You are welcome to use a separate graphical git client or git CLI if you prefer, but this guide will use Android Studio's built-in git tools. -### Setting up your copy of the code +## Setting up your copy of the code If you are using version control, fork this repository using the 'fork' button at the top-right of this web page, so that you have your own copy of the code on GitHub. -If you do not wish to use version control, press the 'clone or download' button and then 'Download ZIP'. Unzip the downloaded zip to any directory on your computer you like. +If you do not wish to use version control, press the green 'code' button on [this repository's main page](https://github.com/00-Evan/shattered-pixel-dungeon), and then 'Download ZIP'. Unzip the downloaded zip to any directory on your computer you like. -### Opening the code in Android Studio +## Opening the code in Android Studio Open Android Studio, you will be greeted with a splash page with a few options. If you are using version control, you must first tell Android Studio where your installation of Git is located: -- Select 'Configure' then 'Settings'. -- From the settings window, select 'Version Control' then 'Git'. -- Point 'Path to Git executable:' to 'bin/git.exe', which will be located where you installed git. +- Select 'Configure' then 'Settings' +- From the settings window, select 'Version Control' then 'Git' +- If it wasn't auto-detected, Point 'Path to Git executable:' to 'bin/git.exe', which will be located where you installed git. - Hit the 'test' button to make sure git works, then press 'Okay' to return to the splash page. -After that, you will want to select 'check out project from version control' then 'git'. Log in to GitHub through the button (use username instead of tokens), and select your forked repository from the list of URLs. Import to whatever directory on your computer you like. Accept the default options android studio suggests when opening the project. If you would like more information about working with Git and commiting changes you make back to version control, [consult this guide](https://code.tutsplus.com/tutorials/working-with-git-in-android-studio--cms-30514) (skip to chapter 4). +After that, you will want to select 'check out project from version control' then 'git'. Log in to GitHub through the button (use username instead of tokens), and select your forked repository from the list of URLs. Import to whatever directory on your computer you like. Accept the default options android studio suggests when opening the project. If you would like more information about working with Git and committing changes you make back to version control, [consult this guide](https://code.tutsplus.com/tutorials/working-with-git-in-android-studio--cms-30514) (skip to chapter 4). If you are not using version control, select 'Import project (Gradle, Eclipse ADT, etc.)' and select the folder you unzipped the code into. Accept the default options android studio suggests when opening the project. -### Running the code +## Running the code Once the code is open, you can run it from Android Studio by specifying the gradle command from the quick guide as a run configuration: -- Select 'Run' on the top toolbar, and then 'Edit Configurations...'. +- Select the run configurations dropdown menu on the top right toolbar, and then 'Edit Configurations...'. - Click the + icon to add a new configuration, and select 'gradle'. -- Set 'Gradle project' to 'Shattered-pixel-dungeon', and 'tasks' to 'desktop:debug' -- Name the configuration whatever you like, and select 'Apply' and 'OK' on the bottom right. +- Set 'Gradle project' to 'shattered-pixel-dungeon:desktop', and 'Tasks and arguments' to 'debug' +- Name the configuration whatever you like (e.g. 'desktop:debug'), and select 'Apply' and 'OK' on the bottom right. -That configuration is now saved and can be selected from the configurations dropdown menu. It can be ran using the green arrow icon, and debugged with the green bug icon. +That configuration is now saved and can be selected from the run configurations dropdown menu. It can be ran using the green arrow icon, and debugged with the green bug icon. -### Generating a distributable JAR file +## Generating a distributable JAR file -A JAR (Java ARchive) is a file used to distribute Java applications. Just as with running the code, a run configuration must be set up to create the jar. Follow the above steps, but with 'desktop:release' instead of 'desktop:debug'. Running this configuration will generate a distributable JAR file in the `/desktop/build/libs` folder. +A JAR (Java ARchive) is a file used to distribute Java applications. Just as with running the code, a run configuration must be set up to create the jar. Follow the above steps, but with 'release' instead of 'debug'. Running this configuration will generate a distributable JAR file in the `/desktop/build/libs` folder. Note that by distributing your modification of Shattered Pixel Dungeon, you are bound by the terms of the GPLv3 license, which requires that you make any modifications you have made open-source. If you followed this guide and are using version control, that is already set up for you as your forked repository is publicly hosted on GitHub. Just make sure to push any changes you make back to that repository. -Note that JAR files will require a [Java runtime enviroment](https://java.com/en/download/win10.jsp) to be installed on a user's computer in order to work. In future this codebase will likely be expanded to allow bundling a java runtime with the application, so that a simple runnable EXE file can be generated. \ No newline at end of file +Note that JAR files will require a [Java runtime enviroment](https://www.java.com/en/download/) to be installed on a user's computer in order to work. + +## Generating OS-specific executables + +Shattered Pixel Dungeon uses [JPackage](https://dev.java/learn/jpackage/) and [Badass Runtime](https://badass-runtime-plugin.beryx.org/releases/latest/) to generate platform-specific executables that don't require users to install Java to run the game. This process is unfortunately more awkward, locks the game to a specific operating system, and produces larger files. Because of this JARs are recommended as a simpler starting point. + +Just like with a JAR, generating a platform-specific executable requires a new run configuration. Use 'jpackageimage' instead of 'release'. This may take a bit of time, and will generate an executable file in the `/desktop/build/jpackage` folder. All the specific configurations for badass runtime and jpackage are already set up, but you can view them in the 'runtime' block in [desktop/build.gradle](./desktop/build.gradle). + +You will only be able to create an executable that matches the operation system you are currently using: +- If you have a Windows computer, you can generate a folder with a Windows .exe file inside (zip before distributing) +- If you have a MacOS computer, you can generate a .app file which Mac users can run or place in their applications folder + - **Note that your .app will probably need to be [notarized](https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution) by Apple for users to be able to use it.** The [desktop/notarize.sh](./desktop/notarize.sh) file helps automate this process if you already have notarization set up. +- If you have a Linux computer, you can generate a folder with a Linux executable inside (zip before distributing) + +Note that these tools can also be used to generate platform-specific installers, but this functionality is unused in Shattered Pixel Dungeon. \ No newline at end of file diff --git a/docs/getting-started-ios.md b/docs/getting-started-ios.md index 9c3d7cbb0..30dc2b3a8 100644 --- a/docs/getting-started-ios.md +++ b/docs/getting-started-ios.md @@ -1,7 +1,41 @@ -### Prerequisites +(Last Updated December 2022) -The iOS code is substantially more complicated to get working compared to the other platforms. You will need an reasonably modern Apple computer with Android Studio, and Xcode. +## Prerequisites -I will write a more full guide here in the future, but for now a great starting point is: [Deploying your libGDX game to iOS in 2020](https://medium.com/@bschulte19e/deploying-your-libgdx-game-to-ios-in-2020-4ddce8fff26c). Some steps can be skipped as the actual application code is all done for you. Provisioning profiles and Xcode setup are the largest hurdles. +To compile Shattered Pixel Dungeon for iOS using this guide you will need: +- (required) An Apple computer which meets the system requirements for [Android Studio](https://developer.android.com/studio#get-android-studio) and [Xcode](https://developer.apple.com/xcode/) +- (recommended) A GitHub account to fork this repository, if you wish to use version control -Consult the other platform guides for how to get the code onto your machine. Additionally, please contact me if you wish to make a version based on Shattered available on the App Store. \ No newline at end of file +## Installing initial programs + +Download and install the latest version of [Android Studio](https://developer.android.com/studio). This is the development environment which android apps use, it includes all the tools needed to get started with building android apps. + +It is optional, but strongly recommended, to use version control to manage your copy of the Shattered Pixel Dungeon codebase. Version control is software which helps you manage changes to code. To use version control you will need to download and install [Git](https://git-scm.com/downloads). You are welcome to use a separate graphical git client or git CLI if you prefer, but this guide will use Android Studio's built-in git tools. + +## Setting up your copy of the code + +If you are using version control, fork this repository using the 'fork' button at the top-right of this web page, so that you have your own copy of the code on GitHub. + +If you do not wish to use version control, press the green 'code' button on [this repository's main page](https://github.com/00-Evan/shattered-pixel-dungeon), and then 'Download ZIP'. Unzip the downloaded zip to any directory on your computer you like. + +## Opening the code in Android Studio + +Open Android Studio, you will be greeted with a splash page with a few options. + +If you are using version control, you must first tell Android Studio where your installation of Git is located: +- Select 'Configure' then 'Settings' +- From the settings window, select 'Version Control' then 'Git' +- If it wasn't auto-detected, Point 'Path to Git executable:' to 'bin/git.exe', which will be located where you installed git. +- Hit the 'test' button to make sure git works, then press 'Okay' to return to the splash page. + +After that, you will want to select 'check out project from version control' then 'git'. Log in to GitHub through the button (use username instead of tokens), and select your forked repository from the list of URLs. Import to whatever directory on your computer you like. Accept the default options android studio suggests when opening the project. If you would like more information about working with Git and committing changes you make back to version control, [consult this guide](https://code.tutsplus.com/tutorials/working-with-git-in-android-studio--cms-30514) (skip to chapter 4). + +If you are not using version control, select 'Import project (Gradle, Eclipse ADT, etc.)' and select the folder you unzipped the code into. Accept the default options android studio suggests when opening the project. + +# ...Good Luck! + +You have now set up the initial project on your computer. From this point compiling the game for Android or Desktop is simple, but iOS is significantly more complicated. This is due to a mixture of Apple's development process and the RoboVM tool that Shattered uses to cross-compile for iOS. + +I'll be frank, I do not have a set-by-step process down for how to get this working from scratch, good luck! A great starting point is: [Deploying your libGDX game to iOS in 2020](https://medium.com/@bschulte19e/deploying-your-libgdx-game-to-ios-in-2020-4ddce8fff26c). Some steps can be skipped as the actual application code is all done for you. Provisioning profiles and Xcode setup are the largest hurdles. + +Please contact me if you have any specific questions and I may be able to help, or if you wish to make a version based on Shattered available on the App Store. \ No newline at end of file diff --git a/docs/recommended-changes.md b/docs/recommended-changes.md index ac111ccaf..27c6d5616 100644 --- a/docs/recommended-changes.md +++ b/docs/recommended-changes.md @@ -1,22 +1,24 @@ -This guide covers a few technical changes developers will likely want to make when creating their own Pixel Dungeon mod based on Shattered's source code. +(Last Updated December 2022) + +This guide covers a few technical changes developers will likely want to make when creating their own Pixel Dungeon version based on Shattered's source code. ## Application name, version name, and package name There are a number of variables defined in the root [build.gradle](/build.gradle) file that you may want to change: -- `appName` defines the user-visible name of your app. You must change this to whatever you wish to call your mod. -- `appPackageName` defines the internal name of your app. Android and iOS use this name to distinguish your app from others and Desktop uses it and apName to determine the game's save directory. You must change this from its initial value. You should use the format com.. -- `appVersionCode` defines the internal version number of your app. You want to increment this whenever releasing a new version. Read the next section for more details on this one. -- `appVersionName` defines the user-visible version name of your app. Change this to whatever you like, and increment it whenever you release a new version. +- `appName` defines the user-visible name of your app. You must change this to whatever you wish to call your game. +- `appPackageName` defines the internal name of your app. Android and iOS use this name to distinguish your app from others and Desktop uses it and appName to determine the game's save directory. You must change this from its initial value. You should use the format com.. +- `appVersionCode` defines the internal version number of your app. You want to increment this whenever releasing a new update. Read the next section for more details on this one. +- `appVersionName` defines the user-visible version name of your app. Change this to whatever you like, and increment it whenever you release a new update. -The other variables do not need to be changed when setting up your own mod, they are mainly technical configurations that do not need to be adjusted. +The other variables do not need to be changed when setting up your own version of Shattered, they are mainly technical configurations that do not need to be adjusted. -Note that some guides may recommend that you change the package structure (i.e. the folder names) of the application. This used to be required for Pixel Dungeon mods, but is now optional as the `appPackageName` variable can be used instead. +Note that some guides may recommend that you change the package structure (i.e. the folder names) of the application. This used to be required, but is now optional as the `appPackageName` variable can be used instead. ## Application version code Shattered Pixel Dungeon has an internal version code which should be incremented with each release. It is defined with the `appVersionCode` variable in the root [build.gradle](/build.gradle) file. -You may be tempted to set this value back to 1 when starting a new mod, but Shattered has compatibility code for previous versions which may be incorrectly triggered if you decrement the version code. The version code is entirely internal so there is no harm in using the game's current version code as a starting point. +You may be tempted to set this value back to 1, but Shattered has compatibility code for previous versions which may be incorrectly triggered if you decrement the version code. The version code is entirely internal so there is no harm in using Shattered's current version code as a starting point. If you wish to set it to 1 anyway, the various constant variables toward the top of [ShatteredPixelDungeon.java](/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java) are a good starting point for finding all of the cases where the game refers to the version code for compatibility purposes. @@ -30,7 +32,7 @@ For icons, you can find the icons for each platform here: [Android(debug)](/andr ## Credits & Supporter button -If you are making your own mod, you will likely want to add yourself to the credits or change the current supporter link. Feel free to adjust these however you like, the relevant code is in [AboutScene.java](/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java) and [SupporterScene.java](/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SupporterScene.java). If you wish to disable the supporter link, simply comment out the line `add(btnSupport);` in [TitleScene.java](/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java). +You will likely want to add yourself to the credits or change the current supporter link. Feel free to adjust these however you like, the relevant code is in [AboutScene.java](/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java) and [SupporterScene.java](/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SupporterScene.java). If you wish to disable the supporter link, simply comment out the line `add(btnSupport);` in [TitleScene.java](/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java). The game also has a one-time nag window that appears when the player first defeats Goo. If you wish to edit this window, the code is in [WndSupportPrompt.java](/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSupportPrompt.java). If you wish to disable it entirely, the triggering logic is in [SkeletonKey.java](/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/keys/SkeletonKey.java). @@ -40,23 +42,23 @@ Note that due to the GPLv3 license, any edits you make to the credits scene must ## Update Notification -Shattered Pixel Dungeon includes a github-based update notification which likely will not be useful for mod developers unless it is modified. +Shattered Pixel Dungeon includes a github-based update notification which likely will not be useful unless it is modified. To simply disable the notification change `:services:updates:githubUpdates` to `:services:updates:debugUpdates` for the release configurations in the build.gradle files in the [desktop](/desktop/build.gradle) and [android](/android/build.gradle) modules. The debug updates module does nothing by default and so works just fine in release builds. To modify the notification to point to your own github releases, go to [GitHubUpdates.java](/services/updates/githubUpdates/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/GitHubUpdates.java) and change the line: `httpGet.setUrl("https://api.github.com/repos/00-Evan/shattered-pixel-dungeon/releases");` to match your own username and repository name. The github updater looks for a title, body of text followed by three dashes, and the phrase \` internal version number: # \` in your release. -More advanced modders can change the format for releases if they like, or make entirely new update notification services. +More advanced developers can change the format for releases if they like, or make entirely new update notification services. ## News Feed -Shattered Pixel Dungeon includes a news feed which pulls blog posts from [ShatteredPixel.com](http://ShatteredPixel.com). The articles there may not be useful to your mod so you may wish to remove them. +Shattered Pixel Dungeon includes a news feed which pulls blog posts from [ShatteredPixel.com](http://ShatteredPixel.com). The articles there may not be useful to you so you may wish to remove them. To simply disable news entirely, comment out the line `add(btnNews);` in [TitleScene.java](/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java). You can also point the news checker to a different feed by modifing the URLs in [ShatteredNews.java](/services/news/shatteredNews/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/news/ShatteredNews.java). Note that the current logic expects an atom feed and is slightly customized to ShatteredPixel.com, but the logic can be modified to work with other xml feed types. -More advanced modders can also write their own news checker services and use those. +More advanced developers can also write their own news checker services and use those. ## Translations