Star Trek: revisited in Lua and Erlang
summary
Porting BSD Trek, the project uses gglobal to analyze the original C, ports core logic to Lua, then reimplements the game in Erlang (R16B03-1) as a gen_server-driven system. State is stored in dict/sparray records, a gen_server handles a timer tick 1s loop and processes commands; implemented short/long range sensors, impulse engines and phaser attacks and demonstrates Klingons firing asynchronously without player input. The demo works: enemies shoot and die, and the design avoids C pointer/loop pitfalls.
AI-written summary · about
chapters (17)
- 0:00Intro
- 0:28Topics
- 3:09Why Star Trek?
- 5:21Then why BSD trek?
- 9:35Why Lua first?
- 15:27Good things about lua
- 18:55A bad thing about Lua
- 21:43Lua port caveats
- 22:51Redesign the game in Erlang/OTP: implementation goals of erltrek
- 25:23erltrek data structure
- 29:29shared-memory data structures
- 30:57Data flow in Erlang/OTP gen_server behaviour
- 37:17Tips: writing functions for Erlang/OTP gen_server
- 45:02Future goals
- 46:00Erlang tools
- 47:15Lua tools
- 47:46Acknowledgments
related talks
41mA Dwarf Fortress Clone In Elixir: A Story Of Doing It Wrong
32mModern Erlang Teaching from Code Refactoring to Actor System Verification
06mLT: Elixir for Gaming! Using Network to Power a Sophisticated Multiplayer Simulation
51mThe Erlang VM or How I Started Loving Parallel Progamming
43mConcurrency Oriented Programming in a Modern World
18mWell I Wouldn't Want To Make a *Dys*functional Game
35mDiving into Erlang is a one-way ticket
54mWhy Games Are Positioned to Revolutionize Programming Languages
