Sign in to follow this  
ywatanabe

Unity [web] ideas for multiplayer web-based game framework/platform

Recommended Posts

Hi, I am currently working on a game but once I get some free time, maybe I like to start a small project which is to provide a community web-based game development platform. I am at the initial "conception" stage and tyring to see if it is worthwhile to pusue this and any feedbacks would be appreciated. The thing I want is a web site that provides a central location for users to sign up using SSO mechanism (such as Windows Live ID, Yahoo BBAuth, OpenID, etc) and - provide *game developers* basic API for getting user identity for his/her game - provide *game developers* ability to register their games (such that it will show up in the list of free games) - provide *game users (gamers)" with list of free games - the games can be sigle-player, but encourages multi-player by providing basic match making features imagine, today, to build a simplest multi-player web-based games, you have to manage user accounts/password etc. My service will take care of that part so you can focus on writing game logic. For example, you have a HTML based game (hosted somewhere of your choice). When certain things like a user winning, it makes HTTP forms submition to my service to write to the score board. There are security issues, which I am thining using time-spamped encrypted token passed around (via query string, forms field, etc.) so that game developers can validate it. (and maybe setting up a common secret key between game develper and my site, for symetric encryption, etc.) I have started mental exercise to see if its feasible, and I think it is. I just need to learn more about requirements. Thanks for reading up to this. Apprecaite any feedback, if any. -yoshi

Share this post


Link to post
Share on other sites
It is a cool idea in theory but there are two major issues that would keep me from wanting to use such a service:

Trust.
If your login capability is down, users can't make full use of my game.

There are enough OpenID libraries out now (and Windows Live ID is planning to provide an OpenID 'alias' service sometime in '09) that I might as well just implement OpenID directly rather than using your service.

After all, if I'm competent, one implementation of OpenID could be copied into each new web game of mine until the protocol changes.

I also need to be confident your system being compromised won't cause me any significant problems.

Traffic.
A new service wouldn't have a significant flow of traffic into my game. I'd be more interested in integrating a web-game with an existing portal's login (most of which don't use a SSO except internally) than yours. Especially for games that are essentially stand-alone. (e.g. A flash game I could upload to Kongregate or sell a sponsorship to them)

Neither of them is something time and money can't fix, but it would take more effort than a small project is worth in most people's eyes. In addition, some portals offer paid sponsorships for some of the better flash games.

On the plus side...
Your idea would be more flexible than existing portals (e.g. you could do virtually any web-based game rather than just flash and maybe silverlight) and could 'drag' traffic to the developers site instead of leaving it at the portal. If you were willing to put the time and effort to build up a decent level of traffic (and have no major downtime) you may be able to convince developers to use your service.

________________________________________________________________________________

Beyond that:
The API would need to be usable in Flash, Silverlight, and PHP (as a minimum).

A matchmaking service with lobbies to chat in as well actual matchmaking features.

A good looking portal with enough general 'game portal stuff' (e.g. rating games, reviewing games, voting for your favorite game) for users to be able to treat it like a normal game portal.

_________
Just my 2 cents.

Share this post


Link to post
Share on other sites
Kenneth,

Thanks for your great input.

Your point about handling OpenID by yourself is valid and that it self won't add much value to my service. I haven't done OpenID yet, but Windows Live ID and Yahoo BBAuth were so easy that it takes a day or two to set it up... by anybody. Clearly, I would need to add more than that.

As for trust and reliability, I would almost have to commit to data center and promis some sort of written mimimum guarantee, I suppose. That would be one hurdle to go over. Your feedback reinforces that point - and that might be too high for me to go over, at least in the initial stage. Anyhow, point taken.

Traffic. You are saying that develpers would tend to go to "established" portal rather than a new service that nobody knows about yet. This tendency is stronger for a single player simpler games. Point taken. My feeling after your input is that perhaps I should completely focus on "multi player games" that and forget about "single player games" - a quick googling tells me that there thousands of free game portals already established.

Kenneth, right now I am struggling to understand how "multi-player web-based games" are architected. I am a professional ASP.NET developer so I understand the basic web-based applications. Whether you use HTML, javascript, Flash, Sliverlight (and PHP, ASP.NET, etc. for server side), you have to solve the "stateless" nature of web application. In particular, one of the online users performs an action, which causes some state change on the server side, the only way to get that user's action reflected on other users views is by having a polling mechanism from user agents... correct? Sorry, if this is a dumb quesion - I just want to establish a solid fact here.

If that is the typical web-based multi-player game architecture, then my API has to be designed around that architecture.

Your other inputs: basic match making + some sort of user-to-user communication palform (chat), and attractive UI, seem essential to me to. Thanks for affirmation.


by the way, the game I am developing right now is a client-server app using TCP based on Socket (it used to use DirectPlay but I pulled it out as MS dropped it from the DirectX package). I was thinking I would add support for TCP with binary formatted protocol for future, but do you think there might be more people interested in?

Sorry for a huge message (should chuck it up, I suppose)

thanks.


Share this post


Link to post
Share on other sites
Quote:
Original post by ywatanabe
....

Traffic. You are saying that develpers would tend to go to "established" portal rather than a new service that nobody knows about yet. This tendency is stronger for a single player simpler games. Point taken. My feeling after your input is that perhaps I should completely focus on "multi player games" that and forget about "single player games" - a quick googling tells me that there thousands of free game portals already established.

Quite a few of those portals offer multiplayer games as well, just fyi.
(e.g. http://www.gamedozer.com/battalion/, http://www.flash-game.net/free-games/multiplayer-games.php)

Pretty much every segment of the web game market is serviced by some kind of portal. From the PBBGs to the single player Flash and Silverlight games.
(e.g. http://www.pbbg-portal.com/, http://apexwebgaming.com/)

So, avoiding a section of the market that isn't already serviced by an established portal won't really be possible imo. But no one to my knowledge offers SSO which would allow developers to leech some traffic to their websites instead of letting portals take it all. Just internal login and/or listing for reviews, directory, etc.

Quote:

Kenneth, right now I am struggling to understand how "multi-player web-based games" are architected. I am a professional ASP.NET developer so I understand the basic web-based applications. Whether you use HTML, javascript, Flash, Sliverlight (and PHP, ASP.NET, etc. for server side), you have to solve the "stateless" nature of web application. In particular, one of the online users performs an action, which causes some state change on the server side, the only way to get that user's action reflected on other users views is by having a polling mechanism from user agents... correct? Sorry, if this is a dumb quesion - I just want to establish a solid fact here.

I'm pretty sure no one is using a polling mechanism since there are better alternatives. However, I mostly write PBBGs (in php) for fun so I can't be certain no one is using such a method to get around paying for a 'professional-grade' flash socket server.

Flash
Flash has various socket server offerings.
(e.g. http://www.smartfoxserver.com/, http://code.google.com/p/gfs-server/)

For games that use such an offering, it would just be like a regular client/server game as far as architecture goes. The client would be the flash file displayed on the server which in turn communicates with the server-side code.

(e.g. http://www.tacticsarena.com/)

PBBGs
For PBBGs, you don't really need polling since your really behaving like a normal website (AJAX or otherwise). (e.g. You have your login session, You post the 'build units' form, the database updates with your orders, You navigate to the 'build buildings' page.)

(e.g. http://www.blacknova.net/ source: http://sourceforge.net/projects/blacknova)

As a hobbyist, I'm probably not in a position to say definitively that 'this is typical' but it probably is correct.

Quote:

...

by the way, the game I am developing right now is a client-server app using TCP based on Socket (it used to use DirectPlay but I pulled it out as MS dropped it from the DirectX package). I was thinking I would add support for TCP with binary formatted protocol for future, but do you think there might be more people interested in?

I honestly don't know one way or the other since the games I create never anything more than the basics (e.g. http, whatever protocol an AJAX library I may use uses) for communication.

Quote:

Sorry for a huge message (should chuck it up, I suppose)

NP.

Quote:

thanks.

Your welcome.

Share this post


Link to post
Share on other sites
Kenneth,

Thanks again for detailed reply to my queries.

I never knew the term PBBG, but now I do. You pointed me to several useful links and basic concepts/technologies. I will be busy reading these articles for a while.

I am also going to play some of the PBBG out there to get a feel for requirments, and I probably should write one.

I am still not quite sure how a user who is looking at a page (static) gets the updated world when another modified it... without some sort of polling. Maybe I just don't understand the types of games written in PBBGs. Say, if I were to write a chess game, unless I refresh the browser (to make a HTTP request), I am staring at the stale world data.

Anyway, I have lots of readings/researches. Hopefully, it will come clear gradually.

Thanks,
-y

Share this post


Link to post
Share on other sites
Quote:
Original post by ywatanabe
Kenneth,

Thanks again for detailed reply to my queries.

Your welcome.

Quote:

...

I am also going to play some of the PBBG out there to get a feel for requirments, and I probably should write one.


One of the links I gave you was the source to an open source PBBG. Just in case you missed it:
http://sourceforge.net/projects/blacknova

Quote:

I am still not quite sure how a user who is looking at a page (static) gets the updated world when another modified it... without some sort of polling. Maybe I just don't understand the types of games written in PBBGs. Say, if I were to write a chess game, unless I refresh the browser (to make a HTTP request), I am staring at the stale world data.

Most PBBGs do require you to refresh the browser to get updated data. ;)

They aren't usually games like chess where you'd care about rapid updates of information. They are normally games with hour long 'ticks' which update all the game information periodically. So the user tends to do the following:
log in
use some forms to issue orders (e.g. build, send messages, join an alliance, send armies to steal land)
log out
Repeat in 8-24 hours.


Those that don't, use AJAX or Reverse AJAX.

AJAX could result in polling for information. I don't know why I didn't make that clear in the other post. I'm stupid like that sometimes.

But, Reverse AJAX would not (except at a very low level e.g. OS level). And Reverse AJAX makes more sense for a web-game where information needs regular updating.

Quote:

Anyway, I have lots of readings/researches. Hopefully, it will come clear gradually.

Thanks,
-y


Best of luck finding what your looking for!

Share this post


Link to post
Share on other sites
HI everyone,

I'm very interested in what you are discussing about, I think your idea to build a framework for webgame online is really GREAT!!

I've created a multiplayer web-game on my own and it run quite well but there're so many problems to be dealt with to fully develop this.

You're welcome to take a look and please give me some advice.

Here is the link: http://yugiohnetwork.com

Share this post


Link to post
Share on other sites
Hi thethanghn,

I just looked at your site quickly and looks like you have build a ton of features there. All by yourself? Cool! I don't plya Yugio (what a shame, I am Japanese and grew up there and it was on Shonen Jump magazine... I was just leaving Japan when Yugio started so never got into..)

Anyway...

Yeah, I've been continueing my research on this. I learned what Reverse AJAX is and especially Comet (slow loading) technique that web-game devs can use to build more real-time game.

But my main focus is to build a tool that help build games... not game itself. Here is what I see so far

A web-based games can be broken down to these components:

a. User account management service
b. User scoreboard service
c. Match making service (for multiplayer)
d. Data storage service "P" part of PBBGs
e. Business logic service (the actual game rules and logics)
f. Presentation layer (views, shapes, pages, animations, sounds etc.)

What game developer want to spend most of time is in 'e' and 'f', I think.
'a' is boring but hard and users may have more registance (the feeling you have when you have to provide your name, password, etc to just use a service)

'b' and 'c' might be specific to games, but I think it can be abstracted. Like your Duel system, its 1-on-1, right? For some games, its 2x2 (say, veritual tennis). Some are "free-for-all" up upper limit. And multiplayer team based ones. I think we can support most of these.

'd' is also boring. I just want to "save" data and move on.

So, what if a framework takes care of all of these...?

[Framework]
a. User account management service
b. User scoreboard service
c. Match making service (for multiplayer)
d. Data storage service "P" part of PBBGs

[Your Game]
And you can implement the following at your web site anyway you want.
e. Business logic service (the actual game rules and logics)
f. Presentation layer (views, shapes, pages, animations, sounds etc.)

Obviuosly, there has to be a communication between [Framework] and [Your Game]. If we restrict the communication between these two to HTTP, then many poeple will be able to write games. (I wouid also like to have TCP protocol but that's for later)

That's what I got in my head so far.


Share this post


Link to post
Share on other sites
Kenneth,

Yeah, I just did a quick design write up to discover what it would take to build a simple 2-player tic-tac-toe game (sort of mental exercise to handle signing up, match making, game setup, game start, game update, game ending, recording result, etc. using a simple web-based game with ajax/comet).

It is becoming clear to me that abstracting "storage" layer (and above) is just not going to be feasible. Maybe I can serve certain type of games, but creating a virtual database using physical database (while keeping performance reasonable, as you pointed out) is not trivial.

I am gradually shifting from concepts to design/implementation, and hitting lots of issues.

Scoreboard service, which already have lots of variations, is probably where I can realistically stop. I still think SSO, user account management, matchmaking are doabine.

thanks for keeping an eye on this thread!

-y

Share this post


Link to post
Share on other sites
Well, good luck getting everything together. :)

I'm debating about reviving my PBBG website over the summer and starting on a new game...maybe I'll use your framework as one of the various options to login with.

Right now, I'm thinking of trying to integrate it into multiple login solutions (e.g. Facebook, OpenID) while still being able to use a single ID for the forum/rest of the website.

We'll see how it goes...I usually can't get more than a small player base together (or lose interest in making the 'new' game I have an idea for due a lack of collaboration). I'm not good about picking things I can do entirely without a certain amount of decent art, which I can't provide.

Share this post


Link to post
Share on other sites
I think to make a common data storage as you described in "d." is quite hard because it is up to type of game.
We'd better build a mechanism to register a object/entity, control its state during life time of game session so that we're able to build an interface independant to database.
And if we decide the transportation method is Ajax/comet, the data being transported must be game state, which has an common format: JSON, XML... the business logic could break into 2 parts:
- server:
receive object state data --> do game logic --> send object state back to client
- client:
receive object state data --> display, apply logic or do some graphic effect --> periodically send object state to server
We may build interface for each of these.

Another issue: load balancing, caching, update shared data...

Share this post


Link to post
Share on other sites
Hi folks,
I've been thinking about this stuff over the weekend...

Kenneth,

I tried to get to your game but couldn't... is it up and running somewhere that I can get to? Just curious what you have got!

thethanghn,

Yeah, it will be hard. I did an exercise to see if I can abstract storage requirements. I felt is doable but the problem is that I am not aware of ALL game types and have no means to validate abstracted storage model would be usable for most cases. Sort of doing game dev in SaaS (software as a service) way, if you will. Not easy.

So, I step back and started thinking more about (1) single sign-on, (2) match making, and (3) scoreboard. This is not trivial either, especially single sign-on, which is the critical and could be too complex (and this goes against easy dev platform for many game devs at various skill levels). My goal was to create a platform that is "easy" and SSO involves some stuff that's hard to master (or at least time consuming - certificate, public-private-key encyription, sigining, etc...)

I will continue to work on ideas and once it gets more comcrete, I will publish it via google doc or something...

Share this post


Link to post
Share on other sites
Quote:
Original post by ywatanabe
...
Kenneth,

I tried to get to your game but couldn't... is it up and running somewhere that I can get to? Just curious what you have got!


It isn't up on the internet anywhere atm.

I shut it down awhile ago because of a game I 'inherited' and its playerbase and I had issues that just kind of spiraled until things collapsed. And the other game...was not as popular as I had hoped and I could never get replacement for the programmer art.

But the main opponent who thought I never should have 'inherited' it in the first place shut his version down after about the same time I was running it.

So I was planning to revive it, maybe build a small silly game in the same vein as Click the PBBG, while I work on a 'better' game than my last attempt. ;)

If you feel it will be helpful...I'll try to set some of it up again but I had everything integrated into some forum software that no longer exists on the internet and which I didn't keep a copy, so I'd probably have to re-work the login system and a few other things to get it working again.

If you can wait six months or so, I should have something 'online' in late June/early July.

Quote:

...

I will continue to work on ideas and once it gets more comcrete, I will publish it via google doc or something...


Cool.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Forum Statistics

    • Total Topics
      628277
    • Total Posts
      2981778
  • Similar Content

    • By ForgedInteractive


      Who We Are
      We are Forged Interactive, a small team of like-minded game developers with the sole purpose of making games we love! We're a team of artists, animators, programmers, level designers, writers, composers, producers, and other creative minds. We want to make games that you, the modern gamer want to play! We hope to build a community that enjoys our games as much as we love creating them. With your feedback and support we will be able to achieve that.

      About the Game
      GAME NAME is a fun, action-packed army builder with unique characters, challenges and engaging levels. Set forth on an adventure to protect friends, family and countrymen from new adversaries. Once defeated your enemies turn coat and join you in your adventures. Players can enjoy a range of troops and abilities based on their gameplay style which become more important as maps introduce more challenging terrain, enemies and bosses. Strong orc knights, dangerous shamans, and even a dragon are out on the prowl. Knowing when to fight and when to run, and how to manage your army is essential. Your actions alone decide the fate of this world.

      Previous Work by Team
      Although we are working towards our first game as a team, our team members themselves have past experience in the industry.
      This includes members who have worked on titles including:
      Final Fantasy Kingsglaive, FIFA, Xcom 2 and Civilization.

      Who are we looking for? 3D Modellers Concept Artists Marketing Specialists Level Designer

      What do we expect? Reference work or portfolio. Examples what have you already done and what projects you have worked on academic or otherwise. The ability to commit to the project on a regular basis. If you are going on a two-week trip, we don't mind, but it would be good if you could commit 10+ hours to the project each week. Willingness to work with a royalty based compensation model, you will be paid when the game launches. Openness to learning new tools and techniques
      What can we offer? Continuous support and availability from our side. You have the ability to give design input, and creative say in the development of the game. Shown in credits on websites, in-game and more. Insight and contacts from within the Industry.
      Contact
      If you are interested in knowing more or joining. Please email or PM us on Skype. Myself or Colin will reply to you within 48 hours.

      E-mail: Recruitment@ForgedInteractive.com
      Skype: ForgedInteractive

      Regards,
      David and Colin

      Follow us on:

      Facebook: https://www.facebook.com/ForgedInteractive/
      Twitter: @ForgedInteract
      Youtube: https://www.youtube.com/channel/UCpK..._as=subscriber
      Reddit: https://www.reddit.com/user/Forged_Interactive/
    • By Eck
      I just saw their courses were knocked down to $10 each and figured I'd share the info here. They have stuff for Unity, Unreal, drawing, business, etc. I haven't used their stuff before, but the previews I looked at seemed pretty good and there is a user review system as well.
      https://www.udemy.com/courses/search/?q=Unity&src=ukw
      - Eck
       
    • By zizulot
      first and only logo , for now
    • By sidbhati32
      I am working on a game in which we control a rectangular box at the bottom of the screen. Three sphere which has alphabets in it fall down. When the game starts, a word is generated from the predefined list of words(which I'll give) and we are supposed to touch the correct sphere having the alphabet based on that word. The question is how to detect if I have touched the correct sphere. 
      secondly, if I have touched a correct sphere before and there is no recurrence of that alphabet in that word then during the second wave the game should not proceed if I touch the same alphabet again.
      Looking forward to your answers, i have to submit this project in a couple of days. please help! (Working on Unity 3D)
      Thanks
    • By NDraskovic
      Hey guys,   As the title says, I'm trying to control a desktop game by using my mobile phone as a controller.  I created two scenes, one that acts as a server, other as a client.    Server has this code: void Start () {         Test = "Nothing yet happened";         NetworkServer.Listen(25000);         NetworkServer.RegisterHandler(888, ServerReceiveMessage);     }         private void ServerReceiveMessage(NetworkMessage message)     {                 StringMessage msg = new StringMessage();         msg.value = message.ReadMessage<StringMessage>().value;         if (!String.IsNullOrEmpty(msg.value))         {             Test = "Message received";             string[] deltas = msg.value.Split('|');             Horizontal = Convert.ToSingle(deltas[0]);             Vertical = Convert.ToSingle(deltas[1]);             TestScript.MoveForward(Vertical);             TestScript.RotateAroundY(Horizontal);         }         else         {             Test = "Nothing received";         }     }  
        And client this:  private void Connect()     {              client.Connect(IPAddress, 25000);           }     void Start () {         client = new NetworkClient();         Connect();            }         void Update () {    #if UNITY_ANDROID         MobileTouches = Input.touches;         if (MobileTouches.Length > 0)         {             for (int i = 0; i < MobileTouches.Length; i++)             {                 if (MobileTouches[i].phase == TouchPhase.Moved)                 {                     Horizontal = MobileTouches[i].deltaPosition.x;                     Vertical = MobileTouches[i].deltaPosition.y;                 }else if(MobileTouches[i].phase == TouchPhase.Stationary)                 {                     Connect();                                  }             }         } #elif UNITY_EDITOR               Horizontal = Input.GetAxis("Horizontal");         Vertical = Input.GetAxis("Vertical"); #endif         thumb.Translate(Vector3.up * Vertical * Time.deltaTime);         thumb.Translate(Vector3.right * Horizontal * Time.deltaTime);         SendControllerInfo();     }     static public void SendControllerInfo()     {         if (client.isConnected)         {             StringMessage msg = new StringMessage();             msg.value = Horizontal + "|" + Vertical;             client.Send(888, msg);         }     }  
        Ip address is hard coded, I just replaced it with the "IpAddress" variable. The code itself builds fine, and when I try to run in on a desktop computer, it works as expected (just a simple movement of an object on the server screen). However when I try to publish the client scene to a mobile device (Android), it doesn't connect to the server. They are both connected to the same network. Can anyone tell me what the problem might be?   Thanks
  • Popular Now