HaxeFlixel RPG: Source code

posted on Oct 29, 2014 in Haxe, OpenFL, Game design, HaxeFlixel, Full source code
HaxeFlixel RPG source code

Over the past 20 days I've been writing a tutorial series on creating a 2D RPG using Haxe, OpenFL and HaxeFlixel framework.

This is the final post, which contains links to the full source code and assets, as well as links to separate tutorial parts.

After following all the tutorial parts you will end up with a fully functional and extensible RPG.

This aim of this tutorial series was to acquaint you with the basics of the HaxeFlixel framework.

Let's take a look at the list of features that our game now has:

  1. Character is moved by clicking on the tilemap (via pathfinding).
  2. Camera can be moved around using the arrow keys or WASD.
  3. Enemies with wandering and chasing AI.
  4. Collectible health potions, which emit particles when picked up.
  5. Turn based combat.
  6. Experience and leveling.
  7. Health and damage depend on the player's level.
  8. Sounds effects.
  9. Ability to save and load the game locally.

All of the source code and assets can now be found at the GitHub repository.

If you want to follow the step-by-step guide on creating this game from scratch, check out the links below.

You'll firstly need to install HaxeFlixel. The whole process is described in this tutorial.

The tutorial series consists of 20 parts. Here they are:

  1. Project creation, menu screen, state switching.
  2. Displaying a tilemap.
  3. Camera and its movement.
  4. Movement marker placement.
  5. Character's movement using pathfinding.
  6. Character's sprite animation.
  7. Basic UI overlay.
  8. Health potions, collision.
  9. Advanced HUD: health, level and experience bar.
  10. Enemies and wandering AI.
  11. Enemies' chasing AI.
  12. Combat state machine.
  13. Turn based combat window.
  14. Combat improvements, experience rewards.
  15. Tween animations for the combat window.
  16. Sound effects.
  17. Saving the game.
  18. Advanced saving system.
  19. Particle emitters.
  20. Optimization.

Enjoy!

20578