Skip to main content

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

Benji Kay

128
Posts
6
Topics
304
Followers
97
Following
A member registered Nov 17, 2015 · View creator page →

Creator of

Recent community posts

(1 edit)

Wanted to show off this amazing remake of a classic text adventure which uses text-engine!

Amnesia: Restored https://electronicliteraturelab.itch.io/amnesia-restored

It's open source, so you can also check out how they made it on Github. The game disk is over 50,000 lines! 👀

https://github.com/TheElectronicLiteratureLab/amnesia-restored/blob/main/scr/text-engine/game-disks/amnesia-restored.js

You will probably want to use the old system or write your own save/load if your game relies on non-deterministic randomization. Or you could update your randomization to be deterministic. Check out the section of the documentation titled "A word of caution regarding SAVE/LOAD."

Hey, that's great! Let me know if you have questions or if you make something you feel like sharing. Have fun!

Hey, thanks! Happy to help.

If you just want a looping audio file to play five seconds after the page loads, you probably don't need to interface with text-engine at all to do that. I would just add something like this in the script tag of your HTML (or a separate script file if you have more custom code you want to add):

const audio = new Audio('audio_file.mp3');
audio.loop = true;
setTimeout(() => {
  audio.play();
}, 5000);

But if you want it to start 5 seconds after some particular event in the game, such as when the player enters a room, you could put the timeout in e.g. an `onEnter` function or etc. on your disk.

Hope this helps! If you need more help with this let me know.

Listen, I'm packin' it up and bringin' it out west, so get it together. 

Feel free to do a PR https://github.com/okaybenji/goodnight

Thanks very much! Super glad you enjoyed it and really appreciate the nice feedback. :)

ty!!

Hey, if you mean the screen, that was done with CSS. You can see the code for it here: https://github.com/okaybenji/text-engine/blob/master/styles/retro.css

If you mean the computer itself, the OBCOM PCT-II artwork was created by artist Adam Bing.

Thanks for the feedback, glad you enjoyed it.

Thanks, it's great to hear you're enjoying it! If you feel like sharing any games you make with it, I would love to see them.

Hey, sorry for the delayed response! I guess you're right that text games are often written from scratch. Even in my case, I had an idea for a text game I wanted to make before I started writing the engine. But, I thought it would be both beneficial and also fun to structure the code such that it could be used for other games.

Having an idea in mind for a game was really useful for developing the engine, because it gave me a clear picture of the features I would need to implement. You can see this from the very first commit on Github, which included very simple versions of an engine and a game disk to then be expanded upon.

Later, when working on the new features for what would become text-engine 2.0, again I was working in parallel, this time on three new game disks. One of these was what would become the new demo disk for introducing folks to the game, and another was a new story disk I was collaborating on with a friend. Once again, fleshing out those games gave clear direction for which new features to implement next.

Thanks! If you press up & punch at the same time, that is meant to represent an uppercut.

Understood. I think your game is written from an underrepresented perspective and I really look forward to seeing more. Thanks again for sharing.

I'm enjoying your game! I assume there's a <spoiler>key</spoiler> somewhere to the <spoiler>chest</spoiler> but I haven't found it yet...

If you are interested for playtesting purposes, I can send you the log of my adventure so far.

text-engine community · Created a new topic Post Your Games
(1 edit)

If you've made a game that uses text-engine, post it here!

Works-in-progress are OK, too.

You bet, no problem.

Similar to how there is an onLook callback, rooms also have an onEnter callback that fires when the player enters the room. If you attach an onEnter method to your room and call playSound inside it, that should do what you’re wanting.

(1 edit)

It's no bother at all! I'm happy to help. You can use the prereqs to do this. You can make up any arbitrary string as a prerequisite, for instance 'door', and place it on the line you wish to hide, like this:

{ option: 'How do I UNLOCK this door?', line: 'You have to use a key, of course!', prereqs: ['door'] }

Now the option won't show up until some code runs that pushes that prerequisite onto the character's chatLog. You could do this, for instance, in the onLook callback for the door like this:

{

   name: 'door',

  desc: 'It\'s locked.',

  onLook: () => {

    const npc = getCharacter('gregory');

    npc.chatLog.push('door');

  }

}


Now you've met the prerequisite for discussing the door with Gregory (or whatever your NPC's name is). The next time you talk to him, the topic will show up.

This technique is used in the "ur dead" demo. After you learn from the character Fran about how names work in the underworld, it unlocks the ability to ask the other characters you've met what their names are.

If you have more questions, don't hesitate to ask. Like I said, happy to help!

No worries at all! If you're interested, I'd encourage you to check out at how the sound was implemented for the demo here: https://github.com/okaybenji/text-engine/blob/itch/custom/audio.js

It's pretty straightforward, so definitely take a look if you're wanting to do something similar. I can help with this to some extent, so just let me know if you have any questions about it.

Hey, no, you’re right. The engine doesn’t provide any tools for sound. In order to add sound you’ll need to learn about how sound works in HTML and/or JavaScript. One library you might look into for this is Howler.js.

text-engine community · Created a new topic AMA

Hey, I'm Benji! I made this engine. And I made this forum just now! If you have any questions, please ask here and I'll be happy to help.

You're welcome. The server automatically assigns the teams based on how many players are online. The only way you could control this is by joining the game one at a time, left, right, left, right, etc. (and ensuring no one leaves while players are still joining).

You are embedding the wrong link. This is what you should embed: http://benjikay.com/100ng/

No worries, you're fine! That link I posted is the game only, so you should be able to embed it.

Hey, thanks! The game is also hosted here: http://benjikay.com/100ng/

You could embed that page in a frame or iframe if you wanted.

Hey, thanks for the feedback! Really glad you are enjoying working with the engine. I'd be happy to help with this. It might be easier to get on a chat thread. Do you use Discord?

Thanks very much!!

Thank you very much! :D

Thanks so much!

No, this game was written in JavaScript, so it would not be possible to run on an emulator. (You could run the soundtrack in an emulator with an NSF player if you wanted, though!)

when you say the level 1 screen, do you mean the title screen that says level 1 or level 1 itself? if it's the level itself, are the animations playing? (there should be sparkling stars, characters bouncing a little with idle animations, and a character talking to you explaining the controls.)

which browser are you using, and what version?

hey, happy to try to help with this. can you explain in more detail what stuck means?

Feel free to build it for Windows. The game is open source. https://github.com/okaybenji/goodnight

🙏

Yes, that's correct. I don't have a PC to build the game on for that platform. The experience should be pretty much the same either way, though. The website version supports fullscreen, gamepad, etc.

That's my last destination to check off the list. 🙏

Thanks for your help. It seems my saves are safe.

I believe I've partially figured out the issue. It seems there is some code in the binary that requires that the filename not be changed. The default filename is "Neon" for some reason. If you change it to "Neon Struct" the game will crash on launch.

I still haven't been able to determine what is wrong with the icon. It was visible at some point but now it's not.

Hmm... so I played the game for a while today, through several levels, saved and quit to come back to it later, and somehow the icon has disappeared again and the game once again crashes every time I try to open it. I did just update OS X to the latest version (10.14.2), but somehow I doubt that's related. Where are the saves stored? If I download the game again will I lose my saves? Thanks.

Ah, sorry, I tried downloading it again and it worked this time. Also the first time the app didn't have an icon and used the default. Now I see the art. Not sure what happened.