Android :: Socket - SurfaceView - Multiplayer Game Problem

Apr 18, 2010

I'm developping a simple realtime action game 4 Android. It works nice. but now i want deal with animation FPS and i'm facing a big problem i can't solve since couple days now.

I started from the famous Lunar Android sample using facebook. got 55-60 frame per second on my G1. it smelt good for my game i thought ... BUT when i plugged the surface view in my game i got a poor 6-9 Frame per second making the game unplayable.

After debugging removing all content of my doDraw used by the thread controlling the surface view i found the problem.

The problem is not the quantity of sprites i displayed but the concurrency between threads used for receiving my game data over TCP and the UI thread i use to control surface view.

If when i start displaying the game i stop the my socket protocol threads (reader, writer) the game is refreshed at 25 FPS which is not 50 FPS but large enought to make the game playable.

So my question is how in realtime game for android i can send / received data (and not delayed of course) without killing the game refresh rate.

Last thing i use canvas and not open gl but i don't need open gl and i really see the problem comes from the multithreading.

Android :: Socket - SurfaceView - multiplayer game problem


Android :: Multiplayer Game Communication

Sep 6, 2010

I have to develop a multiplayer game. The game will be supported between different platforms: 1) Two android clients. 2) Android client and a web application (something like facebook and android client for Texas- Holdem game).

I want to handle the communication between the platforms through a service.

I have asp.net (C#) background so I thought to implement the communication using WCF service but I am not sure this is the best choice?! Can you please tell me if my choice is good or should I choose other approach to implement the communication?

View 2 Replies View Related

Android :: Online Multiplayer Game

May 21, 2010

I am getting started in android development and I really want to create some form of online game. My goal is to start out with a turn- based game and move onto advanced multiplayer games. I want to have users associated with their google account, provide some sort of matchmaking to pair people together, have their stats stored in a database, and use the stats for various leaderboards and such. I have read over an older discussion on this list at http://www.mail-archive.com/android-developers@googlegroups.com/msg75... . There was a lot of good information that I gathered but I still have some questions. What I have so far is an apache web server on a laptop that I don't need right now (2.0Ghz Core 2, 3GB Ram).

I have never really used Java (although I'm learning it for android), but I know C/C++, Perl, and Python. I am in the process of learning mysql databases, which will help with a lot of the stats features I want to implement. I have built a HTTP/1.1 persistent server in C before which did JSON parsing and used a threadpool so I am somewhat familiar with the low-level network calls needed. However, I'm thinking that a free server software must exist that would offer more security and better load-balancing than the server I created. One solution I am thinking is to just use the Apache web server, have android make a request to a perl module I create on the server, and then have the server look it up on a database and so forth. Then the server will just keep sending back the player locations or whatever. Will the Apache web server slow me down for what I am trying to do or I am looking at everything the wrong way? Are there some settings in Apache that I could tweak to give me better latency such as persistent connections?

View 2 Replies View Related

Android :: I/O Streams - Multiplayer Game?

Nov 11, 2010

I am developing a multiplayer game on android. I am having a Java server and android client. The android client issues multiple requests and receives responses from the server. However the performance is not smooth. At times the data received at the Java server is not what I send from android. It is junk or zeroes. However, some times, data is correctly received.

I was wondering is there any data loss in between and why? I am using java.net on both ends. Please let me know if anybody was facing a similar problem anytime during android development.

View 4 Replies View Related

Games :: Multiplayer Android Game Engine

Apr 25, 2008

Mages is multiplayer client/server game engine for Android and other mobile devices (currently Android and J2ME devices are supported, development for Windows Mobile in the progress). It allows developers to create internet multiplayer games by implementing only core game logic and GUI by using powerful engine API.

View 11 Replies View Related

Android :: Multiplayer Game Handle Communication

Sep 7, 2010

I want to develop a multiplayer game. The game will provide communication between different platforms:

1) Two android clients (client applications that communicates through a service).

2) Android client and a web application (internet application) which is something like facebook (web) and android client for some kind of game. I want to handle the communication between the platforms ((1) android to android and (2) android to web) through a service.

I have asp.net (C#) background so I thought to implement the communication using WCF service, but I am not sure this is a good choice. Can I handle the communication using WCF or should I use other approach? Can you please recommend me a good approach to implement the communication?

View 4 Replies View Related

Android :: Setting Up Multiplayer Game Over Internet

May 28, 2009

I'm wanting to add 2 player mode to a game, but I want this mode to be able to run over the internet.

My idea is to setup a game state server that would maintain information on the moves made or current game state.

The game clients would send information to this server and request updates via xml.

I would just like to know if this is the best way / only for to clients to send game information to each other over the internet? Any advice on this would be good.

View 3 Replies View Related

Games :: Multiplayer Scrabble Game

Sep 30, 2010

Addictive multiplayer scrabble game and you can play friends!

Wordfeud - multiplayer word game for Android

View 3 Replies View Related

Android :: P2P Multiplayer Game - With XMPP/Google Talk B - JXTA Peerdroid C

Mar 4, 2010

I am an android developer and I made some board games. Now i want to make some of my board games multiplayer. I don't want to create and host my own web service, so i thought about P2P.

The first thing i found was the XMPP protocol, however it's not real P2P, but if i can use the existing google talk service, i'm ready to go. Is this possible while using your existing google account without interfering with the normal working of your google talk client?

Then i heard about JXTA, a real P2P solution, and it's already ported from J2ME to Android (http://code.google.com/p/peerdroid/).

Maybe i am overcomplexing things here (as i do sometimes)

I just want to know the easiest way to do simple P2P for a boardgame.

View 3 Replies View Related

Android :: Should I Use Canvas / SurfaceView For A Chess Game?

Oct 10, 2009

I am developing a chess game, what view should I use for the chessboard, Canvas or SurfaceView? I want to implement some animations like moving a piece, fading the chessboard or maybe rotating the chessboard.

View 4 Replies View Related

Motorola Droid X :: Galcon - New Multiplayer Game

Aug 17, 2010

Galcon, previously a PC game, has now been released on Android!

It's $3 and you can play it both single-player and multiplayer. It's pretty fun. Matches are over fairly quickly so it's good to pick up and play for a couple minutes.

The game works fine on my Droid X, but there seems to be an issue with Swype and the text input boxes. You can't Swype to type--instead, you have to tap each letter. Also, you can't seem to delete using Swype. Also, there is a bug where the number 0 won't register in the text box. These are pretty minor issues since entering your username and password is about the only typing you'll do in this game, but it's something to be aware of.

QR Code:

View 5 Replies View Related

Datagram Socket Android Game

Sep 20, 2012

I'm trying to develop multiplayer game , like any usual games join to room game then the score of game sharing with another player. After I'm searching in Google , what i see i should be start on DatagramSocket , in this link URL..., i can create my WiFi internet game throwing DatagramSocket or i need something else.

View 1 Replies View Related

Android :: 2D Game On SurfaceView Runs Slowly On Touch

Aug 30, 2010

I am building a 2D game with Android SurfaceView. When I touch the screen the game animation runs slowly. Why, and how can I avoid this?

The touch events are stubs just like onTouchEvents(MotionEvents ev){ empty };. All of the game logic and graphics draw code are in run() in an extends Thread class.

View 3 Replies View Related

Motorola Droid :: Project INF - Multiplayer Shooter Game

Feb 4, 2010

Anyone play this game? Is it any good?

ProjectINF - ChickenBrick Studios

View 1 Replies View Related

Games :: Catchphrase Lovers - PhoneFraze - Multiplayer Family/party Game

May 13, 2010

Catchphrase lovers..PhoneFraze (multiplayer family/party game) is now available!

View 13 Replies View Related

Android :: Suggestions About Multiplayer Game Development On IOS And Android?

Nov 12, 2010

I'm working on a simple game to experience the multiplayer game development on mobile plaforms especially on Android and iOS. I'm now planning network/multiplayer side of the game and need some advice.

Firstly i think about Google App Engine as the server side of the game. But i learned that app engine cannot connect directly to clients. So updates of the users cannot be send to others directly with this method. Then i started to think about serving the game on one of the gamers of the current session. But of course some of the features will be on the server. You think it is a good idea?

Second, I'm looking for a protocol to communicate iOS and Android. YAML and JSON are the ones i looked so far.

Any other suggestions about multiplayer game development would be appreciated. Thanks...

View 1 Replies View Related

Android :: Multiplayer Game - Device To Device Connection Using Sets Of Api

Mar 24, 2009

I have developed a sports game which is single player. Now I want to have one more game mode which is multiplayer.

My question is how can i do device to device connection in android using sets of api which can be :

1.Bluetooth - whose APIs are not currently available.

2.gtalkservice - removed from sdk1.0 3.wifi - I dont knw how to connect 2 devices using wifi apis . I have asked about wifi because we have developed a game on iphone which used wifi connection for multiplayer stuff.

Or is there any other apis which can be used for implementation of multiplayer in game ?

View 3 Replies View Related

Android :: Are There Any Android Multiplayer Game Libraries?

Sep 14, 2010

Are there any good libraries or tools available for adding wifi multiplayer functionality to an Android game?The amount of work and cost involved for getting even the simplest of turn based multiplayer features into our games is somewhat daunting.

View 2 Replies View Related

Android :: SurfaceView Vs Custom View / SurfaceView Is Slower

Aug 20, 2010

One using a Surfaceview, and the other using a custom view. According to the android SDK development guide, using a surface view is better because you can spawn a separate thread to handle graphics. Th SDK development guide claims that using a custom view with invalidate calls is only good for slower animations, less intense graphics.However, in my simple app, I can clearly see that using a custom view with calls to invalidate seems to render faster.What do you guys know/think about this?My touchEvent code is exactly the same, and my drawing code is exactly the same. The only difference is that one is all in the UI thread, and the other is using a tread to handle the drawing.

View 1 Replies View Related

Android :: Java Socket Not Throwing Exceptions On Dead Socket?

Jun 29, 2010

We have a simple client server architecture between our mobile device and our server both written in Java. An extremely simple ServerSocket and Socket implementation. However one problem is that when the client terminates abruptly (without closing the socket properly) the server does not know that it is disconnected. Furthermore, the server can continue to write to this socket without getting any exceptions. Why? According to documentation Java sockets should throw exceptions if you try to write to a socket that is not reachable on the other end!

View 5 Replies View Related

Android :: Socket Programming - Java - Many Clients One Socket

Nov 12, 2009

Essentially Im trying to get many many java clients connect to a socket on my ColdFusion server (Using the Socket Gateway). However before i even start to code this, Im a little confused about sockets and their performance. First of all, are sockets meant for many(1000+) clients connecting to one socket (say port 2202) on one server? How is the performance if all there waiting for is basically a ping, or something such that when these clients receive this "ping" they can go get some new data.

View 5 Replies View Related

Android :: Connecting Android Bluetooth Client Socket To Ubuntu Server Socket

Jul 15, 2010

I am writing an Android app that should exchange data to a server over Bluetooth, with the server side on a PC running Ubuntu, using the bluez library, in C (or C++).

My Android app fails (IOException) when I try to connect to my server socket on the PC.

Here is essentially what I in the java code (in Android, full eclipse project here: http://dl.dropbox.com/u/2968234/ThinBTClient.zip)

CODE:...........

This throws IOException after a timeout of 10seconds or so.

On the server side (in Ubuntu 8.10), I basically set up a Bluetooth server socket, along the lines described in the example bluez/sdp-register.c

Down below is my C++ program. To compile it do

g++ -I/usr/include/glib-2.0/ -I/usr/lib/glib-2.0/include -o bt_server bt_server.cpp -lbluetooth

I can do the reverse succesfully, i.e. create a server socket in Android and connect from Linux, however this is not what I want to do!

I think either the problem has to do with my config of Ubuntu.

CODE:................

View 1 Replies View Related

Android :: Socket Exception Socket Not Connected Android

Oct 27, 2010

In my android application i am trying to run a application using GPRS connection and not WIFI.When tried to run in wifi the app runs fine.The browser works fine with the APN settings set but when trying to connect to server using my application it gives me socket exception.I am using the below permissions in manifest file.
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses- permission>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
<uses-permission android:name= "android.permission.CHANGE_NETWORK_STATE"></uses-permission>
<uses-permission android:name= "android.permission.WRITE_APN_SETTINGS" ></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" ></uses-permission>
I am receiving Socket not connected exception.Is there any other permission which i need to add for using GPRS connection other than WIFI.
10-27 18:26:19.689: WARN/CalSyncSvc(166): com.motorola.blur.service.email.protocol.activesync.ASException: Problem executing HTTP POST

10-27 18:26:19.689: WARN/CalSyncSvc(166): at com.motorola.blur.service.email.protocol.activesync.ActiveSyncMgr.sendRequest(Unknown Source)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at com.motorola.blur.service.email.protocol.activesync.ActiveSyncMgr.sendXMLCommandNoProvisoning(Unknown Source)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at com.motorola.blur.service.email.protocol.activesync.ActiveSyncMgr.sendXMLCommand0(Unknown Source)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at com.motorola.blur.service.email.protocol.activesync.ActiveSyncMgr.sendXMLCommand(Unknown Source)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at com.motorola.blur.service.email.protocol.activesync.ActiveSyncMgr.sendFolderSyncCommand(Unknown Source)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at com.motorola.blur.service.email.protocol.activesync.ProviderAPI.sendFolderSync(Unknown Source)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at com.motorola.blur.service.email.protocol.activesync.ProviderAPI.updateMapFromFolderSync(Unknown Source)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at com.motorola.blur.service.email.protocol.activesync.ProviderAPI.updateFromFolderSync(Unknown Source)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at com.motorola.blur.calendar.sync.activesync.SyncService.syncAccount(Unknown Source)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at com.motorola.blur.calendar.sync.activesync.SyncService$QueueEntry.run(Unknown Source)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:416)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:256)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at java.util.concurrent.FutureTask.run(FutureTask.java:122)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:648)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:673)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at java.lang.Thread.run(Thread.java:1058)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at com.motorola.blur.util.concurrent.BlurThreadFactory$BlurPooledThread.run(Unknown Source)
10-27 18:26:19.689: WARN/CalSyncSvc(166): Caused by: java.net.SocketTimeoutException: Socket is not connected
10-27 18:26:19.689: WARN/CalSyncSvc(166): at org.apache.harmony.luni.platform.OSNetworkSystem.connectStreamWithTimeoutSocketImpl(Native Method)


10-27 18:26:19.689: WARN/CalSyncSvc(166): at org.apache.harmony.luni.platform.OSNetworkSystem.connectStreamWithTimeoutSocket(OSNetworkSystem.java:140)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:229)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:521)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at java.net.Socket.connect(Socket.java:1019)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:317)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:129)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
10-27 18:26:19.689: WARN/CalSyncSvc(166): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
10-27 18:26:19.689: WARN/CalSyncSvc(166): ... 17 more

View 2 Replies View Related

Android :: How To Store Path Of Game Pawn In Turn Based Game?

May 22, 2010

I have a square grid, for a turn based game ( grid is similar to the chess board ), but the moves in the games are different based on whether you have lapped your opponent pawn at least once or not.i.e if you have not lapped (beaten any of the opponents pawns) in the outer most grid as below.if you have lapped your opponent pawn once at least, then you get to reach home,this way.Any player having all his pawns reaching "home" first wins.The ones in yellow are safe-houses, i.e both the opponent pawn and the player's pawn get to stay in the same grid, this is not considered to be lapping ( the opponent ).The lapped pawn will return to its start point.Now the question is, what is the effective way to store the paths for the all the pawns.we will have 4 pawns for the player and 4 opponent pawns.Is there any pattern to store such static information, in a elegant way?

View 1 Replies View Related

Android : Puzzle Game With 7x7 Grid Of Graphics / How To Save And Continue Game

Nov 12, 2010

I have a puzzle game with a 7x7 grid of graphics, and a timer, its just about ready to go. But I am stuck on how to go about saving/continuing game. For example when someone exits I want them to be able to save and exit, then come back and click continue to pick up where they left off with all of the graphics in the right place, timer and score. I looked at onSaveInstanceState android examples, but not sure if this is what I need or how to implement it in my case.

View 8 Replies View Related

Android :: Multiplayer Games Emulation

Aug 17, 2010

Anybody know if there is anyway of having multiplayer games on android emulators? i have seen that it is possible on the pc emulators... surely is do-able on android?

View 1 Replies View Related

Android :: Apps - Iphone Multiplayer

Aug 12, 2010

I know of Skies of Glory, but how many apps do you guys know of that you can play your iphone friends in. I know there arent many. But i think there are 2 or 3 that you really have to look for but they just arent coming to mind aside from SoG.

Believe it or not, i still have 1 or 2 friends that havent converted to the evo and are still using that old iphone thing. Would love to kill em in words with friends but i know thats not for android (yet).

View 1 Replies View Related

Multiplayer Multiple Choice Android?

Sep 13, 2012

I plann to create application is a real time multiplayer multiple choice game. It will have a pool of approximately 600 questions that will be randomly selected for every game. Games will start on a rolling basis, consisting of 10 players at a time who must answer 20 questions per game, for quetion and logic for game it's ready , now my main part multplayer , what i need exactly:

1. Player has to choose a room from the lobbay to enter a game.

2. The player waits until thier selected room reaches 10 people. at that point, the game will start.

3. within the game, each player's score update it in real game.

4. you can click name of player to take you to that player's stats page.

i need this in android but i don't now how i can stat and what the tool i need for it , as i menstion up the logic for application ready but i need multplayer part.

View 1 Replies View Related

General :: Bluetooth Multiplayer Android Games?

May 27, 2012

so do you know of any interesting multiplayer android games that work through bluetooth?

View 9 Replies View Related

Android :: Switch To SurfaceView

Mar 25, 2009

Im creating a simple game using a SurfaceView for drawing the Graphics. It works fine, but now I tried to add a title screen, which is (for now) only a LinearLayout and a Start-button, specified in XML. However, when I click this button and try to switch to my SurfaceView (By doing setContentView(R.layout.game), the screen turns black. But if I do setContentView(R.layout.game) immediatly in my Activity.onCreate it works. But not if I start with my Title-screen and then try to switch

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved