[WIP] Toolkit for Human Ramen games
Lua scripts driven scenario tool. Code some talks, mutate some world's vars and start a fight.
Here you can see how it works. Ok, would work.
Characters:Add("Karen", "ChrKaren")
Background = "BgKitchen"
startNode = Scenario:CreateNode("Karen", "Hello, Human")
okNode = Scenario:CreateNode("Karen", "Hey :)")
notOkNode = Scenario:CreateNode("Karen", "Karen, of course!")
startNode:AddResponse("Hello", okNode)
startNode:AddResponse("Who are you?", notOkNode)
...
Shove it in a system and watch results.
Turn-based battle system. Here battle setup. If everyone is ready just throw battle entity:
var battle = _world.CreateEntity();
battle.Attach(new BattleComponent(enemies, player));
And we're ready to dance.
Tests shows something like predefined fight.
Barebone Visual Novel / JRPG style ui system. Has big black rectangle, can show letters and lights up some choices.
Musthave systems for showing some sprites and taken some keyboard presses.
Renders SpriteComponent and SpriteFontComponent. Doing some work with resizing and positioning stuff.
Parse lua script with keyboard->command maps and with presses throw commands through HumanRamen.Essentials.Commander.
kbd.Q = "Exit"
kbd.Space = "Continue"
kbd.F = "Fullscreen"
kbd.D = "ToggleDebugConsole"
kbd.Enter = "Enter"
kbd.J = "Down"
kbd.K = "Up"
kbd.Down = "Down"
kbd.Up = "Up"
...
See HumanRamen.Scenario package. This system makes scenarios work.
Essentials tools for everyone.
Create commander and throw it in systems where you want to receive or send commands:
_commander = new Commander();
new SomeSystem(_commander);
If your system wants to receive commands it must be registered to it and implement ICommandHandler interface.
public class SomeSystem : ICommandHandler
{
private Commander _commander;
public SomeSystem(Commander commander)
{
_commander = commander;
_commander.RegisterHandler("control", this)
}
public void HandleCommand(string topic, string command)
{
if (topic == "control" && command == "Shoot")
{
// do stuff
return;
}
}
}
And you can command from everywhere with commander:
_commander.Command("control", "shoot")
SpriteBatch helper for creation simple 1x1 texture with one color.
Primary = new ColoredTexture(graphicDevice, Color.Blue);