Action RPG Framework

by Forum_account
Action RPG Framework
A framework for developing action RPGs.
ID:767578
 
The Action RPG Framework is a library that provides functions specific to action RPGs. It handles things like:
  • Combat and dealing damage
  • Health, mana, money, and experience
  • Graphical effects and sound effects
  • Enemy AI
  • Managing passive, temporary, or periodic effects
  • On-screen displays (health meter, inventory, etc.)
  • Special abilities with mana costs and cooldowns
  • Picking up items and equipping them
  • Targeting enemies
  • Projectiles
  • Sound effects and music
  • Saving and loading
  • Character creation and selection
  • Quests
  • Enabling/Disabling PvP
  • Forming parties and inviting players
  • On-screen display of party members
  • Medals
  • Banking
The library provides the underlying features you need to create an action RPG. It also comes with a sample game that shows how to implement some basic features.

It's hard to determine where to draw the line between the library and a game that uses the library. For example, the framework only defines the player's health and mana stats. There are no stats like strength or agility - there's no way for the framework to know what stats you'll need. All additional stats must be defined in the project that uses the framework.
The framework comes with a playable demo that shows how to define content (items, enemies, etc.) for the framework and how to extend some things (change how combat works, add stats, add some visual effects, etc.).

Currently, the big things that the framework provides are the on-screen interface elements, inventory management, and the combat/damage system. There's also a lot of stuff the framework provides that just hasn't been worked into the demo yet.
demo\npcs.dm:26:error: moved_to: undefined proc

Am I missing a resource or what?
You need the latest version of the Pixel Movement library.
Congrats on this. If this is promoted right, I think more people will be attracted to BYOND.
In response to FIREking
FIREking wrote:
Congrats on this. If this is promoted right, I think more people will be attracted to BYOND.

I hope so! If nothing else, I hope it ups the bar for other BYOND games. Most developers either make games with terrible interfaces or spend all of their time on the interface and neglect the game that goes with it. Even if people don't use the framework, because of the features it provides people will feel compelled to add those features to their games - it'd look bad for someone's game if a freely available sample game has a better interface, control scheme, and smoother graphics =)

As always I'm open to suggestions. If there's something you'd like to see added to the framework or sample game, just let me know. Here's what I'm working on:

1. Overlays (infrastructure is there, I just need to draw the overlays)
2. On-screen shopkeeper (done)
3. Sample crafting system (infrastructure is there, I just need to make an interface for it)
4. Sound effects and music (almost done)
5. Convenient events and notifications (procs that do nothing, but exist so you can override them as needed in your game - like a proc that's called when you deal damage) (mostly done)
I think some of the boring stuff could be a tiny tiny bit better. The interface (talking window controls) are slightly messed up. At my current screen resolution, maximizing the game doesn't necessarily make a perfect scale resize for the map control. If you don't want to throw anyone off, I'd handle that some how. When I came back to byond, I tried out about 20 different games and stopped playing each one when I'd see something like a really bad map control size (hurts my eyes gahhh!) or just tons and tons of labels / input controls / interface hell all over my screen or just goofy things (like giant buttons the size of the view port). Also, the window could be centered upon opening.

Maybe a targeting system, and in your demo include a third ability to display how it could work. Currently if you want to run away from a slime yet still fire at it, you have to move then turn around, fire, turn around move, turn around fire. That might even be cool as a mechanic, but what if users of the library want to select a target and then cast spells at it? Perhaps you already have the logic to do that within the framework but I didn't see it in the demo so I figured I'd mention it.

There's no chat at the moment, did you intend for this to be single player only?
Just downloaded most recent version, map is nothing but grass for me but looks like original in dream maker? WTF?
I think some of the boring stuff could be a tiny tiny bit better. The interface (talking window controls) are slightly messed up.

I wasn't too concerned with the interface because it's part of the sample game. If you use the framework to make a game, I expect you'd provide your own .dmf file. I can make the window not resizeable so you don't get black bars around the map control, if you think that'd be better.

Maybe a targeting system, and in your demo include a third ability to display how it could work. Currently if you want to run away from a slime yet still fire at it, you have to move then turn around, fire, turn around move, turn around fire. That might even be cool as a mechanic, but what if users of the library want to select a target and then cast spells at it? Perhaps you already have the logic to do that within the framework but I didn't see it in the demo so I figured I'd mention it.

That should be easy enough. It'll also help for some other changes I wanted to make.

There's no chat at the moment, did you intend for this to be single player only?

No, I just hadn't thought about chat. I'm not sure how much of that will be handled by the framework and how much would be handled by the game, but I'm sure there's something I could add. I do plan for it to work with multiple players.
In response to FIREking
FIREking wrote:
Just downloaded most recent version, map is nothing but grass for me but looks like original in dream maker? WTF?

When you compile, look at the compiler's output and make sure only one map file is included. It sounds like there's a mep included in one of the libraries it uses.
These errors popup to me.


C:\Users\Dovydas\Documents\BYOND\lib\forum_account\hudgroups \hud-groups.dm:305:error: maptext_width: undefined var
C:\Users\Dovydas\Documents\BYOND\lib\forum_account\hudgroups \hud-groups.dm:306:error: maptext_height: undefined var
effects-visual.dm:96:error: o.maptext_width: undefined var
effects-visual.dm:97:error: o.maptext: undefined var
effects-visual.dm:103:error: o1.maptext: undefined var
effects-visual.dm:104:error: o1.maptext_width: undefined var
effects-visual.dm:109:error: o2.maptext: undefined var
effects-visual.dm:110:error: o2.maptext_width: undefined var
effects-visual.dm:115:error: o3.maptext: undefined var
effects-visual.dm:116:error: o3.maptext_width: undefined var
effects-visual.dm:121:error: o4.maptext: undefined var
effects-visual.dm:122:error: o4.maptext_width: undefined var
C:\Users\Dovydas\Documents\BYOND\lib\forum_account\hudgroups \hud-groups.dm:413:error: src.maptext: undefined var
C:\Users\Dovydas\Documents\BYOND\lib\forum_account\hudgroups \hud-groups.dm:414:error: src.maptext_width: undefined var
C:\Users\Dovydas\Documents\BYOND\lib\forum_account\hudgroups \hud-groups.dm:415:error: src.maptext_height: undefined var
hud-info.dm:36:error: title.maptext: undefined var
hud-info.dm:37:error: money.maptext: undefined var
hud-info.dm:38:error: experience.maptext: undefined var
hud-inventory.dm:111:error: item_description.maptext: undefined var
hud-inventory.dm:113:error: item_description.maptext: undefined var
hud-loot-window.dm:54:error: caption.maptext: undefined var
hud-loot-window.dm:59:error: caption.maptext: undefined var
hud-loot-window.dm:81:error: caption.maptext: undefined var
hud-loot-window.dm:46:warning: caption: variable defined but not used
hud-loot-window.dm:71:warning: caption: variable defined but not used
In response to Dj dovis
Dj dovis wrote:
These errors popup to me.


C:\Users\Dovydas\Documents\BYOND\lib\forum_account\hudgroups \hud-groups.dm:305:error: maptext_width: undefined var
C:\Users\Dovydas\Documents\BYOND\lib\forum_account\hudgroups \hud-groups.dm:306:error: maptext_height: undefined var
effects-visual.dm:96:error: o.maptext_width: undefined var
effects-visual.dm:97:error: o.maptext: undefined var
effects-visual.dm:103:error: o1.maptext: undefined var
effects-visual.dm:104:error: o1.maptext_width: undefined var
effects-visual.dm:109:error: o2.maptext: undefined var
effects-visual.dm:110:error: o2.maptext_width: undefined var
effects-visual.dm:115:error: o3.maptext: undefined var
effects-visual.dm:116:error: o3.maptext_width: undefined var
effects-visual.dm:121:error: o4.maptext: undefined var
effects-visual.dm:122:error: o4.maptext_width: undefined var
C:\Users\Dovydas\Documents\BYOND\lib\forum_account\hudgroups \hud-groups.dm:413:error: src.maptext: undefined var
C:\Users\Dovydas\Documents\BYOND\lib\forum_account\hudgroups \hud-groups.dm:414:error: src.maptext_width: undefined var
C:\Users\Dovydas\Documents\BYOND\lib\forum_account\hudgroups \hud-groups.dm:415:error: src.maptext_height: undefined var
hud-info.dm:36:error: title.maptext: undefined var
hud-info.dm:37:error: money.maptext: undefined var
hud-info.dm:38:error: experience.maptext: undefined var
hud-inventory.dm:111:error: item_description.maptext: undefined var
hud-inventory.dm:113:error: item_description.maptext: undefined var
hud-loot-window.dm:54:error: caption.maptext: undefined var
hud-loot-window.dm:59:error: caption.maptext: undefined var
hud-loot-window.dm:81:error: caption.maptext: undefined var
hud-loot-window.dm:46:warning: caption: variable defined but not used
hud-loot-window.dm:71:warning: caption: variable defined but not used


You need to compile with more recent version of DM.
ok will get the newest version now
will this library work with an isometric rpg?
In response to Kalster
Kalster wrote:
will this library work with an isometric rpg?

Absolutely. The graphics for the sample game aren't isometric, but it'd work.
loading action-rpg-framework.dme
loading demo\interface.dmf
loading demo\interface.dmf
player-interaction.dm:37:error: interact: duplicate definition
C:\Documents and Settings\kal\My Documents\BYOND\lib\forum_account\actionrpgframework\player-interaction.dm:37:error: interact: previous definition
combat.dm:84:error: took_damage: duplicate definition
C:\Documents and Settings\kal\My Documents\BYOND\lib\forum_account\actionrpgframework\combat.dm:84:error: took_damage: previous definition
combat.dm:86:error: dealt_damage: duplicate definition
C:\Documents and Settings\kal\My Documents\BYOND\lib\forum_account\actionrpgframework\combat.dm:86:error: dealt_damage: previous definition
combat.dm:134:error: respawned: duplicate definition
C:\Documents and Settings\kal\My Documents\BYOND\lib\forum_account\actionrpgframework\combat.dm:134:error: respawned: previous definition
enemy-ai.dm:100:error: ai: duplicate definition
C:\Documents and Settings\kal\My Documents\BYOND\lib\forum_account\actionrpgframework\enemy-ai.dm:100:error: ai: previous definition
player-inventory.dm:17:error: has_item: duplicate definition
C:\Documents and Settings\kal\My Documents\BYOND\lib\forum_account\actionrpgframework\player-inventory.dm:17:error: has_item: previous definition
player-inventory.dm:171:error: got_item: duplicate definition
C:\Documents and Settings\kal\My Documents\BYOND\lib\forum_account\actionrpgframework\player-inventory.dm:171:error: got_item: previous definition
player-inventory.dm:173:error: dropped_item: duplicate definition
C:\Documents and Settings\kal\My Documents\BYOND\lib\forum_account\actionrpgframework\player-inventory.dm:173:error: dropped_item: previous definition
C:\Documents and Settings\kal\My Documents\BYOND\lib\forum_account\actionrpgframework\combat.dm:14:error: dead: duplicate definition
combat.dm:14:error: dead: previous definition
C:\Documents and Settings\kal\My Documents\BYOND\lib\forum_account\actionrpgframework\combat.dm:15:error: invulnerable: duplicate definition
combat.dm:15:error: invulnerable: previous definition
C:\Documents and Settings\kal\My Documents\BYOND\lib\forum_account\actionrpgframework\combat.dm:17:error: health: duplicate definition
combat.dm:17:error: health: previous definition
C:\Documents and Settings\kal\My Documents\BYOND\lib\forum_account\actionrpgframework\combat.dm:18:error: max_health: duplicate definition

---------------------------------------------
action-rpg-framework.dmb - 428 errors, 0 warnings (max count reached) (double-click on an error to jump to it)


i am getting 428 errors. too many to list. i have installed version 494.1135_byond

i am trying to compile the sample game with everything checked, including the lib
*sigh*
i fixed the errors. i compiled from the zip files when i should have compiled from the lib dir
I just posted an update with a lot of changes. I also posted updates to the Pixel Movement and Overlays library, which are both required by the update to the framework. I changed some file names but BYOND won't delete the old files for you - it just overwrites files when it unzips the library. You might want to delete the copy of the framework you have before downloading the new version.

Here is the full list of changes:
  • Replaced the label() proc with the hud_label() and map_label() procs. These do almost the same thing but map_label uses pixel_z to offset the outline and hud_label() uses pixel_y.
  • Made projectiles pass through dense mobs if they cannot hit the mob.
  • Fixed a runtime error with the looting window that would occur if you pressed the space bar with no item selected.
  • Added support for equipment-based overlays. Call the mob's equipment() proc to create an overlay that will match their movement state (standing, moving, jumping, dead, etc.).
  • Added a dependency on the Forum_account.Overlays library. This is used to create the equipment overlays and to create the target marker (the circle under the mob you're targeting).
  • Added hud-shopkeeper.dm which defines the on-screen shopkeeper interface. There is an example of how to create a shopkeeper in demo\npcs.dm.
  • Added events.dm which contains procs that are called when certain events happen. Many of the procs do nothing or just output a notification to the player. These procs exist so you can override them to easily create or modify these events and notifications.
  • Added targeting. You can now press tab to cycle through nearby targets. When you attack, the melee_target() proc will return your targeted mob if they are within your melee range, otherwise it'll return the first mob within melee range. See player-targeting.dm for more details.
  • Changed how the all_melee_targets() proc works. It used to return a list of all targetable mobs in front of the player, now it uses obounds() so the direction you're facing doesn't matter. If you want to attack a mob in front, press tab until it is selected as your target.
  • Added a description var to the /Ability object and made the on-screen ability menu display descriptions of each ability.
  • Renamed some files: hud.dmi is now framework-hud.dmi and effects.dmi is now framework-effects.dmi.
  • Made the ability bar no longer add the "ability-button-" prefix to icon states automatically. Now the Ability object's icon_state is used the way it is.
  • When you press the 1-6 keys while the ability bar is active (after you've pressed A) the cursor will jump to that slot and open the ability menu.
  • Added the mob.line_of_sight() proc which takes an atom as a parameter and determines of the mob has line of sight to that atom. There's also the mob.los() proc which just calls line_of_sight().
  • Added the ShootArrow ability to the demo which uses the new line of sight proc and targeting feature.
  • Gave the /item type a constructor which can take a location, location and quantity, or just a quantity.
  • Added a crafting ability to the demo. This also required some additional helper procs. Some events were added to events.dm. I also added player-procs.dm which contains, for now, just the is_near proc.
  • Fixed a bug in the mob's get_quantity() proc.
  • Added the ability.icon var which is used to display the ability icons on the ability bar. By default it is set to the HUD_ICON constant, but you can change it so you can put your game-specific ability icons in an icon file inside your project.
If a hud container is empty, allow space button to close container. Also, the arrow shooting doesn't show anything visually. And the wandering NPC is hard to catch with the space button sometimes. Maybe you could have the hit box / radius be larger than he actually is.

May I suggest switching the inventory key to E with WASD movement, and make the ability key Q.
Page: 1 2 3 4 5