User loginNavigation |
archivesAdvice for a young researcherHi! I'm looking for some advice about PL research. I am professionally halfway between game development (mostly Xbox+Steam) and PL research at an Italian university. So far I have been studying scripting languages, monads and coroutines, and I've managed to build a concurrent extension to F# that can easily surpass the state of the art (namely LUA) in terms of safety, performance and clean syntax. Now I'd like to tackle a larger problem: I wish to study how to define a game with a mixture of (declarative) rules and invariants and events and scripts; this apparent asymmetry works pretty well since games require lots of complex rules and lots of articulated behaviors, which I believe are best expressed with different formalisms. The idea is the following; we define a state in terms of nested sets of triplets (label, type, rules). As an example consider a space-shooting game with starships and projectiles:
State =
Ships : Set[Ship] = {ship : ship \in Ships and ship.Life > 0}
Projectiles : Set[Projectile] = {proj : proj \in Projectiles and proj.Life > 0}
…
Ship =
Colliders : Set[Projectile] = {p : p \in state.Projectiles and collides(self,p)}
Life : float = self.Life - sum{p.damage : p \in Colliders}
…
also, some fields are event handlers, like: ShipEvents = Created : Event[ShipCreatedArgs] = on_ship_created Selected : Event[SelectionArgs] = on_ship_selected where on_ship_created and on_ship_selected are coroutines (lightweight threads) which are added to the scheduler when the respective events are fired. My questions are the following: Thanks |
Browse archivesActive forum topics |
Recent comments
1 day 19 hours ago
2 days 16 hours ago
3 days 21 hours ago
3 days 21 hours ago
1 week 1 day ago
1 week 1 day ago
1 week 1 day ago
4 weeks 2 days ago
5 weeks 23 hours ago
5 weeks 1 day ago