Wow guys thanks a lot for trying to help!
@Jen.looper
Jen,
Great tutorial! it helped me very much and im probably gonna use what you covered for the push notifications.
Here are some bullet points for what im trying to do:
1)I have a new table in parse.com , called “cards”, this table has the following columns:
objectID(string), name(string), email (string), createdAt(Date), updatedAt(Date), cardData (object).
The cardData column is basically a table object, it has all the player’s card data in it.
As you see there is no ‘password’ column, I verify the user’s password in the game itself rather then uploading it to the cloud.
- New user - opens the game for the first time, is asked to register to the ‘cards’ database I mentioned in (1).
The user’s input is:
name
email
password (stored and saved on the device only)
The device then creates a new user (via the signUp function) that means a new row was added to the ‘cards’ table in Parse.
-
User wants to battle with his cards, he goes into the ‘battle scene’
-
The device is connecting to Parse.com, and downloads 10 random opponents from the database.
by downloads 10 opponents I mean:
There are 10 local tables in the battleScene.lua file
[lua]
local player1={}
local player2={}
local player3={}
local player4={}
– you got the point
[/lua]
Each table will represent an opponent downloaded from the ‘cards’ table
- The downloaded opponents are presented to the user as buttons from which he can pick one to battle against.
6)Thats it, the rest of the battle is made by the logic on the device, after the battle ends, the device will update the user’s new statistics to the “cards” table. (A simple update to the cardData object that is in the table).
When I was first introduced to Parse, I though It was perfect for creating this type of database, but I dont want the device to download the whole database every time A user battles, I want only 10 random opponents to be downloaded.
Maybe Parse is not the right choice for this, but if so, what are the alternatives? Im sure im not the first dev whos looking for this type of thing lol
@SegaBoy
The stackoverflow question is when I was trying to mess around with ‘CloudCode’ , that supports javascript (I have zero knowledge in javascript)
Im interesting to know what was your approach with Facebook friends and multiplayer…
Roy.