Can I change my table id using show package contents of the project file in finder on Mac?

wayback_gamerwayback_gamer USMember, PRO Posts: 124

If I change my table id to match my table online will this cause the project not to work? I need to make my game salad table id the same as my online table id I think for my plan to work. Im not using a personal server, but an online API and table that has a unique id. Can I just deconstruct the JSON output of the query and receive data from a table with a different table id than my game salad table id? Any answers would be greatly appreciated!

Best Answer

  • HopscotchHopscotch Posts: 2,782
    edited November 2015 Accepted Answer

    @wayback_gamer said:
    @Hopscotch so I can use the async system and make a system to compensate for the lag and make a racing and shooting multiplayer game? Or should I wait and make a single player game with AI racers and wait?

    @wayback_gamer I hate to demoralize a developer who is willing to experiment and bend existing systems in creative ways, but as you are talking about a races/shooter, my answer is wait. There are worlds between an async and real-time multiplayer game. You will not be able to compensate for the lag to the extent that the user will have a fun experience.

    There may be a fun alternative, save the position/speed of one player to a table. Then let that player challenge a friend, transmit the table to that player and let him race against the ghost of the first player. (not simple, but very doable)

    @wayback_gamer said:
    From what I have read one must create a game state in the database and make predictions based on time and transmission size to compensate for lag. This is how synchronous multiplayer is described in an article I read.

    This is correct, however it is based on a socketed connection with UDP as protocol. Basically the server continuously broadcasts to all players simultaneously, without the client needing to request updates. Here you will typically have 20 updates/second. In the above async model you will be lucky to get an average 2 updates/second.

Answers

  • HopscotchHopscotch Member, PRO Posts: 2,782
    edited November 2015
  • wayback_gamerwayback_gamer USMember, PRO Posts: 124

    @Hopscotch Im just probing for some solid info right now as I experiment with the API. To answer your question the API creates an encoded id for the table, and I've found no way to change it. However, I will look into how its constructed and see if I can somehow reverse engineer a work around. Thanks for answering, I didn't want to break anything and changing the table id within game salad seemed like a good way to break something. Are you interested in Synchronous multiplayer @Hopscotch ?? Thats what Im after. Please elaborate on the network send and receive behaviors anyone with experience using them. Why does the game momentarily stop to get data from an online source and put it in the table within Gamesalad? Why can't I do more with the Open URL? I have an online table ready to send me data and allow me to post data, delete data, everything like a mysql database. I just need the Open URL to be more flexible. I need to be able to act on the data at the end of the URL opened. To capture the data and put it in a variable instead of a table would be ideal in my opinion as it would be done behind the scenes and wouldn't pause to post the data to the Gamesalad table. Anyone care to offer comments? That would be of the greatest help.

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @wayback_gamer said:
    To capture the data and put it in a variable instead of a table would be ideal in my opinion as it would be done behind the scenes and wouldn't pause to post the data to the Gamesalad table.

    I do not understand what you mean here. If you use the Open URL behavior with parameters, then you are sending a limited amount of data to the server, along with a request for web content. The server in return sends you an html page. This is what it is designed to do.

    The Network Send and Get behaviors are for the exchange of large portions of data between the server and game, via JSON format.

    You can pass parameters to the server via the Network Get behavior, just like in the Open URL behavior. The returned results will be written to a table though, as this is GameSalad's/LUA's "array". GS does all the unpacking of the returned data for you.

    It is still asynchronous communication though, no matter how often you query the server per second.

    True Synchronous multiplayer is based on a different protocol and is a completely different kettle of fish.

  • wayback_gamerwayback_gamer USMember, PRO Posts: 124

    Thanks @Hopscotch . Im trying to use RESTful URL to query the data from an online source aka Google Fusion Table. Id like to make games that send data to a table updating things like player x and y. Then gather the information about the other players and plot it. Can this be done and be up to speed using the network behaviors? From reading in the forums I determined there would be a lag if I use the network behaviors, so I tried to plan a work around using Google Fusion Tables and Restful URL query parameters through the browser.

  • wayback_gamerwayback_gamer USMember, PRO Posts: 124

    @ Hopscotch and @jonmulcahy and anyone else who reads this My plan is to use an actor out of bounds that constantly loops through the query for enemy X and Y and sets the result to local variable within the actor which is constrained to a global attribute for the enemy which would of course be constrained to the global. If I use a personal server and php and Gamesald network behaviors, more specifically the Get behavior, is there a pause or delay in Getting the data, which would lag up my 2d side scroll like race game with say 3 other players? I would really like to know so I don't spend trying if its definitely not going to work.

  • HopscotchHopscotch Member, PRO Posts: 2,782
    edited November 2015

    @wayback_gamer, the GS Networking uses a TCP connection. This can never give you real-time updates across multiple instances of your game. Especially not a racing or shooter game.

    GameSalad supports async multiplayer. It is not designed for real-time synchronous multiplayer.

    Added to this, a fast paced real-time multiplayer game does not "just work" because it uses the UDP protocol and sockets. Both server and client needs to handle complicated "look-ahead" code since there will always be lag, especially on mobile networks.

    The same goes for networking apis offered by other tools. Real-time multiplayer is extremely difficult and very specific to the game at hand.

  • wayback_gamerwayback_gamer USMember, PRO Posts: 124

    @Hopscotch so I can use the async system and make a system to compensate for the lag and make a racing and shooting multiplayer game? Or should I wait and make a single player game with AI racers and wait? From what I have read one must create a game state in the database and make predictions based on time and transmission size to compensate for lag. This is how synchronous multiplayer is described in an article I read.

  • wayback_gamerwayback_gamer USMember, PRO Posts: 124

    Thanks for elaborating @Hopscotch . Ive been teaching myself some game programming for almost two years now. Some of this stuff is very hard to comprehend. So its probably not possible to make a socketed connection

  • ArmellineArmelline Member, PRO Posts: 5,327

    I can confirm that in principle you can save a player's race to a table and then "play it back". Think racing your ghost in the old Mario Kart games. I did this while prototyping a game a while ago. I couldn't, though, no matter what I did, get it pixel perfect in the playback accuracy. I've learned a lot since I tried that, though. Perhaps I'd have more success now. For my purposes this was a massive problem, but for a racing game or something like that it's not likely to really be one.

  • wayback_gamerwayback_gamer USMember, PRO Posts: 124

    Thanks for that bit of info @Armelline much appreciated.

Sign In or Register to comment.