Mixed Message Project: Adventure Scene Generator!

Here’s my version of the mixed message project – an object that generates scene descriptions for a hypothetical text-based adventure game. It generates randomized, somewhat florid, descriptions of the fantastic “Damned World”, including an object of interest that (were this an actual game) the player might choose to interact with.

Descriptions are aligned with three separate environments or “biomes”. This feature utilizes a couple of classes so they could easily be scaled up and linked together for a more comprehensive and intentional game experience.

The core game object itself, with a few added methods and the addition of a core game loop, could be scaled up to an actual game.

Project was easy, though I am continually disappointed that the core array methods for javascript are not as much fun as Ruby. I should probably start looking into some modules!

Took me a few hours spread out over several days of teaching and raising my kids.

Directions are in the README. I’m very inexperienced with github, so hopefully the link will work.


1 Like

Well, now I feel like I underperformed on my version, haha. Any plans to actually make this into a game? (I’d absolutely play it.)

A small suggestion, maybe update the installation instructions. To clone the repo you grab the URL from git_practice itself and not git_practice/Adventure Scene Generator, so when the user navigates to the project, they can’t just enter node adv-main.js, they have to go into the Adventure Scene Generator directory first. Or, moving the files up a level into git-practice works too. Not a big deal, though, it’s easy to figure out.

And I’m curious, what’s an example of a fun Ruby array method?

Advice regarding github is much appreciated! I’m definitely learning as I work my way through these projects. Are there groups on Codecademy working through projects together? I’d love to do a project with a team and learn more about branches, pull requests and the like.

I’ve played around with making this sort of game before, but it’s a lonely craft.

Ruby array.shuffle is a fun array method. It does what you might imagine: randomizes the elements of an array. I just completed the Codecademy “Find My Hat” project and had to implement an algorithm to shuffle an array. There are so many more though – check out the documentation here! Some of them are easy to implement, like array.reverse; others save a lot of headache, such as the array.repeated_permutation method that finds all of the possible permutations of a set of numbers.

There are probably some great modules for Javascript that do this kind of stuff – I’m still learning!

I’m still a Git/Github newbie too. I think I spent as much time committing, branching and pushing as I did coding on the project… gotta get used to the workflow! I’m not sure If there are any particular groups here working on projects… I suppose they’d be under the Community section?

Ruby does look sort of fun. I have to admit I’m a little disappointed that the Back-End Engineer path teaches Express and not something like Django or Rails, I’m coming from Python and would have loved to skip the semicolons and curly braces of JS… ah well :rofl:

I went with JavaScript because most of the Google Suite is written in it. I’m a special education teacher who likes playing around with programs, and my goal right now is to be able to write custom functions in the Google Sheets or Forms that will communicate with the API of Infinite Campus, our database. We collect data on Forms, compile and graph on Sheets, then manually enter in IC. I’ve already connected my sheets to my forms and set them up to compile and graph for me (easy to do with the way Forms and Sheets are set up). Both Sheets and Forms support custom functions in JavaScript so all I’m lacking is information about the IC API and the finer points of how and where to send a POST request to securely enter the data from my sheets without accidentally messing up anything else. From the documentation I’ve found online so far, I’m afraid IC will want to sell me the right to interface directly with their API. However, the developer window in chrome logs all network requests, so I’m wondering if I can get enough information about the API from that to be able to write a custom function on Sheets that sends a POST request to IC…

I’m afraid I haven’t learned about APIs yet - but that’s an awesome goal! I wish you luck :slight_smile: