Replies: 8 comments 1 reply
-
I agree - having single documented place for new language addition would be really nice. So far I've spent more time trying to understand what's going in TIC-80 codebase with my super rusty C skills than actually implementing a new language. Also +1 on slimming down amount of API calls in favor of direct memory access at some documented location. Memory-mapped I/O is way less magical and more retro-feeley. But that's a view through my "Retro CPU" glasses, so it's highly biased. |
Beta Was this translation helpful? Give feedback.
-
Web Assembly would be the language to rule them all 😉 ..... It would allow support for Rust, Go, ES2020 JavaScript, etc! |
Beta Was this translation helpful? Give feedback.
-
Well running all languages throu a single bytecode/interpreter would be super useful but i don't think it's possible.. Like lua would be doubly interpreted, performances would sink. And it would certainly be cumbersome. |
Beta Was this translation helpful? Give feedback.
-
I think we have to keep adding new languages and it's weird to stop doing this because it will increase the entropy of the universe :)
Thank you for your thoughts 👍 |
Beta Was this translation helpful? Give feedback.
-
Hi, having picked up tic80 again i checked on this topic and found that there have been some improvements in the code. I noticed that now the script related switches are limited to a couple of places, and SCRIPT_LIST/SCRIPT_DEF is used extensively in the code to "generalize" on languages.
I suggest the following:
If you like this proposal i can try and implement it. |
Beta Was this translation helpful? Give feedback.
-
@msx80 yes please. If you also write some kind of tutorial / docs on how to approach implementing new language that would be super sweet. |
Beta Was this translation helpful? Give feedback.
-
Hi, sorry for the delay with the response TIC-80/src/studio/screens/console.c Line 142 in b1d24e6 TIC-80/src/studio/screens/console.c Line 2524 in b1d24e6 Of course, we have to generate these strings in run-time if you move all the things under the tic_script_config .So, I like the proposal and will appreciate your help. Also, docs about adding new lang will be very helpful. Thank you. |
Beta Was this translation helpful? Give feedback.
-
I'm writing a small doc on how to include a new language in TIC-80 :) |
Beta Was this translation helpful? Give feedback.
-
Hi there :) It would be nice (both for contributors and users) to know in general what are the plans for the future of TIC80 in regards to languages support. There are already a number of languages (lua, js, wren, squirrel etc), and some more are in development or available as pull requests. Now, it's obviously good to support a wide selection of languages, to widen the audience and offer more choices etc, but there are drawbacks too, for example each new language bloats the build process, have to be maintained both for updates on the language itself and for tic80 (new apis or revision on existing ones). Some might not compile on all platforms or require special care.
I don't think it's feasible to just keep adding languages upon languages, at least with the current setup, but on the other hand stopping new addition is weird, expecially since there are mainstream languages like python currently not included while much more obscure languages like wren are. Btw, it would be good to know the distribution of languages across submitted carts. I would guess it's like 95% lua.
Since it's ultimately a preference choice, it's up to @nesbox to decide, so it would be nice to know what's in his mind :)
If we plan to "keep adding languages", i suggest to make the process more steamlined and decide on some conventions. I've actually tried it on myself while adding support for wasm language, and i encountered some areas that could use some cleaning, for example:
So these are my two cents, what do you all think ? :)
Beta Was this translation helpful? Give feedback.
All reactions