Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Initial help please...

A topic by VP created 82 days ago Views: 169 Replies: 15
Viewing posts 1 to 4

Hi Mattius, I was working through the tutorial for the "my_first_yarn" today, and ran into a small problem...

Step 8: Running Your First Yarn
Now that you’ve created your simple Yarnspin game script, save the “my_first_yarn.txt”
file and run the Yarnspin compiler to generate the “yarnspin.dat” file. To play your
game, simply launch the Yarnspin player.


My question is: where is the yarnspin compiler please?
I can't seem to create a "yarnspin.dat" file for my game.

Thank you.

Developer

The yarnspin compiler is just the yarnspin.exe in the root of the folder. It will compile all the files in the scripts folder, create the yarnspin.dat, and run the game.

(1 edit)

I see, thank you... I can't seem to generate a dat file by running the yarnspin.exe.
Maybe I did something wrong?

Developer

most likely, there is something missing or wrong in the script, and yarnspin.exe reports an error. If you try and run yarnspin from a commandline, you should be able to see any errors reported, and we can figure out what’s going wrong.

Also, if you want to share your script, I’m happy to help debug

Okay, thank you. I really appreciate your help.
Running yarnspin.exe from the command line interface gives the following error "No yarnspin.dat game data can be loaded."

Here's the script I made...

title: My First Yarn
author: Your Name
start: my_location

=== my_location ===

img: room.png
txt: You are standing in a small room. There is a person here, it's Carol.

opt: Talk to Carol
act: my_dialog

=== carol ===

name: Carol the Neighbor
short: Carol
face: carol.png

=== my_dialog ===

carol: Hello! Welcome to my humble abode.
player: Hi. Thanks for having me.

say: Say goodbye and leave.
act: end_conversation

=== end_conversation ===

carol: Goodbye! Have a great day!
act: my_location

Developer

hmm, ok, when I try to run that script, I do get an error, saying that it is missing the version declaration. It is a bit unexpected that you don’t get that… what platform are you on?

Anyway, if i add

version: 1.0


to the start of the file, it works (after fixing filenames of two images that are otherwise missing)

(4 edits)

Thanks. The script is from the tutorial.pdf, I just tried with my own images but It doesn't seem to like png image files for faces.
I'm currently on: Win11 Home 10.0.22631.

Adding "version: 1.0"  to the script, (and using the default carol.jpg image instead of my own png image) fixed the script and it now compiles. :)

 One small issue is that "room description" text covers the "Say goodbye and leave" option text, so it can't be read. I'll have a play around with it and see if I can figure it out. Thank you.

I had this issue, too. Seems to happen when the last line before the "say" options are shown in a dialog is said by "player."

Developer

Yes, this is indeed a bug! Or rather, a regression, as it was working correctly at some point. The player text should really be cleared before options are displayed. I will fix that, but in the meantime, I suggest putting an extra "carol:" line, with nothing after ":" which will clear the player text, but also (annoyingly) require an extra click. But yes, will fix!

I don't know why you @VP does not not see the carol portrait though, that works for me... perhaps if you try deleting the .cache folder? this would cause all intermediate files to be regenerated. it shouldn't be necessary, but maybe there's a glitch happening when changing back and forth with an image with the same name and different extensions, so worth a shot

Thank you! Will look forward to the fix. This will definitely be my go-to game engine. Absolutely loving it so far. 
I've had a play today and got a short game working with images, palette, background, flags and sounds. Still can't get a character to work yet, unfortunately. I'll try clearing the cache and keep reading the tutorial and the demo to see if I can figure out what I'm doing wrong- it's probably just something simple I've missed. This is an amazing tool!

(4 edits)

Hi Mattias - would you mind posting a short script example for me please? - just the bare-minimum, to: 

===define a character=== 
==add character portrait to a location===
===simple dialog between player/character===


I'd really appreciate it. I'm having to accept defeat after an entire day of scouring the tutorial and example game.

Thank you.


Well, I got it to work by stripping down the demo game line-by-line...but it fails to compile when I add it to my game script. No idea what's going wrong... I guess I should keep things really simple and just make games with no characters or dialgues.

title: Character
version: 1.0
Author: ???
start: location
resolution: full
colormode: rgb

=== location ===
img: copter.png
txt: blah, blah...
chr: pilot
act: talk_to_pilot

=== pilot ===
name: helicopter pilot
short: pilot
face: pilot.png

=== talk_to_pilot ===
player: Hello
pilot: Oh hello!
act: get Radio

I figured out what the problem was...

I was placing the character block above/before the text block. This produces an error and prevents compile. I just needed to "cut and paste" the character below the location description and it works perfectly!

Problem solved :)

Developer

Hey, I've been a little slow replying, but it seems like you have got it working now, yes?

I must admit that I am a little surprised that you had to move sections around - that should definitely not be necessary, you should be able to declare sections in any order. I will try myself if I can reproduce it, because that sounds like a bug!

Is there anything that is not working at the moment? Don't hesitate to ask I will do my best to try and help (maybe even a bit faster next time :P)

Hey, no worries at all, really appreciate the feedback. Yes all working perfectly now! If you can't manage to reproduce it, I can post 2 example files from the same project - one working, one producing errors. It was just 2 lines of text (chr: and act: ) in the wrong place - but it threw up errors for txt:, mus:, amb:, which had all been working previously - it took a few days to figure it out - but as soon as I moved those 2 lines below everything else, it all worked with no problems. Interestingly, it was the debugger found the error line and suggested the solution for me :)
anyway, super happy and confident that I'll be able to produce a game with this. I'll make a donation soon, just as a thank you for creating this software.

Developer

Ah, I think I understand what was happening, and I think I can repro it now. It seems like a location section can not have a "chr/act" pair before the txt/img declarations. That is something I want to fix for a later version, thanks for finding that!

I am glad you like the engine so far. And hey, no donations needed (but thank you for offering), I do not in fact accept any :) The best way to show your support for Yarnspin is to use it and enjoy it, that is all I want it to be :)

You're welcome. That's very kind of you.
I'll definitely use yarnspin -probably every day- and I definitely appreciate it.
Thank you Mattias. You're a star