2017년 4월 20일 목요일

Online game in app inventor


Well I asked for help in the forum about this and I received an answer. Someone recommended me the app Rock Paper Scissors and gave me a link.

Im studying the game of rock paper scissors and it seems that there are missing procedures. Can someone tell me the procedures called "Web1" and "flush_all_fdbs"? The app call them in the blocks:

"call Web1.JsonTextDecodejsonText" en "When fdbGetAllPending.Gotvalue.do" (page 19/45)
"call flush_all_fdbs" en "When Screen1.Initialize.do" (page 9/45)

I need it to keep understanding the app. So far its been helpful to me Im learning more than the online part of it.

--
app
that "someone" was ABG in your other thread here https://groups.google.com/d/msg/mitappinventortest/wEUx_w-ukFs/-v105DO1HwAJ

the JsonTextDecode method you will find in the web component and the web component you can find in the Connectivity drawer
the other method is a custom procedure, see also http://appinventor.mit.edu/explore/ai2/support/blocks/procedures.html

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  
How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the
 Top 5 Tips: How to learn App Inventor

You will not find a tutorial, which does exactly what you are looking for. But doing the tutorials (not only reading a little bit) help you to understand, how things are working. This is important and this is the first step to do.

-- 
Yes, that was my thread but i couldnt type there anymore, it was closed. I was studying the app, I planned to answer him when I finished it.
Well I received classes of app inventor but it ended a couple of weeks before firebase was released. Because of time too there were a few other things that wasnt treated in class.
Anyway, thanks for that information, I'll get the links.

-- 
I have updated the doc to include the missing fdb flush procedure, and added a link to the MIT doc for JSON decoding.
Reminder - the app is incomplete and abandoned.
Maybe you will find more recent apps in the Firebase section of this FAQ ...

-- 
Thank you Mr Getzler, I'll keep studying your app with the new changes.
I have another question, is it possible to have 2 types of games? I mean 1 online (using firebase) and the other "LAN", (using blootooth).
I would also like to check another online game that uses blootooth, for 2 reasons: the first is that It would be great too for my app and the 
second is because we didnt treat the blootooth in classes.

-- 
Here's a board search for firebase game:
You aren't the first to ask that question.

A purely  BlueTooth based game would probably need BlueTooth Client and Server compnents.
puravidaapps btchat is the simplest peer to peer foundation to use for passing moves between players.

You would have to create your own scheme for encoding player moves as messages,
and also decide on messages like "whose move is it, I thought it was your move",
"what was your move number n, I missed it", "My move number n+1 is ... ",
"Would you like to start a game?" ,  "Okay, my first move is ....", 
"WHAT?  That move is impossible"
etc.

-- 

댓글 없음:

댓글 쓰기