I'm trying to make a text game. Would it be wrong if I did like this? (still learning)

0 favourites
  • 7 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • I want to implement a text game with images and option like a gamebook, I'm sending the capx on how I did it and I would like you guys to take a look at the event sheet. It's very simple and basic, but as a beginner, I think it's the most understandable way to do it. I know It's easy to get lost with the variable and mess things up, but I'm thinking that if I going foward with this, I would use some stickers to keep track of the story (just like in bandersnatch) And I think that I will be able to organize things like that. The file:

    dropbox.com/scl/fi/odii8ldsvvxec6u94zucz/textgametest.capx

    The Question is:

    - Is there a better way to do it? (Please, don't suggest overcomplicated stuff like xml, json files or arrays. I tried to learn these things, but it goes too over my head. Of course, unless you have a step by step compilation of videos that teaches how to use that, for what I'm trying to do, you're welcomed)

    - and the most important...If I keep doing this way, will it affect my game's performance?

  • That's the most ineffective way to make such games. You have to create separate events for every screen, every choice option. If you continue developing the game like this you will soon realize that it becomes unmanageable.

    In C3 there is a new feature called Flowcharts. I didn't have time to play with it, but I imagine it can be a huge help in creating text based adventure games.

    I C2 I would suggest using some data object - JSON, XML or an array to organize all texts and choices, and create connections between them.

  • I understand, thank you very much! anyway, could you explain why using data files (xml etc..) would be more efficient?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Because you can build an efficient and scalable system.

    Imagine you create a JSON file with records like this:

    {
     "bar_dialogue": {
     "text": "What you want? says one of the bad guys",
     "answers": {
     "answer1": {"text": "I want milk", "xp": 5, "next": "bar_fight"},
     "answer2": {"text": "I want wiskey", "xp": 7, "next": "morning_hangover"},
     "answer3": {"text": "I want to speak to your boss", "xp": 10, "next": "boss_dialogue", "itemRequired": "boss_invitation"}
     }
     }
    }
    

    It contains all information about each screen - the question, answers, the amount of XP players gain when give each answer, where to go next after each answer etc.

    Once you program the events that can parse and process this JSON, you can create practically infinite games without having to modify or add more code.

  • I'd say there is nothing wrong with the way you're doing it. It works and it's easy enough to understand and modify.

    A lot of the events have a similar structure so yeah you could make it so most of it as data instead of all events. That has the benefit of being easier to change how it works with a few events instead of changing all the events. The data can be array/json/xml/something else but it comes down to what you want to do.

  • Oh boi, thank you guys very much! It would be too much to ask for suggestions about how to learn this DATA stuff for what I'm trying to do? (preferably xml or array cus I still use c2 but I could still try to buy c3 for the json)

  • There are several addons for working with JSON in C2. I would advice learning JSON since it's easier and more popular than XML.

    construct.net/en/forum/construct-2/addons-29/plugin-json-75330

    construct.net/en/forum/construct-2/addons-29/plugin-json-114772

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)