We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a big vague issue, I'm just collecting/publishing ideas here.
There a lot of options. The main ones include:
The scope for the scripting language is very important, some potential ideas:
For each fighter there is a fighter.lua file containing the following functions:
spawn(usize player); action(usize player, usize action, usize frame); hitbox_collide(usize player, usize action, usize frame, int collision_flags); hurtbox_collide(usize player, usize action, usize frame, int collision_flags);
The functions are called by pf sandbox when each event occurs. They have access to an api:
set_acc_player(usize player, float x, float y); get_acc_player(usize player, float x, float y); set_vel_player(usize player, float x, float y); get_vel_player(usize player, float x, float y); set_pos_player(usize player, float x, float y); get_pos_player(usize player, float x, float y); set_action(usize player, usize action); generate_entity(String name, float x, float y); random(int max); // seeded determined at start of game + frame_index // high and low level input e.g. can_jump and press_x
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is a big vague issue, I'm just collecting/publishing ideas here.
Needed for
Language choice
There a lot of options. The main ones include:
Rlua
Hlua
Rhai
Dyon
Gluon
Roll our own
Scope
The scope for the scripting language is very important, some potential ideas:
Example Lua API
For each fighter there is a fighter.lua file containing the following functions:
spawn(usize player);
action(usize player, usize action, usize frame);
hitbox_collide(usize player, usize action, usize frame, int collision_flags);
hurtbox_collide(usize player, usize action, usize frame, int collision_flags);
The functions are called by pf sandbox when each event occurs.
They have access to an api:
set_acc_player(usize player, float x, float y);
get_acc_player(usize player, float x, float y);
set_vel_player(usize player, float x, float y);
get_vel_player(usize player, float x, float y);
set_pos_player(usize player, float x, float y);
get_pos_player(usize player, float x, float y);
set_action(usize player, usize action);
generate_entity(String name, float x, float y);
random(int max); // seeded determined at start of game + frame_index
// high and low level input e.g. can_jump and press_x
The text was updated successfully, but these errors were encountered: