BH2: Controls & Multiplayer

Looks like the newer versions of Flashplayer have some features that I’ve wanted for a very long time!

First of all, I can finally use the right and middle mouse buttons! Hurray!
Although in practice, using the middle button isn’t a great idea, since the wheel will always scroll the web page, so that could get annoying. Google says there’s not much I can do about that. But having two mouse buttons should be enough for this game! 😀

Secondly, I can use gamepads now! The only problem is that it requires Flashplayer 11.8, and some people might not have that yet. But that’s not a huge issue – they’ll just have to use the mouse or keyboard instead. This guy’s code is very helpful for implementing gamepad controls, and got me playing BH2 with my Xbox 360 controller after about 10 minutes of coding.

So after a bit of experimentation, it looks like multiplayer support is very feasible! (It totally wasn’t when I made BH1) The plan is to add support for 4 players!

Super cool, huh?!

9 thoughts on “BH2: Controls & Multiplayer

  1. metallica_dillon

    I love the idea of the multiplayer gaming. And I understand doing just local multiplayer but just because you haven’t seen an online multiplayer bullet hell game, doesn’t mean you couldn’t be the first to do it. Think about it, if you did it online, then new players could get assistance on hard levels from more experienced players or play with similarly skilled players for a challenge. And it could have competitive scoring too to keep things interesting. It would be one heck of a game if you could somehow make even some of that happen. :yay:

    1. ShadowSun

      I am no expert, but I believe that that is slightly beyond the scope of what a flash game can do.

    2. RealShadowCaster

      Bullet hell genre requires pixel level precision, frame level precision, and no lag. That is exactly the opposite of online gaming over internet (perfectly doable on a LAN though).
      If you REALLY want an online multiplayer bullet hell, and assume an acceptable maximum of 1 second inter player communication delay (That’s already not trivial server wise), it has massive impact on gameplay :

      – Bullets that hit a player have to still be active for 1 second and potentially hit another player.
      – Bonusses have to be multi-pickable : a shield bonus becomes a “shield station”, alternatively, the same bonus can be multi picked during a single second :wut: . Alternatively, have bonuses be player specific and untakable by other players. 🙁 Removing interaction is the opposite of the multiplayer purpouse…
      – most bullets should have deterministic path (not depending on player’s positions). This is already the case for BH2 so no big deal here. (a lot of shoot them up would need complete rewriting to become online multiplayer because of this).
      – standard bullets can be aimed at a player, but have a 1 second delay between aiming and fireing, and can’t be homing.
      – Ennemies explode and stop shooting 1 second after reaching 0 health… :sick:
      – Ennemy homing missiles must be targetting one specific player (player color ? or maybe each player sees the ones for him highlighted) and be harmless to the other players (This way an aproximated coordinates is OK for non targeted players).
      – Mega bombs must have a 1 second activation time :sick: because they affect bullets, or at least have their effect on bullets only active after 1 second. (to mitigate this, the player could become invulnearble at time of activation).

      Most importantly, this is HUGE work for much inferior gameplay than local multiplayer, and Kupo has no experience yet of server side game communication. (Not too hard to learn, but lag and disconnection is a real pain to deal with and has impact almost everywere in the code when games run on each client machine and client side full knowlege is not possible.
      Because of lag and needed response time, the much simpler solution to have the game run on a far away server (1/2 second to reach) is not an option for bullet hell genre.

      There is still a simple “online” game mode that could be added to the game without too much work :
      Battle mode, a la multiplayer player tetris :
      Each player actually plays a single player game that runs locally and gets other player’s game info via UDP (lag, missed info or unordered info has no impact on local game,it just temporary freezes or messes the other player’s screens).
      Points you get are used to send extra ennemies to the other players (via TCP), and comm lag is impossible to see because it’s inferior to time of ennemy arival.(5-10 seconds delay for big ennemy arival is perfectly acceptable so no problem at all).
      Co-op, team fighting, ring fighting… are also possible with bonuses that affect teammates for example.
      One big drawback of this game architechture is that the server has next to no way disallowing cheaters.(The game runs on the client so the server has to trust the reported info as long as it’s realistic)

      1. ShadowSun

        Actually seeing multiplayer “ghosts” could be quite cool, but I imagine it would be a lot of work and wouldn’t work too well with the aimed enemy shots.

  2. Konstantin Kots

    Don’t use the right mouse button in flash games. When I’m playing a flash game on Newgrounds and I right-click on the flash window, two context messages appear at once: one for the flash application and one for the web page. That’s a bug, because neither Flash, nor the browser (Mozilla Firefox) respond to mouse clicks, and I’m unable to close the context menus, or scroll the web page, or use keyboard or mouse inputs. The only way to fix this is to rapidly click the mouse until the context menus disappear.
    This was surely happening to me 4 months ago, and I do not know if this has already been fixed. But it was my moral obligation to deliver this word of warning to you.

    Oh, I’m also extremely interested in the multiplayer. Will it require you to set up some sort of a server, will the multiplayer work over Internet ❓ Or is it going to be local ❓ What will you use to make the multiplayer feature ❓

    1. ShadowSun

      Local, I believe. You could have one player with the mouse, one on keyboard and two on gamepads.
      Or just everyone on gamepads!

    2. Matt Roszak Post author

      Local multiplayer. I’ve never seen a bullet hell shmup with online multiplayer.


Leave a Reply

Your email address will not be published. Required fields are marked *