XBOX 360 XNA connect to sql server
I am working on an XNA game and I want to ma开发者_Go百科ke use of an SQL Database to save my high score, but I heard a lot of people say that Xbox 360 cannot connect to remote server. Can anyone tell me why is that and does that mean I cannot use database to save my high score?
Edit:
Ok sorry, what I meant was how can I set up connection between XBOX to SQL server over the Internet.
This is not a supported scenario right now. The only network connectivity that XNA/XBox games can have is directly to the live network over the live APIs.
If you want leaderboards, you'll have to do what others have done and implement a peer to peer sharing system where you swap leaderboard data every time you connect to another player.
I assume you want to have an online highscore where people can see each others highscore. It's not possible to make connections to the internet from an XNA game on the Xbox 360. I believe it's a security thing. You could look into alternative solutions as suggested here
I initially thought you would be able to use SQL Server Compact 3.5, but without System.Data
support it's a no-go.
You could use the Microsoft.Xna.Framework.Storage Namespace or perhaps SQLite might suit your needs.
精彩评论