Clash Royale is another online multiplayer game that you should check out on your Android phone. The game has a huge fan following, and is actually a spin-off from the popular strategy game Clash of Clans. Clash Royale is a card based game where you fight against other players in a PvP battle to prove yourself the best player out there. Chess With Friends for Android/iOS. Chess with Friends is a popular multiplayer android chess game that allows you to challenge your friends and family on Facebook. And show them that you are the real chess master. The game has been developed by the famous company Zynga.
I am creating a multiplayer android game as a part of my coursework. This is my first game. I intended to allow users to connect to the game over a simple network. I don't want to use internet at all hence I wont be using the android game services. How do I go about this. I have no clue at all. I have tried various tutorials but all of them are using a central game server. I just want to create a simple Client - Server network. One user will host a game and others will join.
2 Answers
it's my first time answering a question here. I usually just read here in stackoverflow. I'm also currently working on my first game. It connects devices using wifi peer-to-peer or WifiDirect (without a wifi hotspot). It requires high version of android OS (4.0 or 4.1?) but I believe you can also try the other way on which the devices needs to connect in the same wifi hotspot for lower OS version requirements. The latter, I haven't tried yet.
After I connect the devices on the same network (peer-to-peer), I use sockets to exchange data between them. I use serializable objects for sending data. I don't know if it's the best way but it works for me.
My game can connect more than two players in wifi peer-to-peer. One device acts as the network owner (and also the game server).
See android's tutorial/documentation for WifiDirect connection :http://developer.android.com/training/connect-devices-wirelessly/wifi-direct.htmlBe sure to read also the adjacent lessons.
Also, Sockets must be used with Threads so you also need to read about it if haven't.
Hope I helped ^^
I finally got the solution and made the Android application. Simply used java socket programming. It works on Hotspot. This works on client - server framework.Please find the code here and contact me if you require any assistance.
and this is the link to the app
Hope this helps you.
Not the answer you're looking for? Browse other questions tagged androidclient-servermultiplayerlan or ask your own question.
Previously, I’ve shared some good local Bluetooth multiplayer games for Android. However, if you’d rather play with your friends over a local WiFi connection then you got covered there too. Here are some of the best WiFi multiplayer games for Android.
1. Doodle Army 2: Mini Militia
Doodle Army 2: Mini Militia is an intense multiplayer shooting game that can be played with six other players over WiFi. The game provides you with a good range of weapons like flamethrower, sniper, shotgun, etc., to take down your opponents. You can even train under a sarge to sharpen your skills before the actual game.
Price: The base game is free and contains ads. Some weapons and gameplay feature like dual-wielding need to be unlocked via in-app purchases.
2. Racers Vs Cops: Multiplayer
As you can tell from the game name itself, Racers Vs Cops is not your traditional racing game. In the game, players can either choose to be a cop or a racer. If you are a cop then you need to catch the racer before the player completes the race. If you chose to be a racer then you need to complete the race without being caught. The game has a good physics engine and a wide range of cars to chose from.
Price: The base game is free and contains ads. The game uses in-game currency for upgrades. You can earn in-game currency by playing or via in-app purchases.
3. Badminton League
Badminton League is a fun game where you can play one on one with your friends via WiFi, bet, and win in-game coins. The game’s physics engine is very good at emulating the rocket and shuttlecock. You can also create and customize your own character and perform cool stunts.
Price: The base game is free but you can purchase additional items like rockets, character customizations, etc., via in-app purchases.
4. Crazy Racing
Crazy Racing is a game where you chase while performing insane stunts and shooting with provided weapons to take down the other player. The game has multiple cars each with their own characteristics and properties. Additionally, you can play in six different locations like industrial zone, extraterrestrial route, countryside, etc.
Price: The game is free, contains ads and in-app purchases.
5. NBA JAM
If you are into Basket Ball then NBA JAM is for you. In the game, you can play with real players and perform cool moves and stunts. The game offers four different modes. When playing over WiFi, you can play one on one with your friend.
Price: The game is free, contains ads and in-app purchases.
6. Terraria
Terraria is a cool pixelated game where you dig, build, and fight. The game closely resembles Minecraft but with better storytelling and combat. The game contains multiple worlds, islands, enemy types, weapons, pets, dynamic day/night cycles, etc. If you want to, you can create your own worlds and expand them as needed.
Price: This is a completely paid game. You can purchase it directly from Play Store for $4.99.
7. Crossy Road
Crossy Road is one of the most popular and fun games where you are trying to help a chicken and other pop art inspired characters to cross busy roads, train tracks, and rivers. If you like games that require intense concentration then Crossy Road is for you.
Price: The game is free, contains ads and in-app purchases.
8. Asphalt 8: Airborne
When it comes to racing games, Asphalt 8 Airborne is the most popular game. The best thing about the game is that it has 10’s of cars, over 40 different tracks with sixteen different settings, over a half-a-dozen seasons with 400+ events. As for the multiplayer functionality, you can play with up to eight players.
Price: The game is free, contains a ton of ads and a ton more in-app purchases for each and everything.
9. Mini Motor Racing
If car racing with a traditional first person or third person perspective is not your jam then you can try Mini Motor Racing. The game has top-down camera perspective with over a dozen of awesome tiny cars and 50+ tracks to race on. What’s good about Mini Motor Racing game is that there are multiple types of cars like the hatch, big-rig, school bus, hot rod, etc. Over a WiFi, you can play with up to four players.
Price: The game is free ads and in-app purchases to unlock cars, skins, and tracks.
10. Pixel Gun 3D (Pocket Edition)
Though the game screams the resemblance with Minecraft, it is much more colorful and vibrant and has unique weapons and game modes to get yourself lost in time. The best thing about the Pixel Gun 3D is that you can battle your friends over WiFi or with other online players in a death match and show of your skills in using awesome weaponry like the magic bow, M16 rifle, etc.
Price: The game is free, contains ads and in-app purchases.
11. Tanks Battle
If you are not in the mood for yet another intense game and looking for a simple and straightforward game then Tanks Battle is for you. Just join the local network with your friend and battle one on one. The player who wins three rounds is the winner.
Price: The game is free and contains ads.
12. Minecraft: Pocket Edition
Talking about Minecraft inspired games, do you know that you can actually play Minecraft with your friends over WiFi? If you are a Minecraft lover then you should definitely try its local multiplayer mode to get most out of the game.
Price: This is a paid game. You can purchase the game directly from Google Play Store for $6.99.
13. Spaceteam
Spaceteam is unlike any game on this list. The game’s main goal is to push you and your friends to the limit in terms of cooperation, teamwork, pushing buttons, and yelling. In case you are wondering, the reason for yelling is that you and your friends need to push buttons and switches and drag sliders according to the time sensitive instructions to rescue the spaceship. This game demands a good coordination between you and your friends.
Price: The game is free and contains in-app purchases.
14. Wild Blood
If you like fantasy games with good graphics, intense battles, and epic fights then Wild Blood is a pretty good game to try. When playing over WiFi, you can play with up to eight players in capture the flag mode or 4 vs 4 deathmatches.
Price: The game is free and contains in-app purchases.
15. Battle Slimes
Battle Slimes is a platformer and shooter game where you are tasked to control and takedown slimy, bouncy, and speedy blobs. While playing, you get various power-ups to aid you in taking down your friends. If you like platformer type games then Battle Slimes is a pretty good game to try.
Price: The game is free and contains ads.
16. Special Forces Group 2
Special Forces Group 2 is your traditional third-person shooting game with a lot of weapons, explosive, and maps. The game has five different modes like classic, resurrection, capture the flag, zombie, and bomb mode. If you want to, you can customize your guns with a variety of skin packs.
Price: The game is free, contains ads and in-app purchases.
17. BombSquad
BombSquad is a multiplayer fighting game where each player can throw bombs at the other, trying to defeat them in arena style combat. BombSquad supports touch screens as well as a variety of controllers so all your friends can get in on the action.
Price: Free, contains ads and in-app purchases.
18. Skullduggery
Skullduggery is multiplayer game similar to Angry Birds i.e. it utilizes a drag and shoot method similar in style
Price: Free and contains ads, which can be removed with a singular in-app-purchase.
19. Fotonica
Endless runner that consists of running in a first-person view displayed to the player through line art.
20. Ready Steady Bang
Ready Steady Bang is a one touch fire shootout game where you play face-to-face with a friend on a single screen in 2 player mode or pit your trigger finger against 10 of the fastest outlaws in town.
Price: Free, contains ads and in-app purchases.
That’s it for now. If you think I missed any of your favorite WiFi multiplayer games for Android then comment below and share them with me.