nesbox / TIC-80

TIC-80 is a fantasy computer for making, playing and sharing tiny games.
https://tic80.com
MIT License
5.03k stars 488 forks source link

Request: -- script: nimscript #1471

Open thisago opened 3 years ago

thisago commented 3 years ago

Hello! Thanks for creating this awesome project!!

As mentioned in issue #207 the Nim is a great language for game development because it syntax is like Python and has much better performance.

And also has the Nimscript, a scripting language like Lua with syntax of Nim but runs on a VM. The Nimscript is very better than Lua (on my vision) because it has the Nim macros on it. The Nim's macros is a powerfull feature that handles the code as data and allows chage the code automatically!

See the Nimscript doc here

Edit: The Nimscript (also Nim) has a strong type system that helps the code be more organized and avoid runtime errors

nesbox commented 3 years ago

Hi, we will try it in the next version. Thank you

thisago commented 3 years ago

Thank you very much!

joshgoebel commented 2 years ago

FYI, this will be indirectly supported via the new WASM support - in that you could use Nim to compile a binary WASM file and then import that into your cartridge.

AlecTroemel commented 1 year ago

with the addition of python scripting, and as @joshgoebel mentioned existing support for nim, is there still a strong desire for this?

thisago commented 1 year ago

I think that WASM support is great, but supporting plain Nim code in TIC's editor would be very good because can be edited on mobile too. But it's not needed (despite WASM4 supporting Nim through WASM too), there's a lot of supported languages and Nim can be used to compile JavaScript if don't want to use WASM. Here's an binding that I've made a time ago https://github.com/thisago/tic80

So I think that this issue can be closed for now.

Miguel-hrvs commented 3 months ago

Now it is supported: https://github.com/nesbox/TIC-80/pull/2645