Jump to content

  • Log In with Google      Sign In   
  • Create Account






Not Dead - Just Quiet

Posted by Net Gnome, 25 April 2013 · 1,178 views

Vaerydian JSON
Well, first off, Vaerydian is still alive. I've done quite a bit with it since I last posted. I probably cant remember everything i've done since i posted last, but most of it has been placing systems or structures in place to make development down-the-road more streamlined, and much of that evolved around establishing paths to create and drive aspects of Vaerydian from data, especially human readable data.

With data driven frameworks a main goal, i needed something that was fast and simple to create, so I looked around and found an open source project called fastJSON. Its probably one of the fastest JSON tools i've found, and its fairly simple to use. I even built a few utilities around it to make it even more user friendly. so i can do things like:
  • string json = JsonManager.load("actions.json") etc.
  • JsonObject jo = JsonManager.jsonToJsonObject(json);
  • EnumerableType myEnum = jo["first level","second level", ... , "nth level"].toEnum<EnumerableType>();
All sorts of fun things that make it very simple to use, but that is only part of the story.

The real meat comes down to actually implementing useful data structures and using the json to drive them.

Here is a blurb from my "actions.v" and "damage.v" json files. The object of these is to allow me and any future players to create new fun things through definitions in these files and the game will use them.

action.v outtake:
{
  "name":"RANGED_DMG",
  "action_type":"DAMAGE",
  "impact_type":"DIRECT",
  "damage_def":"RANGED_DMG",
  "modify_type":"NONE",
  "modify_duration":"NONE",
  "creation_type":"NONE",
  "destroy_type":"NONE"
}

damage.v outtake:
{
  "name":"RANGED_DMG",
  "damage_type":"PIERCING",
  "damage_basis":"WEAPON",
  "min":0,
  "max":0,
  "skill_name":"RANGED",
  "stat_type":"FOCUS"		
}

They're fairly straight forward, but i can also do other cool things like store all my skeletal-bone information too Posted Image

outtake from animation.v
"character_defs":[
  {
    "name": "BAT",
    "skeletons": [
      "BAT_NORMAL"
    ],
    "current_skeleton":"BAT_NORMAL",
    "current_animation":"FLY"
},

...

{
  "name": "BAT_NORMAL",
  "bones":[
    {
    "name": "BAT_HEAD_NORMAL",
    "texture":"characters\\bat_head",
    "origin_x":12,
    "origin_y":12,
    "rotation":0.0,
    "rotation_x":4,
    "rotation_y":4,
    "time":500,
    "animations":[
      {
        "name": "FLY",
	"animation_def":"BAT_HEAD_NORMAL_FLY"
      }
  ]
},

...

{
"animation_defs":[
  {
    "name": "BAT_HEAD_NORMAL_FLY"
    "key_frames":[
      {"percent":0.0, "x": 0.0,"y":0.0,"rotation":0.0},
      {"percent":1.0, "x": 0.0,"y":0.0,"rotation":0.0}
    ]
},
Yes, it gets a bit verbose, but it works. I've done similar things for map definitions and terrain definitions (not yet utilized as i'm still pondering exactly how i want it to work)

Other things i've created is a Dungeon map generator which builds many many many interconnected rooms Posted Image its not populated with anything beyond the rooms yet, but its playable. I've also incorporated my 2D simple skeletal animation giving me easier animation capabilities. (you can see early experiments here). Things are simple at the moment, but i don't have to worry about my pixel art skills as much now Posted Image Additionally, I've made improvements to the enemy AI to prevent them from getting routed by the player into corners, it incorporates not only my Behavior Tree capability, but also my Agent Component Bus (ACB) capability to recognize situations. the ACB turned out quite well and is very very fast (see the TCycles/frame in the video below).

Anyway, here is how things are shaping up:

Note: Alot of it is horrible programmer art, so its going to look and sound bad ;)


[edits: fixed some errors, made the json examples a bit more clear]




I just love sound effects.
Its just hilarious to me :D!

heh, thx!

 

the bats still use the current player hit/attack sounds, which i plan to remedy at some point, they just are not high priority atm. I'll likely add some entries in a character.json file down the road to handle those situations. This will also allow players an easy way to customize things to their liking :)

August 2014 »

S M T W T F S
     12
3456789
10111213141516
17181920212223
2425262728 29 30
31      

Recent Comments

PARTNERS