Hero Mages

Developer Diaries => Upcoming Features => Topic started by: Ross Przybylski on May 13, 2012, 03:40:18 AM MT

Title: Async Multiplayer
Post by: Ross Przybylski on May 13, 2012, 03:40:18 AM MT
The next major update of Hero Mages will be v1.8.0. Among the included features is the much anticipated asynchronous multiplayer! This will allow you to play against anyone in the world at your leisure regardless of time constraints and whether or not you can sit down at the same time for a session.

Follow my developer blog to learn more about how I'm creating this feature: https://www.indieflashblog.com/ (https://www.indieflashblog.com/)
Title: Re: Async Multiplayer
Post by: Ross Przybylski on May 16, 2012, 05:05:38 AM MT
Part 2 of the article series now available: https://www.indieflashblog.com/how-to-create-async-part2.html (https://www.indieflashblog.com/how-to-create-async-part2.html)

"How to Create an Asynchronous Multiplayer Game Part 2: Saving the Game State to Online Database"
Title: Re: Async Multiplayer
Post by: Millertime on May 22, 2012, 02:54:40 PM MT
This is awesome news and I was actually coming to the forums to ask that this be done!  8)

I enjoy a lot of boardgame ports on my iPad but usually only get to enjoy multiplayer via async, due to my scheduling. I can easily hop on the iPad and play a round between tasks at work or at home, but rarely get time to dedicate to a game that won't likely be interrupted.

Any word on how well this is progressing and the ETA to submitting the update?
Title: Re: Async Multiplayer
Post by: Ross Przybylski on May 22, 2012, 03:34:27 PM MT
ETA hard to say (My available development time varies between fulltime job and baby at home) but my aim is somewhere in the next 3-4 weeks. I'll be posting Part 3 of the series later this week that will include some video capture of what the feature looks like in game so far. You're going to love it!
Title: Re: Async Multiplayer
Post by: Ross Przybylski on May 30, 2012, 06:43:44 AM MT
Part 3 of my article series "How to Create an Asynchronous Multiplayer Game" is now live. It includes a video preview of the feature in-game!

https://www.indieflashblog.com/how-to-create-async-part3.html (https://www.indieflashblog.com/how-to-create-async-part3.html)

Title: Re: Async Multiplayer
Post by: pjft on July 07, 2012, 03:00:33 PM MT
Hi Ross,

How are things? Hope everything's great.

This week saw the release of Summoner Wars on iOS, a game that very much reminded me of Hero Mages, so I thought I would ask how are things shaping up for the update?

Also, if you have the chance, I can certainly suggest you look into Summoner Wars as well - it might be a kind of game you like.

Cheers mate, hope all is well with the family, and I hope to hear from you and Hero Mages soon!

Paulo
Title: Re: Async Multiplayer
Post by: Ross Przybylski on July 07, 2012, 11:31:25 PM MT
Hi Paulo,

I have random 1v1 matchmaking system for Hero Mages up and running (haven't had chance to write the tutorial article yet). I was going to release it like that, but during the past couple days I came up an idea for implementing an invitation system that would allow you to invite offline players to start an async game with up to 8 players. This has proved rather challening- I have it running through my game options screen and just finally got it so invited players can load up and see all of the settings. It will still require some additional work so players can choose their heroes and start the game. Final phase will be implementing notifications for iPhone/Android. This process took a hit when Google suddenly depreciated the cloud messaging service without notice.

I still hope to have the next release available this month. Family is doing well but we've faced a number of challenges the past few weeks including my wife's car needing major repairs and our AC unit failing. As I type, it's a smeltering 90 degrees in here. Planning to pack up baby and head to my brother's house to stay the night.

I appreciate all the support from our community here and I'm very glad to see new players making themselves at home. Thanks everyone!

~Ross
Title: Re: Async Multiplayer
Post by: pjft on July 08, 2012, 09:52:14 AM MT
Hi Ross,

I'm happy to hear that the game is making progress, though I'm sorry about the latest troubles you ran into, especially with the baby in the mix. :|

By all means, take your time. I do believe that invitations should be the way to go - playing against random opponents is fine, I guess, but playing against friends is where it shines.

As for the Android notifications, I'm sure there must be some other way currently to pull that off - after all, there are many applications that get instant notifications and they work properly. I believe there's a new version of the API, which you can look up here: https://developer.android.com/guide/google/gcm/index.html (https://developer.android.com/guide/google/gcm/index.html)

It does seem to do what you need. Or are you at a roadblock because you first need Adobe to support that new API out of the box?

Either way, good luck with it - hope all goes well! And congrats on the PAXDev gig :)

Cheers,
Paulo
Title: Re: Async Multiplayer
Post by: Ross Przybylski on July 08, 2012, 06:38:14 PM MT
Older applications using the cloud messenger service are grandfathered in I guess. Google has discontinued the service for new users. I've been waiting for Milkman Games' AIR Native Extension for Push Notifications. They were all slated to release Android version with their version for Apple, but then Google changed the system last minute without warning.

If the Push Notification ANE's aren't available in time for my release, email notification will be.
Title: Re: Async Multiplayer
Post by: Ross Przybylski on July 11, 2012, 05:34:38 AM MT
Arggghhh...

After much painstaking work, I believe I have nailed down the match making system. I'll be working on my tutorial write up and do another video demo, but, for the meantime, here's the scoop:

Random Matchmaking: Creates a new game record with an empty player seat. Next player to request random match takes the available seat and game begins. So, in essence, it's a 1v1 duel like Hero Academy.

Invite Matchmaking: Host customizes game options and can fill player slots with human opponents similar to adding bots to a match. The caveat is that players must be on your friends list so you can't just spam random players with invitations. Once the invitation is sent, all players must accept before the game can begin. If any player declines invite, the entire game is canceled since this would compeltely disrupt teams and what not.

Now I'll need a system to create a friends list. Gah, more work!
Title: Re: Async Multiplayer
Post by: pjft on July 11, 2012, 08:32:05 AM MT
Hi Ross,

So yes, the way you put it makes perfect sense, and I believe that's the way it should be. I won't give you more comments to get you into more work :)

One suggestion I'd make is to allow us to add friends directly in game. I'm not sure if you're using Game Center on iOS, but it'd be as simple as opening Game Center when someone clicks on it.

Where do we set up these friend lists? Are these heromages.com friends? I'm wondering how you'll reconcile iOS, Android and web.

Cheers, and keep up the great work.
Paulo
Title: Re: Async Multiplayer
Post by: Ross Przybylski on July 11, 2012, 02:35:33 PM MT
They would need to be Hero Mages friends to reconile across all platforms (PC, Android, iOS, etc.)

Eventually, I would look into adding tie-ins with social networking (Facebook, Twitter, etc.) - this is how Hero Academy allows you to create friends. Though, technically, everyone who plays Hero Academy still has to register a Hero Academy account- the social network plugin is just to make inviting/connecting with your friends easier.

~Ross
Title: Re: Async Multiplayer
Post by: pjft on July 11, 2012, 03:02:43 PM MT
Having friends on Hero Mages only to start it off would be fine with me.

But you seem to have it all thought out! :)
Title: Re: Async Multiplayer
Post by: Ross Przybylski on July 15, 2012, 04:30:51 AM MT
At last! I've designed a pretty decent friends system for asynchronous games. While a bit trickier to program, my goal was to make the experience as intuitive as possible for the user:

1) There's an entirely new multiplayer gateway screen that allows you to bypass access to the main chat lobby and go directly into game creation, leaderboards, async games, etc.

2) Game creation offers three options: 1v1 vs Random Opponent, Live Multiplayer (what we all know and love), and Invite Friends (ability to invite offline friends to async match)

3) Inviting Friends utilizes the new "Friends List" feature. It's really simple to use, with several ways to add new friends so the experience is as painless as possible:
     A) Directly from the game options, you can select "Invite Friend". Initially, you won't have any friends until you add them to your list. So, there's a handy option to "Add Friends" directly from this drop down. This will take you to your friend management and allow you to add existing players by username. You can then return directly to the game screen and invite the new player.
     B) Since your new friend won't have had a chance to "Accept" your request yet, I thought it would be helpful to allow (1) free game invite before your friendship is official. So, you can proceed to invite the pending friend directly to game. Even more helpful- if the player accepts your game invite, you automatically become accepted as their friend!
     C) After your invitation is sent, the player can decline your game invite and/or your friend request. This prevents players from "spamming" each other with undesired game challenges. Game challenges can always be declined without affecting rank and without breaking friendships.
     D) Friends can also be added and removed easily using the leaderboard or userlist. On the player prompt, you'll have the option to Add Friend/Accept Request/Decline Request/Remove Friend. I'm also planning to add access to the friend prompt in-game so you can friend up with any player you happen to random-match with.

All-in-all, this should induce a viral spread of friendship within the Hero Mages community. As many of us are divided by oceans and continents, async play will ensure "timezones" are no longer a barrier for enjoying a quality gaming experience!

Long-term, I'm considering integration with social networks so you can connect with even more friends that way.

I'll be writing up my next async development tutorial - Part 4: Matchmaking.

With this complete, the final phase to complete the async experience is Part 5: Notification (both in-app and external notify via push, phone, email, etc.)


Oh- and I apologize in advance that I haven't been able to respond to some of the other forum posts. Real busy trying to finish this update, but don't worry, I'll get to ya ;)
Title: Re: Async Multiplayer
Post by: Ross Przybylski on July 23, 2012, 02:01:30 AM MT
And the latest and greatest developer update: How to Create an Asynchronous Multiplayer Game Part 4: Matchmaking

https://www.indieflashblog.com/how-to-create-async-part4-html.html (https://www.indieflashblog.com/how-to-create-async-part4-html.html)
Title: Re: Async Multiplayer
Post by: VanHlebar on July 23, 2012, 02:47:19 PM MT
Hi Ross:

I am just catching up on this thread and glad to see so much progress is going on! I was very surprised that you said Google has deprecated their Cloud notification service!?! I just downloaded a new strategy war game "Great Big War Game" and it also implemented async play very much the way you have. Their game literally just came out last week and they have some form of push notifications in it.

It is interesting because they too have opted to offer up a "friends list" to create games from or from random opponents. Their approach for the random games is a little different though. There is a "lobby" or list of open games on the screen that you can review and see what the options are that have been selected and then you can choose if you want to join that game or not.

I can't wait for Hero Mages to come out Ross with this ability. I have so much more time to play at random times during the day and evening and I love this game but I just can't ever find the time to sit down, join the server and then play a game or two. This will fix that issue entirely for me! :)
Title: Re: Async Multiplayer
Post by: pjft on August 28, 2012, 04:51:56 PM MT
Hi Ross,

Congrats on the async update release - I just installed it in my device.

I was wondering, though: do we not get notifications on Android asides from the email ones?

Cheers,
Paulo
Title: Re: Async Multiplayer
Post by: Ross Przybylski on August 28, 2012, 07:16:16 PM MT
Currently all notifications are handled via email. The application will send an email to you when it's your turn. It won't send another email until after the next time you log in.

AIR does support push notifications, but I haven't yet figured out how to send push notifications via my Smart Fox server. Future release ;)
Title: Re: Async Multiplayer
Post by: pjft on August 28, 2012, 09:15:37 PM MT
Hm, ok, hopefully it'll get done soon :)

So far it's great. I wonder, though - is our turn really only submitted when we finish it? That could certainly be exploitable :l I'd expect all our moves - and dice - to be running server-side.

Also, I may have run into a small bug, see this screenshot. I'm playing a 1 vs 1 with StormCrow, it seems, but it shows as 1 vs 3?

Cheers!
Title: Re: Async Multiplayer
Post by: Ross Przybylski on August 29, 2012, 07:28:14 AM MT
Actually, each and everything you do is submitted to the server real-time. So, if a player were to "half complete" a turn and you checked in on the game record, you'd see those animations. The game doesn't notify you until the turn is submitted, however. Also note that if a turn is not compelted within 72 hours, it is possible to drop your opponent and claim victory. Games where a player is eligible to be dropped appear in red text.
Title: Re: Async Multiplayer
Post by: pjft on September 03, 2012, 06:16:29 PM MT
Hi Ross,

Just to tell you I'm loving the update - finally I can get some serious multiplayer matches going on with people.

(Edit: removed the PM feature request and moved it to the right thread)

A few questions: why doesn't it save my preferred heroes and match type? I have to manually add them every time.

And why can't I really select the type of game I want to play unless it's with friends? I should be able to select either whether I want to customize my game in Random match, or join one that's in the queue. This makes it impossible for anyone without friends to play a match with more than one player - like a team match - or am I missing something?

Finally, I'm wondering if you would be willing to share what's the increase in number of games played, and even new players and new factions sold :) We are all rooting for you, as you hopefully know :) Well, even if you can't - even if on a high or partial level, - I hope all is going well.

Cheers, and good job!
Paulo
Title: Re: Async Multiplayer
Post by: Ross Przybylski on September 04, 2012, 03:52:09 PM MT
@pjft

Preferred Heroes and game options are only saved for the current session. I believe I had this on my to-do list to have it save these settings between sessions, but deferred to future release.

Random matches are purposively restricted to random 1v1 head to head matches. There is no intelligence to the matchmaking either, it just matches you automatically with whoever is currently waiting on the que or puts you on the que if there is no one waiting to play. Our playerbase traffic isn't large enough to accomodate filters for specific game types, player ranks, or team games (hard enough to find 1v1 players to finish the game, let alone a 2v2). These features are included in custom friend invites because you can generally rely on your friends to complete any games you start.

As of yet, I haven't noticed any significant surge in player traffic or sales, though it does seem players are buying In-App purchases on the marketplace. It will be hard to determine the impact of async multiplayer until it's available on all platforms and has had a chance to be promoted.