Edit the code !
Posted: Sun Jan 26, 2014 11:10 pm
Edit the code !
In this section, I will not teach you Java, but give you tips that will make your journey in the Andor's Trail code a bit easier.
Make AT run with test data
I said earlier that starting the game in an emulator takes ages to load. However, the dev team has included a test mode in AT, that loads a single minimal map, with very little data. Whether you want to test a map, a quest, or any piece of code, you should start with this setup first.
To activate this mode, open the AndorsTrailApplication class under src/com.gpl.rpg.AndorsTrail, find the line:
and change it to:
There are five other booleans under this one, and you can experiment with them, as they activate various debugging features.
There's red everywhere and I cannot start the game.
Sometimes, eclipse has issues loading the android SDK correctly. This is characterized by the following message:
I think it's one of the reasons Google started creating android studio...
To solve this, I close and restart eclipse... sometimes twice or more.
You can also try using the menu "Project", then "Clean..." to clean up your project before restarting eclipse...
Upgrade to the latest version
If you used my repository, or the one on google code, do a right-click on the project's root folder -> "Team" -> "Fetch from upstream".
If you created your own fork on GitHub, you need to configure my repository as your "upstream" remote site (while yours is "origin"), and use the "Team"->"Fetch from..." menu to fetch from "upstream" and not "origin".
Submit a patch for inclusion in the game
Once happy with what you created, you may want to offer it for inclusion in the official game.
The workflow is the following:
The rest is up to you...
This section will be augmented with the answers to the frequent questions that show up.
In this section, I will not teach you Java, but give you tips that will make your journey in the Andor's Trail code a bit easier.
Make AT run with test data
I said earlier that starting the game in an emulator takes ages to load. However, the dev team has included a test mode in AT, that loads a single minimal map, with very little data. Whether you want to test a map, a quest, or any piece of code, you should start with this setup first.
To activate this mode, open the AndorsTrailApplication class under src/com.gpl.rpg.AndorsTrail, find the line:
Code: Select all
public static final boolean DEVELOPMENT_DEBUGRESOURCES = false;
Code: Select all
public static final boolean DEVELOPMENT_DEBUGRESOURCES = true;
There's red everywhere and I cannot start the game.
Sometimes, eclipse has issues loading the android SDK correctly. This is characterized by the following message:
Code: Select all
The project was not built since its build path is incomplete. Cannot find the class file for android.content.Context. Fix the build path then try building this project
To solve this, I close and restart eclipse... sometimes twice or more.
You can also try using the menu "Project", then "Clean..." to clean up your project before restarting eclipse...
Upgrade to the latest version
If you used my repository, or the one on google code, do a right-click on the project's root folder -> "Team" -> "Fetch from upstream".
If you created your own fork on GitHub, you need to configure my repository as your "upstream" remote site (while yours is "origin"), and use the "Team"->"Fetch from..." menu to fetch from "upstream" and not "origin".
Submit a patch for inclusion in the game
Once happy with what you created, you may want to offer it for inclusion in the official game.
The workflow is the following:
- Commit your work in Git. Make sure to know which branch your are working in.
- Push your commits to your github fork (Eclipse calls that push to upstream, while it's actually a push to origin/<branch_name> in Git terms).
- Log on github, select your branch, and open a pull-request.
- Any new commits you push to this branch will automatically update the pull-request, so if you implement a change after my comments (or others), you don't need to close your pull-request and open a new one.
The rest is up to you...
This section will be augmented with the answers to the frequent questions that show up.