Skip to content

Instantly share code, notes, and snippets.

@mzaks
Created June 1, 2015 14:10
Show Gist options
  • Select an option

  • Save mzaks/02b0c482509fed565ab8 to your computer and use it in GitHub Desktop.

Select an option

Save mzaks/02b0c482509fed565ab8 to your computer and use it in GitHub Desktop.
Doodling a Entity system based prog language
context main
component Position {
x : Int,
y : Int
}
component Velocity {
x : Int,
y : Int
}
component Color {
r : Int
g : Int
b : Int
a : Int
}
component Score [main] {
value : String
}
system move (g: [main::Position && main::Velocity]) -> [main::Position]
system changeScore (e: [main::Score]!, g:[main::Position && main::Color]) -> [main::Score]
component Message {
text : String
}
component URL {
value : String
}
component Replace
component Append
component Console
component Soccket
component Display
loop main [1/60] {
move
changeScore
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment