3 ms·
I would truly love to see a game use haskell for mod APIs. Or perhaps erlang a better choice. As an example of just how far accessible APIs can benefit games/t
by Jenk 3y ago
I would truly love to see a game use haskell for mod APIs. Or perhaps erlang a better choice.
As an example of just how far accessible APIs can benefit games/their players: The god awful language and API that has enabled Armed Assault franchise modders to create entirely new games - literally, PUBG started life as a mod for Armed Assault 2. Armed Assault 3 launched ten years ago, and there are still many new mods being produced today, and Bohemia have further embraced this community by supporting "community developed" DLCs such that modders get rewarded for their effort.
I often wonder how much better/diverse/stable these innovative and entrepeneurial ventures could be with a "proper" API.
- pmoriarty 3y agoThe main problem with that is that there aren't nearly as many people who know Haskell or Erlang compared to those who know Lua. Lua has been a modding staple across countless games, so millions of gamers/modders are already familiar with it. I'm convinced that chosing Lua for modding is one of the main reasons Factorio has over 5000 mods now. If they'd chosen a more obscure language I'd doubt we'd have nearly as many.
- Jenk 3y agoMy point for choosing AA as an example was that it uses an entirely bespoke language, modelling system, and the APIs are just horrendous. Obscurity has not prevented (some) great things happen with/for Bohemia but I do wonder what greatness has been missed out because of it. As for Lua I think it is rather chicken:egg. Lua is popular because it is used by mod APIs, or is Lua use by mod APIs because it is popular? My own experience is the former. I think it is a horrible language (in that I argue many others are better) and especially difficult for new-to-programming gamers with great ideas to pick up. Haskell or Erlang (or Java or C#) with type-safe APIs would be much more educational for them, and provide better support IMO.
- 0cf8612b2e1e 3y agoLua is used because it is dead simple to drop into a project as an extension language. It was designed to be easy to interoperate with C. Lua/LuaJIT is one of the fastest scripting languages available.
- vluft 3y agolua is used by mod APIs because it's very performant and extremely easy to embed in C/C++. > especially difficult for new-to-programming gamers with great ideas to pick up and you're proposing haskell or erlang as an alternative first programming language for somebody?
- _proofs 3y agothis is a strange take for me to read -- i've written quite a decent amount of lua, and it is the first language i used to learn (zero programming experience prior) when i eventually got exposed to python (but more heavily C/C++, and even some lisp/pascal) and came back to lua, i was grateful lua did not inundate me with parens/primitives/modules/data-structures/grammars, and found the flexibility of the interpreter and also what lua tables present as a unified primitive for multiple container types to be so nice and accessible for getting right to flow-state. i did not have to look up another API and read about a set of semantics provided with a desired module, i just needed to know 1. what i want to achieve and 2. a single API: the lua table its small std library is performant and easy on the cognitive load, and then it plays so nicely with other languages and environments. have you written much lua?