user700508
user700508

Reputation: 81

How to set up an android peer to peer networking for a game?

So after finding out how to make transparencies in my images, i was able to use some of my friends images properly for our game. Our goal was to have a game where 3 people who were next to each other, could play the game together. The idea was that you would point and click and fight off waves of little bad guys. I have the point and click, the shooting, the spawning bad guys, and the collision detection ,but now I want to learn about peer to peer networking on the android? Or is this not how you network? Am i completely wrong? How would you set up a basic network of no more than 4 local people? stack overflow said that was opinionated, but i was just more curious of ways to avoid common pitfalls and where to turn for this.{

Thank you,

Upvotes: 2

Views: 2848

Answers (2)

misterbaykal
misterbaykal

Reputation: 542

As dbryson suggested, you can use WiFi Direct. However it only works for OS 4.0 ICS and higher. Here are some links:

http://developer.android.com/guide/topics/wireless/wifip2p.html

http://developer.android.com/resources/samples/WiFiDirectDemo/index.html

Upvotes: 0

dbryson
dbryson

Reputation: 6127

There are a couple different ways you can do this, it really depends on which one is the best fit for your situation.

  • If you want a complete ad-hoc approach and you have the right phone, take a look at Wifi Direct.
  • Use a Web server to coordinate message exchanges
  • Depending on your Game and the distance between players you may be able to use a small Bluetooth network

Upvotes: 1

Related Questions