Feedback on an html game

This is not a project from freecodecamp, but I made an html game and I would just like some feedback on it. thanks!
here’s the link:
https://codepen.io/Glaurung/pen/pBGdpj

3 Likes

I didn’t make it to the end because I kept dying, but this is a well implemented choose your own adventure game!

Not to detract from your HTML / JS learning, but if you really want to go down a rabbit hole, I recommend looking at Inform7. It’s a powerful text adventure language and SO MUCH FUN! There’s a web-based version you can experiment with at Playfic. You can even see a very odd assignment I completed for my Education Masters when I was more interested in programming than continuing on with my teaching career!

1 Like

If you keep dying, there is a button that says ‘last choice’ in the failures and deaths that will bring you back to your checkpoint where you die.
thanks for the info! I will look at it!

1 Like

how do you learn the language and make your own? I can’t find any editors to experiment in.

1 Like

You can play around with an editor here: https://playfic.com/edit/ or download the Inform7 IDE which also has integrated docs. You can view the source code of existing games on playfic too, to get a sense of the language.

1 Like

Here is the source code to a very simple one I wrote for a year 9 English class so they could learn to write their own, including some commented instructions at the top.

Expand
"Easy tutorial for Year 9" by Mr Bates

[You will need (minimum):
•	2 rooms, with descriptions
•	1 closed container, with something inside it
•	1 Non-Player Character (NPC) the player can interact with
•	1 locked door, and a key
•	An interesting scenario or story in which to use these items
Step – by – step
1.	Create a room and describe it.
2.	Add examinable items to the room.
a.	Things
b.	Containers
c.	Supporters
d.	Scenery
3.	Add synonyms to items and scenery to aid the player.
4.	Add a locked door and a key that opens it.
5.	Add a second room, on the other side of the door.
6.	Add an NPC to the new room and describe them.
7.	Add some ways to interact with the NPC.

The tutorial document for this can be downloaded at: http://mrjbates.files.wordpress.com/2014/11/interactive-fiction-playfic-tutorial.docx]

Use no scoring.

The Antechamber is a room. The description of the Antechamber is "A simple room with a table, upon which is a box. A door leads NORTH."

The metal table is a supporter in the Antechamber. The description of the metal table is "A metal table, which surprisingly comes up to your chest." Understand "desk" as the metal table.

The wooden box is a closed openable container on the table.  The description of the wooden box is "A gnarled, weather beaten box of simple construction. Iron hinges on one side are a little rusty, but serviceable." Understand "chest" as the wooden box.

The walls are scenery in the Antechamber. The description of the walls is "The walls are, like everything in this room, higher than you might expect, and hewn from rough stone." The walls are plural-named. Understand "room" and "ceiling" as the walls.

The imposing door is a locked door. The imposing door is north of the Antechamber. The large key unlocks the imposing door. The description of the imposing door is "The door looms over you. It is clearly designed to allow the passage of beings much larger than you."

The large key is in the wooden box. The description of the large key is “Almost too big and unwieldy to use.”

The Giant's Den is north of the imposing door. "A cavernous abode, comfortable for beings of gargantuan proportions."

Goliath is a man in the Giant’s Den. The initial appearance of Goliath is “The giant stands before you: a monstrous, monolithic man.” The description of Goliath is “He wears clothes made with ancient looking leather. His stature and demeanour is intimidating beyond words.” Understand “man”, “giant”, and “monster” as Goliath.

Instead of asking Goliath about “self/himself/Goliath”, say “Goliath cries. And when a giant cries, he means business. The whole room shakes.”

Instead of attacking Goliath, say “You punch the giant in the thigh as hard as you can. He giggles. He likes playing with little people and thinks your behavior is cute.”

Instead of asking Goliath about “David”, say “The Giant lowers himself to your level, gazing menacingly into your eyes.[paragraph break][italic type]’Don’t ever mention that sheep-scented little pip-squeak around me!’[paragraph break][roman type]He prods you aggressively in the chest, and rises to his feet again. Your chest is in incredible pain!”

Instead of kissing Goliath:
		say “In Giant culture, kissing is an act of extreme aggression!”;
		end the game saying “Goliath pulls off your head.” 


Test me with "open box / take key / unlock door with key / n / ask goliath about self / hit goliath / ask goliath about david / kiss giant"
1 Like

do you happen to know where I can watch some tutorials about this language?
that is pretty cool, but kinda weird. it’s like another language to me even though it is english.

1 Like

http://mrjbates.files.wordpress.com/2014/11/interactive-fiction-playfic-tutorial.docx

There’s some stuff on YouTube IIRC, but it’s been years since I looked at this stuff :slight_smile:

1 Like

@ConnerOw1115 Hey bro,
Nice work. I see you put a lot of effort into your project.

  • How about making the orange background fill the height and width? I say that because when the text changes the orange box changes sizes to accommodate the text contained within.
  • Consider stacking the three button on top of each other and making them the same width. That way in mobile view and desktop view only there will not be much change.
  • the width of the text could maybe set to 100% in mobile view and 80% in desktop view so that there are margins on the sides.
  • add sound effects???

1 Like

I made it look dark. click the link again!
I’ll just try to add some sound effects later.

I can do sound effects, but I can’t find any sounds. so I can’t make it :frowning:

@ConnerOw1115 check the soundbible.com website. That is where I get sound effects from.

Thanks! I’ll try and take a look at those.

That was a pretty cool game , it took me about 20min to find my way to the end.

I can’t add sound. the sound should have an https link to it, but I can’t find that.