Search Unity

InvinciBall Published to Flash

Discussion in 'Flash' started by ProtonOne, Dec 23, 2011.

  1. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    Edit: 2012-01-01 - New Version - With Online Multi-Player
    New Features
    - Added online multi-player!
    - World-wide lobby with map interface
    - Local lobbies
    - Character customization
    - Jump ability instead of brakes (brakes are always on now, less slippery)
    - Randomized player spawn locations
    - Added new help screen with controls
    - Player nicknames appear disappear as collisions happen
    - Legend for Territory game mode (so players know what their territory color is)
    - Limit nicknames to 15 alpha-numeric characters
    - Setup new website, facebook app, chrome webstore app

    Play Now: http://www.InvinciBall.com
    Facebook: http://www.facebook.com/InvinciBall
    Chrome Web Store



    ----

    I made this game two years ago for the iPhone (time flies), it only required a few workarounds to get it to publish to flash (bugs will be filed).

    CONTROLS
    Move
    UP DOWN LEFT RIGHT or WASD

    Jump
    SPACEBAR

    $InvinciBallBanner.jpg

    Issues I have run into so far:
    ArrayList.Remove and List<T>.Remove do not work
    The workaround is to loop through the array and use RemoveAt

    float.ToString("0") or float.ToString("0.0") does not work.
    The workaround is to manually create the formatted string, and my attempt is buggy right now.

    Other than that I am surprised how nicely it works.
     
    Last edited: Jan 3, 2012
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    A lot of fun. Works perfectly!
     
  3. nipoco

    nipoco

    Joined:
    Sep 1, 2011
    Posts:
    2,008
    Fun game. I played several times in the survival mode.
     
  4. dakka

    dakka

    Joined:
    Jun 25, 2010
    Posts:
    113
    Nice. Fun and slippery.
     
  5. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Nice and smooth!
     
  6. Lucas Meijer_old

    Lucas Meijer_old

    Joined:
    Apr 5, 2008
    Posts:
    436
    Great! Really nice to see something as polished as this apparently convert so easily
     
  7. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    Wish I could come up with concepts like that. It's pretty fun!
     
  8. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    Fun game.
     
  9. CoatlGames

    CoatlGames

    Joined:
    Apr 25, 2008
    Posts:
    773
    very funny game, i like survival
     
  10. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    I just added some music to InvinciBall (which you may recognize from the Asset Store as Once Upon a Platform)

    It seems to me like the music is about 25% quieter on a flash build than in the editor.

    It started out as the simplest possible way to learn networking:
    2 balls that can hit each other off a platform.

    BTW, there's nothing stopping you from taking the concept and improving on it.
     
  11. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Its probably the music is treated as a "3d sound" you probably wont notice much distoration because the camera doesnt go that far from the sound but I would try setting the rolloff and doppler to 0.
     
  12. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    Thanks aiursrage2k, good call. The flash build and in-editor sound the same now.
     
  13. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    New Version - With Online Multi-Player
    New Features

    - Added online multi-player!
    - World-wide lobby with map interface
    - Local lobbies
    - Character customization
    - Jump ability instead of brakes (brakes are always on now, less slippery)
    - Randomized player spawn locations
    - Added new help screen with controls
    - Player nicknames appear disappear as collisions happen
    - Legend for Territory game mode (so players know what their territory color is)
    - Limit nicknames to 15 alpha-numeric characters
    - Customized pre-loader
    - Setup new website, facebook app, chrome webstore app

    Play Now: http://www.InvinciBall.com
    Facebook: http://www.facebook.com/InvinciBall
    Chrome Web Store

    I couldn't get the ExitGames Photon Flash library to work the way I wanted (with lobbies). SmartFox was another option, but I decided to take a risk and try something pretty different that I've wanted to play with for a while.

    The multiplayer is done using HTML5 websockets. There's quite a few online services to choose from (http://www.BeaconPush.com , http://www.Pusher.com , or even self-hosted http://www.ape-project.org/). But I decided to go with http://x-stream.ly/

    So I'm attempting to network sync a fast-paced player influenced physics system via TCP using a JSON protocol. Sounds kind of crazy, but the tests I have done so far are pretty fun, not sure how it will scale, the most connections I have had in testing is 4. But in theory it should handle thousands. The x-stream.ly technology was built for stock trading where there are millions of transactions per second. I'm only doing max 400 messages per minute per player.

    One of the downsides of this technique is that it won't work on Kongregate since it requres executing javascript on the browser. I tried a bunch of workarounds (including using a regular unity webplayer on kong since it can use JS), but no such luck.

    It will take some time for it to gain players, and you need 4 to launch a game.
     
  14. TyrusPeace

    TyrusPeace

    Joined:
    Jun 30, 2009
    Posts:
    37
    Very nice! I wasn't able to get into any multiplayer games unfortunately. I wasn't quite patient enough, I suppose. Is there any reason for the networking route you took? I'm no expert with Unity's built in networking, but the js push route does seem a bit atypical. That said, the demo page for x-stream.ly is very impressive and I want to play with it now, too :p.
     
  15. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    The built-in unity networking isn't supported in flash publishing yet (and when I originally made this game, networking wasn't supported for iPhone either). But I prefer to use 3rd party networking libraries for more power/control than the built-in networking offers.

    And recently I've been doing everything with JSON, just love using it. Sending through new character attributes like ball color was so simple, just add a field to the memberInfo json. If I add custom glow images or hats or something, the network side is pretty trivial, just throw in another field and it shows up on the other side.

    As far as I know flash only supports TCP sockets anyway, no UDP support. So any flash library (including SmartFox) is going to lack the ability to send unreliable packets.

    But I do build in a pretty network library agnostic fashion anyway, I could switch to something else if this experiment falls flat. The biggest downside is that I need access to the browser and javascript; however, any portal that allows iframe's will work. And updating a single iframe is so much faster and better than a whole bunch of portals with separate swf files.
     
  16. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    any idea if we are getting an extension for next update? i can't build my game with the current 3.5 version due to several known unity3d bugs that are promissed to be fixed soon.
     
  17. iBadBoy

    iBadBoy

    Joined:
    Feb 27, 2013
    Posts:
    2
    That look like fun, I may have to learn a lot. For to do this

    Thank you for sharing!