Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

My very first Decker project - help appreciated! :)

A topic by echo river created Jul 26, 2024 Views: 299 Replies: 5
Viewing posts 1 to 4
(+3)

Hey there!

I discovered Decker some time ago and I fell in love immediately. I have made this small game to learn the basics of the tool: https://echoriver.itch.io/hit-the-drum I plan to submit it to the Summer Camp jam, although as said, it's very-very basic. My main problem is that I know nothing about coding, unfortunately. I tried reading the Lil documentation but truth be told, it's kinda like reading in Speranto for me. I guess my first question is... What are the chances of learning how to make something a bit more advanced with no prior knowledge of any programming language? Do you have any recommendations for someone as noob as me?

As for my project, there are a couple of things I tried and couldn't do: 

- I wanted some images (the ones in cards 9 and 11) to use the 16-bit color palette, but I couldn't make it work in the listener. I tried to do it using following the steps here, but I got an error message saying: "Expected name, but found a symbol". Any idea on what could be wrong? (please forgive me if this is a stupid question, again... 100% noob speaking!).

- I added a link to a field on the last card; the text was formatted as "rich text" but the link is not working... I have no idea why :(

- I'd have liked to make the text fields in cards 4, 5 and 9 appear on screen consecutively, at intervals. I know this is possible because I've seen games doing this, but not sure if I have to use a specific contraption for this, or a script?

And besides this, I'll def appreciate any feedback on my project, and comments on how to make it prettier! :D Thanks in advance. 

(1 edit) (+2)

Well done on the first project! 

I can't answer the image importing questions but, for the other things...

I also came to Decker without any scripting knowledge and also found the documentation hard to understand at first. 

But because so many things in Decker are possible without knowing Lil (making cards, connecting them with buttons, etc) I think it works quite well to learn Lil gradually based on what you're interested in doing -- seeing a working example of something usually helps me understand enough to use a similar script in my own decks. So, yes! I definitely think you can make more and more advanced decks! But what steps to take or what examples to look at will depend on what you're interested in making. 

Everything in the examples folder is unlocked (I think...) so you can always go into widget mode and see how any of the examples are made to see a variety of small scripts in action.

The link in your deck should work if the text field was 'Locked', with the Widget menu. As a side note... an unlocked text field can be re-written by your player. For your project I'd probably recommend locking your fields when you're finished. And it will fix your link.

For creating pacing on a card... to make a widget appear, you might want to use this:

widgetname.show:"visiblitymode"

For example... if you set up a card to have your widgets set to "none" (you can do this from the widget menu), and your first piece of text was in field1 you could use

field1.show:"solid"

in a script to make it appear solid, like it is now.

For making certain things happen with intervals you can use sleep[]. Sleep creates a pause, and a larger number inside the [] makes the 'sleep' last longer. An example of what that could look like is:

field1.show:"solid"
sleep[50] 
field2.show:"solid"
sleep[50]  
buttontonextcard.show:"solid"

If you make a test button on one of those cards that contains a script like this (with the correct names for your widgets... put everything between "on click do" and "end" inside the script) you could try out different timings and see if it gives the effect you want.

 If it is, then me or someone else can give you some ideas/examples of how to make it autoplay.

I'm sure other people will have thoughts as well. 馃檪 And welcome!

(+2)

With the image importing, how far did you get? Can you paste the exact code you tried in the listener here? Or maybe screenshot after you've typed it, showing the error? I think it could be like as simple as mistyping something but I'm not sure.

If you're following the steps you linked, I'm assuming you were able to make a dithered gif of the right resolution? I think once you've done that it should just be as simple as running just this one line in the listener

card.image.paste[read["image"]]

and then selecting the gif.

Or did you have issues earlier, exporting the palette out? Using this code?

r:image[16,1]
each c k i in colors r[i,0]:c end
write[r]

From the looks of it this should be safe to try running one line at a time in the listener? Then we can see where you're having issues.

(1 edit) (+2)

Thank you both! Regarding the links yep, the issue was that the text fields weren't locked :) Now they work. 

I will try the script to make the field appear in intervals. And I saw just today this tool created by another jammer: https://lokeloski.itch.io/deckstamp I think this can be the answer to my prayers lol.

UPDATE: I did manage to export the images using the tool above, and then paste them with the script you shared, Millie Squilly. Thanks for the tip! I couldn't make sleep[] work though :( Not sure why, it seems like the deck reads the script but nothing happens. I double-checked the fields had the right name and stuff, and they were locked. They were plain text though, should it be rich or code?

(2 edits) (+1)

(Deckstamp is so good!)

I think any text mode for the field widget should fine, and it could be one of a couple of things. For now, I've made a little working example of .show and sleep[] working together, and one possible autoplay script.

https://crowmorbid.itch.io/little-examples (password: decker)

It's entirely possible that I've written things in a confusing way, but the scripts work and you can look at them in widget mode. I've tried to #comment# inside the autoplay script where it might be a little confusing. Hopefully this helps!

(+2)

Thank you so so much for this!! You're the best.

I finally had time to check it (busy working week) and everything looks perfectly explained. I will try replicating it on my deck and see how it goes.