-
Notifications
You must be signed in to change notification settings - Fork 39
Home
Welcome to the Golden Sun HTML5 wiki!
Under construction! Things here may change!
Check the README section to see general info about the project.
The project has basically two important folders: assets
and base
. All the source code is located inside base
folder. All the game assets (images, database files, sounds, etc) are located inside assets
folder. An engine user will only modify the assets
folder. Any modification in assets
folder files will automatically be reflected in the game.
In order to bootstrap the game, GSHTML5 uses the Phaser methods that control the game state.
GoldenSun.ts is the starting point to understand how the code works. It's the engine's main class. When the game starts, it will load database files in assets/dbs folder in order to instantiate the main classes of the game like Hero, Collision, Map, MainMenu, Audio, CursorManager etc.
For API reference, check the docs.
General class overview in game:
Here is an overview of the engine (open the image in a new tab):
- Have some knowledge of JavaScript or TypeScript.
- Understand minimally how Phaser 2 works.
- Played at least one time the original Golden Sun games.
- Regarding the engine, you can check the docs or ask me anything in order to make your understanding faster.
- Download nodejs here
- Install it using the default configurations (if not already checked, add node.js to the system path).
- Download git here
- Install it using the default configurations (if not already checked, add git to the system path).
- Create an empty folder to store the project.
- Open your terminal and navigate to this folder:
- cd
your/path/to/gshtml5
- In the terminal, type:
git clone https://github.com/jjppof/goldensun_html5.git .
(please note the dot in the end). - In the terminal, type:
npm install
- In the terminal, type:
npm start
- The browser should open. Please wait.
- Now change anything you want in the
assets
folder or change the code in thebase
folder.
- I strongly recommend using Visual Studio Code to develop.
- Use
npm run format
to format your code before your last commit when opening a PR. - I use camel case to define types. For all the other names I use snake case.
- Avoid as much as possible using literals. Whenever you have internal states, please create an
enum
for holding them. - Now the engine supports TS, so make sure you type variables as much as you can.
- Whenever creating a new class, is not a problem to pass
game: Phaser.Game
and/ordata: GoldenSun
to it in order to have easier access to game data and functionalities. - I don't have any branching or commit comments guidelines.
- I really enjoy being verbose when giving names to variables. Please avoid using abbreviations.
- Please avoid using third-party packages with few stars in github.
- Home
- Introduction for developers
- Tutorials
- Game initialization settings
- Map settings
-
Game Events
- Add item to party event
- Audio play event
- Battle event
- Branch event
- Camera fade event
- Camera follow event
- Camera move event
- Camera shake event
- Casting aura event
- Change collision layer event
- Char animation play event
- Char blend mode event
- Char exp event
- Char fall event
- Char hue event
- Char item manipulation event
- Char level change event
- Char rotation event
- Char shadow visibility event
- Char tween position event
- Chest event
- Colorize char event
- Colorize map event
- Control bgm event
- Create storage var event
- Custom collision body event
- Destroyer event
- Dialog event
- Djinn get event
- Djinn set status event
- Emoticon event
- Event activation event
- Event caller event
- Event holder event
- Event loop event
- Exit Sand mode event
- Face direction event
- Flame char event
- Generic sprite event
- Grant ability event
- IO anim play event
- IO tween position event
- Item checks event
- Jump event
- Layer tween event
- Layer visibility event
- Look event
- Main chars join split event
- Map blend mode event
- Map opacity event
- Move event
- Outline char event
- Particles event
- Party join event
- Permanent status event
- Psynergy stone event
- Set char activation event
- Set char collision event
- Set char visibility event
- Set IO activation event
- Set IO collision event
- Set IO visibility event
- Set NPC collision event
- Set party coins event
- Set value event
- Storage change event
- Summon event
- Teleport event
- Tile event manage event
- Timer event
- Tint char event
- Databases
- Code reference