#moonscript — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #moonscript, aggregated by home.social.
-
Lattelua — когда Lua уже мало
Если вы хоть раз встраивали Lua в свой проект — будь то игровой движок, высоконагруженный веб-сервер на OpenResty или конфигуратор сложного сетевого оборудования — вы знаете, за что мы его любим:) А любим мы его — за компактность, быстроту, встраиваемость и предсказуемость. Не любим — за аскетичный синтаксис, отсутствие привычных конструкций и постоянное «изобретение велосипеда». Эта статья — обзор диалекта Lattelua : зачем он нужен, чем отличается от других диалектов, и почему его особенно удобно использовать в уже существующих проектах, где Lua — встраиваемый язык. Погнали
-
this would've been great if it just parsed
```moon
class B extends class A
@__inherited: => print " lmao"
new: => print "ayyyy"
```
#moonscript -
-
Posted a code example for a #tic80 effect: horizontal gradients
TIC-80 is usually limited to a 16-colour palette, so this involved two tricks: a callback which runs every scanline, and poking the memory location for the first palette colour, which is used as the background. Do so in the right way and we can exceed the colour limit!
I used this recently in a game to add a nice night sky background.
-
For #LD55 I worked on a cute platformer with @triplecubes in #tic80 !
https://ldjam.com/events/ludum-dare/55/crystalline
I had fun making the music and art, and although I didn't get to do as much #pixelart as I would have liked, I'm still pretty happy with the result!
And now I'd like to take a holiday...
-
Made a code example for #tic80 : shooting bullets!
https://cxong.github.io/tic-80-examples/bullets
Shmups are great because they are one of the easiest genres to get started with, but this took a lot longer to make than expected, because it covers lots of techniques:
- spawning bullets
- collision between bullets and enemies
- despawning on collision, out of bounds
- sound effects
- cooldown using countersif you haven't done #GameDev before, even if you're using an engine... it's not easy!
-
Just wrote this code example of AABB collision using #tic80 and #MoonScript
https://cxong.github.io/tic-80-examples/collide
TIC-80 is a great fantasy computer, which also means it has a very barebones API, with no physics functions at all. If you just need some basic collision, this should help save you some time writing it from scratch!
-
@patrickmcurry #tic80 is an #OpenSource multi-language #FantasyConsole
FCs in general are super easy to get started, and are great for learning, prototyping and jamming. I blogged about the latter here: https://cxong.github.io/2020/06/fantasy-consoles-for-jams
In terms of languages, it has great support for #lua, #javascript, decent support for #ruby, #python, and a bunch of niche yet fun languages - my fave is #moonscript
Here’s a video showing some games (mine is one of them)
-
I made a scraper (in #python) for #tic80 carts hosted on tic80.com, as I wanted to find the #opensource ones but the website had no way to search this.
https://github.com/cxong/tic80-cart-scraper
It looks at all metadata on the pages as well as in the cart headers; some interesting results:
https://docs.google.com/spreadsheets/d/1GnnkFf-IP_YxdlRwmIpDKPGYCEyPqGPRurY3PdhtzqU/edit?usp=sharing
E.g. most carts are unlicensed but for those that are, 60%+ use MIT, followed by GPL3's 12%. Despite supporting many languages, 90% of carts are #lua, with #javascript 5% and #moonscript 1.6%.
-
MoonScript (a language with a CoffeeScript-like syntax that transpiles to Lua) continues to be the most enjoyable programming language I have ever used.
It’s not the most practical choice for everything; I probably would choose something else for a big collaborative project. But it’s an absolute joy to use something that truly feels like “executable pseudocode”, like a simpler Python alternative with a bias towards functional programming. If you can grok Lua’s “tables for everything” model, then the MoonScript language guide should help you pick up the language in minutes.
If we had a “gradually typed” MoonScript to target Luau instead of Lua, I’d probably use it for everything.
POSSE note from https://seirdy.one/notes/2023/02/09/praise-for-moonscript/
-
@tomasteck Awww thank you! 😊
It's not a fair fight though, @sejo 's been so quick on most of the challenges yet he stuck to his language of choice (Awk). I've done all but this week's challenges in #uxn but have gone to my favourite #moonscript for the last few that haven't a hope of fitting in Uxn's RAM. Or perhaps I was impatient and wanted to collect them all 😅
It was great to see the finish line approaching and now it's finally here I'll miss AoC!
-
pinging all #lua #moonscript #love2d enthusiasts --- is there any sensible way to develop Lua/Lapis/Moonscript on Windows relatively pain-free? Is LuaRocks usable? Should I be looking at Docker? Guide me!