trading pet system between players (javascript, php...) - system

Hi everyone and sorry in advance for my horrible english.
I'm making an adoptable pet site project and I want to built a system where players can exchange their creatures between them. But my problem ? I don't know where to start. With my DB or my DOM I don't kwow at all. How can I stock the creatures (who already exists) and offers to the other.
I have some bases in javascripts and php, it's just the way I can make it who sound wrong on my brain.
Thank you for the help

There are several ways to realize that. I will give you a basic idea of a possible software architecture.
A database stores all the information. So you might think about entities. In your case, creatures and players are entities. You can also create an entity to connect both and realize the ownership of those creatures. Let's call it creature_player_assignments. This means, that you could assign N creatures to M players. Or the other way around: M players can have N creatures. (n:m relationship). You don't need it, if you only want to assign a creature to only one player. In this case you could direclty assign the creature to a player by storing something unique from the player in the creature (like the player ID or something). So, N creatures are assigned to 1 player, or the other way around: One player can have multiple creatures (1:n relationship).
A server connects to the database and gets the information you need. You can use PHP and some libraries to do so.
The same server implements an API to make the information accessible from outside. Think about a RESTful service or something.
The client sends requests to the server using the implemented API. You could do that using JavaScript and fetch.
In the end it is up to you, to design the architecture. Try to think about your software first and plan it before you start smashing the keyboard.

Related

Is it feasible to let users run dedicated videogame servers with no user accounts?

I apologise if something like this has been answered before, I just can't figure out a good way to word my question well enough to include all details about my problem.
I'd like users to be able to host servers for my indie game in a way virtually identical to, for example, Minecraft. I don't want any official servers, the game is mostly intended to be played with friends and not random strangers.
I've thought of many ways to accomplish this but I could never solve one important detail - I want the server to be able to remember users and put them where they left off when they reconnect (give them their character, the character's inventory, etc).
But any solution I could find or think of either made it potentially very easy to steal someone's character and connect to the server pretending to be them, or required me to make players have a way to register with accounts, something I can't afford to host myself.
I guess what I need is a way for the server to send a token to a new connecting player, and then have a way to see if the player sending that token back is the same person, and not an attempt to replicate the token. That to me sounds like public key cryptography, but the game engine I'm using doesn't seem to have any libraries for that (unsurprisingly), and I certainly am not qualified to make a library like that myself. But maybe there's an easier solution I'm somehow missing.
This might be a stupid question, but I hope it's worth a try asking. Thank you in advance for any help. Sorry I was so wordy by the way.
TLDR: I want users to host game servers that can remember reconnecting players without risk of players' progress being stolen.
If you have not already, look into sessions. Session cookies. But also setting up a basic log in system with php or whatever server code your server uses is not hard, and most basic hosting provide the mysql and php needed to do a basic log in page, you just have to code it yourself.

Can I connect Life360 to MightyCall/Fare Harbor through Zapier? Or do I need to use APIs or?

Hi Overstock flow peoples,
I've been in the startup/digital marketing scene and know some things on analytics, html/css, and marketing automations and have recently picked up some SQL/Tableau. Im coming here looking for possibly help/recs on connecting a marketing system/inflow that uses Fare Harbor/Mighty Call/Life 360 and I'm wondering if I could automate things with Zapier (or some other platform), or if I'd have to do it all with development or using APIs or something.
I work with a company that does some travel taxiing/luggage help for travelers. Im looking to see if Zapier (or any other system) would be able to automate some tasks.
So clients book through Fare Harbor, their data goes into our system through Mighty Call, and we give updates to the clients on the drivers ETAs manually through Life360 (like the owner actually TEXTS people directly).
Would anyone here know if there's a way to use Zapier to automate the ETA/communication updates of Life360 through Zapier? (Or would I have to develop something completely on its own to do this?). Or know if there's any other type of software to do this immediately off the top of your head? (etc). Otherwise we have to text all these updates manually and we're trying to get away from doing things that way.
Sorry if this comes off as a rookie post, as its my first direct post on Stack Overflow, although I've used this website a number of times to configure CSS before and other ish (and this isnt my first rodeo). Any advice or direction that could be given would be IMMENSELY helpful.

"Remote" login on a 3rd party website

I'm having a rather general question, in the sense that I'm not even sure that it's possible. I'm trying to gather some opinions about it, coming from more experienced people.
Imagine, that I'm a member of three (just to say a number) online book stores. Over the years I have bought quite some books on all three accounts. Now, let's say I want to create an application that can login to these three accounts and do server requests to sort all my books in a single list. So that I can access my books from a single location, similar to what Pidgin or Trillian does with multiple instant messenger services.
Is that even a realistic option? Of course I dont know which server requests I would have to do and/or in which data format the data will be sent back. Assuming that this doesn't infringe every EULA out there, how would you approach this?
It's all a bit vague, but that's all I have at the moment :)
thanks a lot in advance.
I'm afraid you'll have to talk to each server via its own API (assuming it has one). You can then get the relevant info from each server and process it in your app (e.g. get the common info, aggregate it in a single list, sort...).
This is more or less what pidgin/trillian do.
IMHO the more interesting problem occurs when you want to buy a new book via your app :)

Multiplayer game using UDP: How do the players get to know each other?

I'm making a multiplayer mode for my game and I decided to use UDP.
Since all the data is sent p2p, between the players, I have no server.
But how do the players get to know each other in first place?
Do I need a server dedicated to do this job or is there any other way?
Thanks.
There's several ways you can do this.
You could use a server dedicated to it.
You could let users enter in an IP address for another player.
You could use something like Bonjour.
Most networked multiplayer games use some form of service for listing players, and I can't think of many examples where it would be advisable to not use a server for this. Keep in mind that it doesn't have to be a dedicated server, you can simply have one of the clients play a server role for the listing, even if this is the only server type behavior needed by the game. This way each player will only have to know the one IP, and there's even ways around that if it's LAN play.

Avoid Leaderboard Hacking on Game Center

Has anyone found a way to avoid leaderbaord hacking on Game Center or at least make it more complicated?
You can see a video of HackCenter, a Cydia app that lets you submit any score you want here: Hack Center
Even though that application is not supposed to be available on the Cydia Store we've all seen scores that are obviously fake on several games on the AppStore. Unlike the score submitted on that video, the fake scores are usually ridiculously high and they discourage other players, since they can never reach the top of the leaderboard.
I haven't been able to find out how the hack is accomplished (I presume they intersect the http call and just replace the score parameter with whatever they want?).
Any insight is appreciated.
The problem stems from allowing users to generate their own score data device-side. This would be a lot harder if all the score related calculations were done server-side and then posted to the score-board (I don't know how your app works, so I can't recommend a specific technique).
I think the BEST thing you can do is record data about HOW they got the really high score for review later by you. That may be impossible depending on your game's structure. It also might be forge-able depending on your games structure. For example, some game scores are impossible to get in-game just due to the physics on how the game works. This in my opinion is your best defense against it. Sadly, that requires monitoring it all the time....
Also, even if you can verify fake scores, someone could continually forge fake scores all day long and you'll never be able to keep up with it. Someones score submission bot will win in the end. It's not human, you are. It can post fake scores all day, you can't watch for fake ones all day, you can't verify 1000s of fake submissions. Trying to verify anything that is generated user-side (such as device ID, app being installed, etc...) is pointless. It can be forged. IP addresses are meaningless too. Your app is a on a mobile platform that can get a brand new IP all they want from the cell company. Tracking single legit real users is very hard if someone wants to hide from you because of this.
Maybe you can have some kind of app purchase verification with the help of Apple too. That would make it easier for you to ban offenders. They would have to pay you to forge your leaderboard, lol.
That's just my 2 cents, I hope it helps.
Because they're doing a http intercept, there's unfortunately nothing you can do. I've even found setting the max score for the leaderboard in itunes connect has no effect.
A game I worked on never serilaised the score to disk - so it couldn't have been changed there - and set max score to 30m. Yet the leaderboard was full with IntMax scores within hours of launching.
Hopefully Apple will have some fixes coming in WDC13 because as it stands, the worldwide leaderboards are useless.
You could try checking if the user has that thing installed I guess and then disable them from entering a high score if it they have the app.
I personally would just check for Cydia:
[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:#"cydia://"]]
I am not sure what the url for Hack Center is exactly but, maybe you could try guessing it a couple times. I would guess 'cydia://hack_center' or something like that. And then once you find the url replace it 'cydia://' with it.
Have two hi score tables:those with cydia, those without :P
You can also set up your own server and use proper authentication and encrypted channels to upload score and then just compare whats in your server vs whats in GameCenter... You still need to clean up the leaderboard, but at least you will know what to remediate and which users to put on blacklist.