2014년 12월 26일 금요일

Need help to begin a program

Hello everyone, I'm Baptiste ans I use app inventor since 2 months. I already finish a simple Quizz and now i would like to start a new project.
I want to do a story where you have a lot of choices during your journey.

Like this: 

To program this game I have made 3 lists: 1) Pictures     2) Narrations    3) Choices

But I dont understand how I can realise this scheme:
I waiting your solution :) 



What you are doing is trying to program an Adventure game.  Here are some hints:


A project in AI Classic (unfortunately you have to have a copy of AI on your PC to do this)  http://jlaasonen.me/2010/10/12/making-a-simple-adventure-game-with-app-inventor/  


The Classic Text Based Adventure game Hunt the Wumpus shown here may give you some ideas  http://www.codeproject.com/Articles/786118/Hunt-the-Wumpus
The example is in the Ruby language, the principles apply to AI2 too.  Be aware, this example is very involved.



You can do something much simplier using decision trees (if .. then statements in App Inventor).  images, and labels in different combinations.    Part of what you want to do would be similar to one of the Quiz tutorials here:  http://appinventor.mit.edu/explore/ai2/quizme.html  



To program this game I have made 3 lists: 1) Pictures     2) Narrations    3) Choices
the pictures and narration lists are simple lists, the choices list is a list of lists, each sublist has 2 items, the text for choice 1 and the text for choice 2
let me suggest to prepare a 4th list, which is again a list of lists and holds the index of the next item to go to

example, let's assume, the user selected choice 2, now get the corresponding index from the index list, then display the new image, narration and corresponding choices


댓글 없음:

댓글 쓰기