Skip to content
Ahmed Castro edited this page Aug 20, 2020 · 15 revisions

character.json attributes

Attribute Type Required Default Description
velocity integer 5 Movement velocity
primary_weapon_velocity integer 5 Movement velocity
secondary_weapon_velocity integer 5 Movement velocity
animation_velocity integer 5
hp integer 100 Health, hit points
initial_position initial_position Character position at the beginning
sounds sounds Sound effects
life_bar life_bar Life bar settings
states states[] Sprite list
hitboxes hitbox[] Hitboxes
slow slow Slow mechanics config

initial_position

Attribute Type Required Default Description
x integer 100 Initial position on the x axis
y integer 500 Initial position on the y axis

sounds

Attribute Type Required Default Description
hit file path .ogg sfx to be played when the character is hit

life_bar

Attribute Type Required Default Description
x integer 0 Life bar position on the x axis
y integer 0 Life bar position on the y axis
width integer 0 Width of the life bar
height integer 0 Height of the life bar
color color Color of the life bar

color

Attribute Type Required Default Description
red integer 0 Amount of red color from 0 to 255
green integer 0 Amount of green color from 0 to 255
blue integer 0 Amount of blue color from 0 to 255
alpha integer 255 Amount of alpha from 0 to 255

state

Attribute Type Required Default Description
name string Name of the state
sprites sprite[] .png path array

sprite

Attribute Type Required Default Description
path path .png file path

hitbox

Attribute Type Required Default Description
x integer Hitbox position on the x axis
y integer Hitbox position on the y axis
width integer Hitbox width
height integer Hitbox height
angle integer 0 Hitbox rotation

slow

Attribute Type Required Default Description
max integer Maximum amount of slow points
decrement integer Decrement velocity of slow points when activated
increment integer Increment velocity of slow when not activated
cooldown_increment integer After slow depletes, it get into cooldown state cooldown_increment sets the velocity of increment during this state.
bar slow_bar Slow bar settings

slow_bar

Attribute Type Required Default Description
x integer X position
y integer Y position
active_color color Slow bar color when active
cooldown_color color Slow bar color during cooldown
rectangle rectangle Slow bar position and size

rectangle

Attribute Type Required Default Description
x integer X position
y integer Y position
width integer Width size
height integer Height size

bullets.json attributes

Attribute Type Required Default Description
name string Bullet unique name identifier
damage integer 1 Bullet attack damage to be inflicted on impact
sound sound Sound to be played when emited
sprites sprite[] Sprite list
on_hit_sprites sprite[] Sprite list to be displayed on bullet collision
hitboxes hitbox[] Hitbox list

sprite

Attribute Type Required Default Description
path path Path to the .png image

sound

Attribute Type Required Default Description
sound_channel integer -1 Sound channel, -1 means auto assign
path file path .ogg sound effect file

hitbox

Attribute Type Required Default Description
x integer Hitbox position on the x axis
y integer Hitbox position on the y axis
width integer Hitbox width
height integer Hitbox height
angle integer 0 Hitbox rotation

attacks.json attributes

Attribute Type Required Default Description
attacks attacks[] A collection of attack patterns form an attack type

type

Attribute Type Required Default Description
name string Pattern collection unique name
patterns pattern[] Single bullet pattern
repeat repeat[] Group of patterns to be repeated an amount of times

pattern

Attribute Type Required Default Description
bullet string Bullet identifier
acceleration integer 0 Change of velocity added every frame
a_frequency integer 0 Frequency that the acceleration is applied
additional_player_hp_change double 0 Player's hit points through time, use this to apply poison or heal buffs
additional_player_velocity_x integer 0 Player's velocity change, use this to pull or push him or to in conjuction with to additional_player_velocity_y to reduce the general velocity
additional_player_velocity_y integer 0 Player's velocity change, use this to push him up or down or to in conjuction with to additional_player_velocity_x to reduce the general velocity
aim_player yes/no no Makes the bullet angle point to the player
aim_player_on_begin yes/no no Makes the bullet angle point to the player position when the bullet was created
angle integer 0 Rotation
angle_change integer 0 Rotation change through time
ac_frequency integer 0 Angle change frequency
animation_velocity integer 0 Sprite animation speed
auto_scale double 0 Bullet scale change through time
bullet_rotation integer 0 Rotates the bullet sprites withouth affecting other attributes such as the angle or hitboxes
br_change integer 0 Bullet rotation change through time
collides_bullets yes/no no If the bullet collides with an opponent's one, both would be destroyed
collides_opponent yes/no yes The bullet is able to hit the opponent
cooldown integer 0 Amount of frames between each bullet emision
duration integer -1 Amount of frames before the bullet gets destroyed, -1 is infinite
freeze yes/no no All bullet changes, such as velocity, acceleration or angle_chage are stopped
homming yes/no no Bullet will track the player
independent_br yes/no no The bullet_rotation is independent from the angle
max_velocity yes/no 9999999 Velocity cap
offset_x integer 0 Pixels offset relative to the character on the x axis on emision
offset_y integer 0 Pixels offset relative to the character on the y axis on emision
random_angle integer 0 Adds a random angle from 0 to the provided number
startup integer 0 Amount of frames before emiting the bullet for the first time
stop_ac_at integer -1 Amount of frames before stopping the angle_change, -1 means never
undestructable yes/no no The bullet can be destroyed by other bullets
velocity integer 0 Speed
modifier modifier[] Modifies a pattern in a specific frame

modifier

Attribute Type Required Default Description
at integer Modifier's frame of execution
attribute attribute's type Attribute to be changed, e.g. {at: "10", velocity: "3", homming: "true"}

repeat

Attribute Type Required Default Description
amount integer Amount of times that the patterns will be repeated
attribute attribute's type Attribute to be changed, e.g. in {amount: "5", startup: "5", patterns:[..]} patterns will be repeated 3 times, in each repetition 5 frames will be added (first will be emited on frame 0, 2nd in frame 5 and third in 10)
patterns pattern[] Single bullet pattern to be changed during repetition

modifiers.json attributes

Attribute Type Required Default Description
modifiers modifier[] Bullet identifier

modifier

Attribute Type Required Default Description
at integer Modifier's frame of execution
life_at integer Defines the amount of hit points needed to be reached to execute the modifier
velocity integer New enemy velocity to be set
angle_change integer New enemy angle change to be set
pattern_type integer New enemy pattern to be set

stage.json

Attribute Type Required Default Description
bullets_domain bullets_domain Bullet bounds, bullets outside this range will be automatically distroyed
back_layers layer[] Animated layers to be displayed behind of characters and bullets
front_layer layer[] Animated layers to be displayed on front of characters and bullets

bullets_domain

Attribute Type Required Default Description
x integer 0 Position of the bullets domain on the x axis
y integer 0 Position of the bullets domain on the y axis
width integer screen width Bullets domain width
height integer screen height Bullets domain height

layer

Attribute Type Required Default Description
x integer 0 Initial position on the x axis
y integer 0 Initial position on the y axis
separation_x integer 0 Amount of pixels between every animation repetition
velocity_x double 0 Layer velocity on the x axis, use this to make parallax effect
animation_velocity integer 5 Animation speed
sprites sprite[] Animation sprites

sprite

Attribute Type Required Default Description
type image Type of frame
path path Path to the .png image

config.json attributes

Attribute Type Required Description
chars char[] Playable character
stages stage[] Playable character
resolution resolution Screen resolution, in pixels
screen_size screen_size Screen size, in pixels
fullscreen fullscreen Fullscreen settings
inputs inputs Input settings
font font Fullscreen settings
notifications notifications Notification settings

char

Attribute Type Required Description
name string Character name, must match the directory under assets/chars/

stage

Attribute Type Required Description
name string Stage name, must match the directory under assets/stages/

resolution

Attribute Type Required Description
x integer Resolution width
y integer Resolution height

screen_size

Attribute Type Required Description
x integer Screen width
y integer Screen height

fullscreen

Attribute Type Required Description
enabled yes/no Defines whether the game will go fullscreen or not

font

Attribute Type Required Description
path file path Path to the .ttf file
red integer Amount of red color from 0 to 255
green integer Amount of green color from 0 to 255
blue integer Amount of blue color from 0 to 255
size integer Font size

notifications

Attribute Type Required Description
background_path file path Path to the notification box .png background

inputs

Attribute Type Required Description
player[] player Array of player's button configuration

player

Attribute Type Required Description
number integer Player number from 0 onwards...
type[] type Array of types of inputs (gamepad or keyboard)

type

Attribute Type Required Description
name keyboard/gamepad Type of input configuration
button[] button Button key-name mapping

button

Attribute Type Required Description
name string Name of the button to be used on your game
key string Key associated to the name

XML Legend

  • Bold represents the Tags.
  • Italic represents the attributes.
  • [allows multiple] : The engine recognizes multiple sibling tags declarations.
  • [integer] : The attribute is a numeric integer value. (examples: "128", "24", "53")
  • [string] : The attribute is a text string value. (example: "Basic bullet", "misc/winner/1.png", "Chuy")
  • [yes/no] : The attribute is a boolean "yes" or "no" vaule. (example: "yes", "no").
  • [mandatory] : The attribute is mandatory and has to be defined.
  • [default=X] : If the attribute is not defined, it will take the X value as default.
Clone this wiki locally