How about a new minimal IF engine with complete source file control?

Made it!

v0.3.1 is now out and I think it’s quite better than before.

@Cerfeuil, you can check the changelog here (v0.3.0 is the one with the actual changes, v0.3.1 is the latest but has nothing else, just a dependency I forgot). Also, the documentation was refactored to reflect the changes, and I think that the page on the configuration file is the most interesting for you. I’m really looking forward to your comments and feedback, and I really hope that you keep on with the port of your game to iffinity!

Cheers, and thank you once more!

3 Likes

I think I read that your engine can output a base template to work with, but do you have a sample game?

2 Likes

ifc init indeed produces a template, but it actually is a working extremely basic “game” that you can compile with ifc and try it out on your browser. Also, the examples folder in the repo has 2 other projects. They are not, however, actual “games”, but are mostly made to test aspects of the engine. You can try them out as well, mainly in order to get a feel on how the engine works. I believe that if you are familiar with Twine (and especially with Snowman), you’ll feel right at home.

One of my short-term goals is to make a small “showcase” game that features some actual gameplay, and I’ll also try to port The Ship (my IFComp entry) to iffinity.

It goes without saying that if you end up making anything in iffinity, however simple or small, reach out to me so I can add it (or a link to it) in the repo :slight_smile:

2 Likes

I have no idea what I’m doing with node.js, but maybe you can help me. Win10.

I’m running node.js 18.18.0, but I didn’t install that Chocolatey thing that was an option.

I opened the cmd.exe and ran npm install -g iffinity. It downloaded.

Anytime I run ifc, I get an “error: inexistent, empty or malformed config file. aborting.”

Any ideas?

Yes, that is correct! That is the message from ifc when you try to compile a project (by writing ifc) and it doesn’t exist. So, you’ll need to follow the steps in the readme: create a new directory, navigate into it, and either: 1) run ifc init inside that directory and let it guide you, or 2) create the iff-config.json file manually and start building your project. After any of these steps, run ifc inside your project’s directory to compile it and output an HTML. Please, make sure you have read the repo’s readme (ideally the wiki too).

In any case, it seems that you have installed iffinity properly. You can also check its version with ifc -v and I’d also recommend checking the general feel, commands and options of the iffinity compiler with ifc -h.

Hope that helps, cheers!

1 Like

That helped perfectly! Thanks a bunch!

I’m excited to try it out. :slight_smile:

1 Like

I had a stupid-busy weekend. I’ll look at the logo and iffinity soon.

I know there’s no pressure, but just letting you know. :slight_smile:

Edit: I recently saw this post and thought to myself, I could have sworn I sent this as a private message. I must be getting old. :wink:

1 Like

Alright, just tried out the newest version. The updated iffinity branch is on Github, and the improvements are super helpful. Didn’t run into any bugs this time! I can already see a lot of places where this would be much more useful than Sugarcube for my project.

A few more notes/questions:

  • I couldn’t figure out a good way to prepend/append stuff to the <body> directly, even with the iff-story div added–admittedly I didn’t spend much time on it, and just ended copy-pasting the “wrapper HTML” around every single snippet. I only have two snippets so far, and probably won’t end up with that many, so this works for me. I wasn’t using the wrapper HTML for much besides styling, anyway.
  • The documentation here says the story object should have methods like showSnippet and getSnippet, but those methods don’t work for me, and it doesn’t seem to have them when I print it in the console? Granted I’m not great with this stuff, so maybe I screwed something up. But getting showSnippet to work would be really helpful for something I want to add to my project (a transition between an exploration/battle screen).

Thank you for working on this!

2 Likes

Thank you so much for keeping on trying iffinity out, and for your invaluable comments!

  • To prepend/append stuff directly to the <body>, you can use jQuery like so:
$(function () {
    $("body").append(...);
});

The reason I added #iff-story was so that you can have something to add stuff to that doesn’t get “flushed” on every snippet change (like what happens to #iff-snippet). This is true for the <body> as well, of course, but I wanted to offer the author a way to do so without having to mess with the <body> directly. Also, #iff-story was added for future use by the engine. So, feel free to add stuff either to #iff-story or to the <body> directly, but never forget that whatever you do to these won’t be refreshed/changed by the engine whenever the snippet changes; only changes made to the #iff-snippet element are “reset” on each snippet change.

  • The story object indeed has all the methods that are referenced in the documentation but, because they are methods, they are not shown with console.log (which only shows stuff like properties and data fields for objects). The methods are there. To make absolutely sure, you can try for example console.log(story.showSnippet) instead of console.log(story).

Hope that clears things a bit. Looking forward to more of your thoughts/comments/ways to use the engine, and to how your game will evolve. Thanks once again for using iffinity!

2 Likes

Hi everyone!

I just released the first beta version of iffinity (v0.4.0, including awesome logos made by @HAL9000) and I decided to attempt to get a bit more exposure.

Therefore, I made a new topic to try and reach out to more IF creators. I also created an iffinity tag in the forum. So, if you have any more thoughts/questions/feedback etc, feel free to respond to the aforementioned topic or even start a new one with the iffinity tag!

Small note for anyone who may already be playing around with iffinity, the latest version has a few breaking changes; they most probably won’t affect you, but you never know. Please make sure to check out the changelog.

Hope you like the latest version and I’m really looking forward to your feedback and, hopefully, your iffinity creations. Cheers!

4 Likes