Answer the question
In order to leave comments, you need to log in
Creating a chat quest. How to do it?
So. I want to create a game similar to "Taiga" for android, but with a different plot. The bottom line is that the character turns to the player in some messenger with a request for help. During their interaction, the player is given options to choose from.
How can I create this chat so that SMS goes up as it arrives?
Can this be done in Java?
I'm a noob in this thread, so sorry for stupid questions :p
Answer the question
In order to leave comments, you need to log in
How can I create this chat so that SMS goes up as it arrives?
No, SMS is not available to third-party applications. If the standard phone application does not know how to move SMS up, then nothing.
You can write your own "messenger", or make a bot for telegram.
It is also possible in Java.
But here the question is - if you want a game - hire programmers, let them write to you.
If you want to learn how to program - learn to program first something simpler, and then ask questions.
Hello. Just the other day I'm doing a similar thing, but in HTML+JS. Yes, your project can be implemented in Java - it makes things more difficult. True, if we are talking about an Android application, you will need to casually delve into the nuances of xml, perhaps JSON or something else. Your question as a whole is quite broad and it is difficult to answer it with specifics. However, here are some of my personal biased tips. You need to decompose your task into separate parts:
1). Write a story tree. What questions lead to what consequences. I have implemented this through JSON: rioran.ru/js/lit-rpg-questions.js so that you can dynamically approach the number of answers to the question. However, it makes sense to store in tabular form - it's easier to edit.
2). Consider the mechanics. Are additional characteristics involved, the inventory of the hero? Do they limit response options? According to the link in paragraph "1" I also have part of the mechanics "wired" into questions. For example, the "change_health" parameter contains an array of values whose index corresponds to the index of the answer selected by the player. And on the main page rioran.ru/lit-rpg , procedures for processing this parameter are implemented, if it is in the question. The JavaScript language may differ from Java in places, although it is somewhat similar.
3). Think over and implement the interface with which the player will work. If we are talking about the format of a pseudo-chat with a hero, then you can:
- take the lower part of the screen under the buttons for auto-selection of the answer. That is, the hero asks "What should I do? My options are: 1 ... 2 ... 3 ..." and buttons with numbers appear at the bottom. You will need to learn how to generate an arbitrary number of buttons, learn how to align them in width so that they fill the screen normally (I recommend clinging to % of the width, since the pixels will be different on different screens), learn how to assign the corresponding command to the buttons (you can peep the idea in my demo, where I have implemented a selection of multiple values). You can also get additional ideas for implementing buttons by looking at their implementation in Telegram, for example.
- Part of the screen above the area for buttons can be taken under the field for entering arbitrary text. This will create an atmospheric chat and allow the player, for example, to introduce himself and give names to some objects. In a mobile application, this is done by creating a basic text entry field. You will need to write a procedure to clear this input field.
- And finally, the pseudo-chat field will occupy the main part of the screen. It makes sense to do it through the WebView class https://developer.android.com/guide/webappsyou will need to learn how to add fields with text, learn how to give these fields a width, for example 95% of the screen, and set different indents for the player's remarks, for example, to the right, to the interlocutor's remarks to the left. With a triangle pointing to the side of the speaker - for starters, I recommend scoring, a beautiful element that is optional, but will gobble up a lot of time. It's best to drink last. All messages will be endlessly added from below and the player will always be able to trace the entire history of correspondence. In a WebView which is HTML based, this is relatively easy to do.
I want to note that for the starting project you have chosen a relatively simple and interesting idea, which is already half the success. I advise you to implement in such a minimal configuration and do any complications after this version is ready (for example, an idea for a complication: the player can switch between chats with several heroes). If there is little programming experience, simplify the mechanics as much as possible and keep your imagination in check. And then you run the risk of abandoning the project without finishing it. Consider that for the average person with no programming experience, your idea may take about a week of work from morning to evening. Without taking into account the question-answer tree. Good luck!
Alternatively, you can first work out the story in the "non-programmer" engines Twine or Ink . When the plot takes shape and becomes interesting, then it will be possible to think about the appearance and publication in the store (any sane programmer will make you an application for mobile from these engines).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question