When you're in "draw" mode you can press M to toggle hide and show the menu bar, so you can draw where the menu bar would otherwise be.
Millie Squilly
Creator of
Recent community posts
It sounds like you understand moving fonts from one deck to another, but you're looking to bring a font in from outside Decker? As in like a regular Windows TTF or whatever font?
Fonts in Decker are kind of their own format, that's not really transferable/convertible from other formats. So unfortunately you can't really just import in from an existing font, you'd have to write some sort of conversion tool. And I think a lot of modern fonts are vector-based which doesn't quite work with Decker's pixel thing.
I know Internet Janitor did do some stuff with converting over some old Windows 3.1 era fonts into Decker, and they're at https://beyondloom.com/decker/goofs/msfonts.html
If you don't mind pixelling in a font manually though then there's the fontedit.deck in the examples folder.
Let me know if I'm totally off-base, if you're just looking to move fonts from another deck let me know and I'll see if I can find some doco on that.
I know some non-English decks have been made by basically redefining unused characters in the font to be characters with accents and such - e.g. you might not need a @ or # or $ in your text, so these can be repurposed to characters with accents. And if you're writing outside Decker you can just do a find and replace to convert it before pasting in. Very much depends on how many accented characters you need for that language though. And doesn't work well for input but if you're just looking to display text then it'll work.
Hi, just want to check what the issue with jankytunes was here - was it just that it paused when the script was in "sleep" mode or was it something else?
There are some tricks you can do, like writing a little loop in the code where, instead of sleeping for 60 frames, it calls the animation bits and then sleeps for 1 frame, 60 times. I think in lil you'd use like an "each x in range 60" thing to do this? But you'll probably want to read the lil doco for more details.
It sounds like you got it sorted out though?
Since Deck Month The Second is upon us, I thought it could be fun to have like a thread where those of us making things can post like WIP stuff or sneak peaks or teasers or the like. If you're working on something and want to share teasers or in-progress bits, you could post them here!
So when you go File -> Protect and enter in what you want to save it as, it saves the protected version. If you then save afterwards (e.g. from the File->Save option) it'll overwrite with the unprotected version. I think this might be what you're doing wrong? Can you walk me through the steps you're taking?
These are some useful examples. My feeling is that the third method feels the most "Decker" in terms of how to do things in that making use of contraptions feels, idk, more "proper" - although this is based more on emotion.
One thing I noticed is, at least on my browser and computer, the blocking example seems to run a lot smoother than the event-driven version - I'm wondering what causes that, since both versions are basically using the same game logic. Is there something about the blocking version or something in decker that would make it more performant?
Comparing with my own attempt at a Decker action game from the last jam, I think my implementation sits somewhere in between the event-driven and contraption methods - I'm using a view handler to move my ship around as well as spawn asteroids, but the objects are all individual canvases, and the asteroids move and detect collision themselves, with an "on view" function added to the asteroid canvas's code. I guess another difference is that I'm not using contraptions as such, just canvases with the occasional bit of code inside them where necessary. But I think making proper contraptions is probably the better option. I think what I've found is that the event driven method isn't necessarily mutually exclusive from using contraptions - like you can combine techniques from both, have some things driven by a global "on view" and some things driven by the contraptions themselves. I think, using my game as an example again, while I could have done the ship and asteroids as a contraption, the spawning of new asteroids would probably still need to be done in the card's "on view"? I think this isn't necessarily something missing though, just sort of a comparison thought I had.
I find myself thinking about performance still, since in my own game I found on some devices things can get a bit laggy when there's lots of items on screen at once. I am wondering if that's intrinsic to the complexity of the problem and Decker's processing capabilities, or whether if I was just running something like the blocking example and essentially just rendering onto a canvas I'd be able to get better performance.
If I attempt an action game again I'll almost certainly use these examples as reference, though!
Hi! Ahmwma has already linked Asteroid Run which I wrote, please feel free to take a look at the code and ask me any questions.
I'll paste a somewhat simplified version of the code below
music1:("","sound1","sound2","sound3","sound4","sound3","sound3","sound1","sound2") on loop do loopcounter.text:loopcounter.text+1 if loopcounter.text="9" loopcounter.text:1 end music1["%i" parse loopcounter.text] end
So, simple explanation is I've got a counter that increments every time loop is called (which is basically every time the audio finishes) and I've got a list in the code of all the sounds I want to play, in order. When the loop goes round, it'll increment the counter and return the name of the next sound. (And no I don't remember why I have it going from 1 to 8 instead of 0 to 7, sorry lol)
Let me know if this makes sense, or if you want to share your attempt maybe we can take a look and see why it's not working for you, since from the sounds of things you're basically working on the same principle.
(I guess the other way to have background music would be with the contraption I wrote lol)
I understand you've got a solution with the contraption, but if you do want to make your own .hex file, essentially the .hex files are indeed just normal text files, where each line is the hex code for a colour in the palette. So you can just make them in a text editor (e.g. notepad) and save with a .hex extention.
In order to get the hex codes, Google Search actually has a built in colour picker at https://g.co/kgs/iDpdLzf which may be handy for this.
Ooh we were briefly talking on bluesky I think! The vibes here are pretty wild, haha! Good job getting it out there!
A tip for the page with links - if you use
go["https://beyondloom.com/decker/index.html"]
in the link buttons you can have them open the website directly!
I have come up with a... sort of solution for drawing all the colour text at deck launch so that I don't have the "pop in after transition" issue
Essentially I've just put this function in my deck-level scripts to just cycle through all the cards and make them all draw on launch. Then I just call it from the "on view" of my starting card.
(removed, see below for better version)
This is kinda hacky (I didn't see an obvious way to check that the contraptions belong to the right prototype so I'm running it on any contraption) so if you have other contraptions with a redraw[] method that does something else this may not be good but it is working for my purposes!
(Apologies if there IS an obvious way to check which prototype a contraption belongs to and I'm just too eepy to figure it out right now)
Edit: better version, thanks IJ for the tip on picking the prototype name
on refreshcolourtext do each c in deck.cards each w in c.widgets if w.def.name="colourtext" w.redraw[] end end end end