N00b Adventure Game Learning Project

New year, new attempt at learning ELM by building something that interests me.
I am not a coder so I’m here to ask for guidance in setting up the project, organising the work tasks, and later on some code help :slight_smile:
Mostly I’m getting lost in the obscure plumbing of the structure I think I need… and so constantly drop the project. But maybe there is a better (more accessible to me) way to tackle this thing?

What I want to do is basically a text adventure, but a bit more complex.

  • I’m thinking about a single-user app (a website? a pwa?) that can handle a group of people using it locally… like, we all sit at a [virtual?]table with just one of us actually interacting with the app. This is mainly due to the fact that I imagine creating a true multiplayer app as being waaay beyond my current skills (which are very close to zero :frowning: )

  • I need the user to be able to create different individual Player Profiles, each containing:

    • Player score
    • list of characters (each with their info and stats)
  • if there is an ongoing game, the user could continue it or abandon it or begin a new one

  • CONTINUE will resume the saved game state

  • ABANDON will delete that game state

  • BEGIN NEW will ask the user to select which Player Profiles will join the game

    • each Player will then create a new character or select a live one from their profile
  • once this is all done, the game begins, kind of more or less like TextAdventure style

    • prompts to user choices
    • lists of randomly selected elements
    • text descriptions
    • tracking of scores and counters
    • buttons to allow player interaction
    • etc

This is my main problem now.
I am not sure how to do ANY of this stuff.
Is ELM enough to handle it?
Can I save state in cookies or somesuch?
Do I need a backend?
Should this be a MPA or a SPA?
How about making it playable offline? (PWA???)
Should I skip all of this tedious plumbing (the user account part) and go straight to try developing the Adventure part using a fixed dummy character, and only later with more experience come back to all this User Account horror?

Every time I try to start working on it I feel so hopelessly lost. I update the ELM setup for my computer, get stumped in stupid UI problems (like, why can’t I make X element the shape and size I want it to be?) and never manage to build a usable prototype :frowning:

Help? :heart:

Some answers:

Can I save state in cookies or somesuch?

Saved state would probably be too large for cookies, but saving state in browser using LocalStorage could be an option.

Is ELM enough to handle it?

No. You would need a bit of JavaScript if you save state in browser. (Or backend for different ways to save state.)

Do I need a backend?

If you save state in browser then you don’t need a backend.

Should this be a MPA or a SPA?

To keep things simple you could start with neither. Just a simple Browser.element based webpage without complexities of SPA.

How about making it playable offline? (PWA???)

If you save state in browser (and don’t use any external HTTP calls) it will be playable offlline without any extra effort.

Should I skip all of this tedious plumbing (the user account part) and go straight to try developing the Adventure part using a fixed dummy character, and only later with more experience come back to all this User Account horror?

As you aren’t that experienced, starting as simple as possible would be my recommendation.

… get stumped in stupid UI problems …

Do you know HTML or CSS? If not you should probably try something like elm-ui which is easier to use when you don’t know HTML/CSS.

1 Like

Removing saved state would make the project a lot simpler.

How interested you are about being able to save state versus the text adventure mechanics?

But even without saved state, this would be quite large project for a beginner, possibly even impossible.

I suggest writing it first as a headless command-line REPL so that you don’t need to make decisions about view code and browser packaging now. @jxxcarlson posted a great example of a REPL harness on this forum in April. (You might also want to explore how the recently-released elm-spa v5 builds the great user interface of its interactive CLI when starting a new project. It’s written in Elm.)

There are a lot of great ElmConf and ElmConf Europe talks on YouTube that relate to game programming, including this one by Jeff Schomay that you can look to for inspiration.

1 Like

Thanks for the answers! :heart:

Sounds great :smiley:

That’s awesome news :smiley:

I know a tiny bit of HTML/CSS from a thousand years ago, that’s why I am more than happy to go the elm-ui way. Still…

It’s kind of critical, I think?
Players start the game… they get up to a point in the adventure… and then what?
If they reload the page everything is lost?
If they elect to stop playing and resume another time, they can’t?
But maybe it could still be ok without it, just for the initial MVP :thinking:

This might be the way to go for a first step. I’ll look into the links you provided :smiley:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.