Skip to content

Latest commit

 

History

History
246 lines (152 loc) · 14.2 KB

README.md

File metadata and controls

246 lines (152 loc) · 14.2 KB

Player Versus Player


Play!
Try playing with Firefox Browser and disabling your ad-blocker

Player Versus Player is an opensource web browser 1-4 Players arena shooter you can play offline in split-screen and networked (experimental).

It tries to catch the aesthetics and accessibility of the early 90s DOS first-person shooters like Wolfenstein 3D and Blake Stone, with a custom Raycasting-based graphics engine and no vertical aiming...

...and pay homage to the great arena shooters of the late 90s, like Unreal Tournament and Quake III Arena, with fast gameplay and high customizability.

But it also took inspiration from classic arcade games like Bomberman for its gameplay and design: it features simple controls, easy to learn gameplay and every map has a unique mechanic or needs to be played differently.

In PvP, you can play a selection of classic versus and cooperative game modes and an all-new Arcade mode in which you'll go for the highest score surviving 20 random missions alone or together with 3 friends.

And there's even a dark lore for you to discover... Who truly is the Player Versus Player?

Gameplay & Controls

PvP has been thought to be an arena shooter easy enough to be played by anyone but still keeping the game competitive and fun. In PvP, you can just move, aim horizontally, fire, and open doors. There is no way to gain health or keep multiple weapons: don't get hit and keep moving around the map to stay alive and keep firing.

You can use several game controllers to play and all of them can be customized:

Controller Move Aim Fire Open doors
Keyboard WASD Strafe holding F G H
Mouse WASD Moving the mouse Left mouse button Right mouse button
Joypad Left stick / digital cross Right stick / Strafe holding Circle R1 L1
Touch screen Swipe on the left half of the screen Swipe horizontally on the right half of the screen Swipe up on the right half of the screen L2

Controls are explained once the game is started.

Controls tips

  • Holding down the open doors button you can slow down your movement and aim. Try using this technique with sniper rifles and guns!
  • If you still want to use a mouse on a touch screen device hit the Setup button when the game page is loaded and set Mouse to the Screen controls options.

Menu

You can move around menus with the same controllers you use to play.

Controller Move Select Confirm Back
Keyboard Up / Down Left / Right Enter 1
Mouse Moving the mouse Clicking an option Clicking an option Clicking the back button on the top left of the screen
Joypad Up / Down on the digital cross Left / Right on the digital cross Right menu button Left menu button
Touch screen Swipe up/down the right half of the screen Swipe left/right the right half of the screen R1 L1

Fullscreen

You can set the game full screen clicking the icon on the top right of the screen with the mouse or hitting L1+R1 on touch screens.

The radar

In PvP your best ally will be the radar. It's a circular crown in the middle of the screen marking the relative position of key points of the game mode you're playing.

Symbols on the top of the radar (1) are objects in front of you, on the left and right (2) of the radar are on the sides, and on the bottom (3) of the radar are behind you. White symbols (3) indicate far objects, yellow symbols (2) the near ones, and the red symbols (1) objects that are in your proximity. Symbols shape may vary to mark the flag, your base, the hotspot, drones targeting you, etc.

Netplay

What's Netplay?

Netplay allows you to play with your friends on multiple devices connected to a network. PvP can work in two different ways, both featuring Netplay:

  • Standard mode: you don't need any installation. Just go to the game page and start playing.
  • Local mode: you've to install PvP on your local machine or server. This way you can play with friends in the same local network without any internet connection.

In Standard mode, you can play with your friends in the same network but playing over the internet is... possible but probably won't work right quite well now. We need a valid TURN server to enable internet play but we can't afford that right now. We're looking for TURN server donations or any reliable server address to configure but in the meanwhile... I wouldn't rely on that too much. Sorry.

Setting up your nickname

Anything about playing on a network can be set up from the Netplay menu. From the main menu select the Settings option and then select the Netplay... option.

It's the time to choose the nickname you're going to use. Select the Nickname option and type in your battle name.

Remember that you can always go back to the previous menu hitting the back button.

Standard mode

In order to play in LAN with Chrome you've to go to chrome://flags/, search for Anonymize local IPs exposed by WebRTC. and disable it. Have a look here for more.

To play the Standard mode of PvP Netplay just go to the game page, hit Play, plug some controllers and you're ready to go!

Like in the old good times of LAN parties one of the Players must be the server and the others the clients. The server Player has to go to the Netplay menu and select the NET Server mode to see his ID, to be shared with his trusty friends.

client Players have to go to the same Netplay menu but select the NET Client mode instead. Then select the NET Server ID option and input the Server ID.

Then all the Players can hit the Back button until the main menu. Select the Netplay multiplayer, wait to be connected to the server, and follow the onscreen instructions!

Tips

The server Player can share his ID to clients giving them the URL at the bottom of his Netplay screen. You can automatically copy the link to the clipboard selecting the Copy configuration URL to clipboard... option. Players opening this link will be automatically set to NET Client mode and point to the right Server ID. Just select Netplay multiplayer from the main menu and start playing together!

Local mode

PvP can be installed on your local computer/server to play it in a local network without any access to the internet. Have a look at the Installing section to learn how to install it.

When playing in Local mode you'll get an extra mode in the Netplay menu. Select the Socket.io client mode and select the Room option to input a room name. Players selecting the same room will play together.

Then just go back to the main menu and select Netplay multiplayer to start playing together.

Tips

Any Player can share his room ID to other Players giving them the URL at the bottom of his Netplay screen. You can automatically copy the link to the clipboard selecting the Copy configuration URL to clipboard... option. Players opening this link will be automatically set to Socket.io Client mode and point to the right Room ID. Just select Netplay multiplayer from the main menu and start playing together!

Installing

Standard mode

You don't have to install anything to play PvP both locally and on a network. Just go to the game page, hit Play, plug some controllers and you're ready to go!

Self-hosted mode

If for some reason you want to host the game on your web server you need to serve just the client directory. You'll get a Standard mode copy of PvP.

Local mode

PvP includes a node.js local server you can use to host the whole game locally and play together in LAN without using the internet at all. wink wink

You need node.js 14.4.0+ with NPM installed.

  • Download this whole repository
  • With your favorite console go to the server-lan directory
  • Install the needed packages with npm install
  • Run the server with node server.js
  • A message saying Server ready at http://xxx.xxx.xxx.xxx:3000 should appear
  • Point your and your friends' browser to http://xxx.xxx.xxx.xxx:3000
  • Play!


Why this game?

Arena shooters and split-screen

KesieV and Bianca, now married, used to play Unreal Tournament 2004 with a cross-cable years ago and had fun playing Unreal Tournament 3 on consoles with couch versus and co-op. But the genre radically transformed from those years, becoming a less intimate and more social experience, and split-screen first-person shooters are rare these days.

We decided to bring them back the best we could, simplifying the gameplay to make it playable with parents and friends in the process. That also was a nice opportunity for KesieV to play with raycasters a little more.

LAN in late

We knew that networked game has a slightly different gameplay feeling from the split-screen so, after playing the game a lot locally, we felt the urge to try it in LAN so KesieV added networked game using Socket.io. He doesn't think that network features are something you can add at the end in the right way but still... it worked quite well without messing up the code too much. We decided to keep it as an official feature and label it as experimental in the documentation.

Finally, we wanted to play it in LAN anytime without bringing up a server but sadly our hosting plan doesn't support node.js without paying more. The netplay code was already a module plugged to the original game so KesieV decided to write an alternative WebRTC peer-to-peer module using PeerJS. WebRTC allows sharing data in real-time on a local network without installing anything on servers and clients and that's just what we needed. But we knew that we could do a little more...

The cost of Internet

During the early socket.io module development we didn't have enough computers for testing the game with 4 Players so we used ngrok to remotely play with some (very kind and patient) friends. Lag was quite acceptable, even unnoticeable in some tests, so we punched in a TURN server to the WebRTC module to enable internet play... and it worked too! KesieV added some code to reduce the packet exchange and manage the lag effects a little... but keeping a TURN server on is still expensive, so no official Internet play for now.

But speaking of TURN servers...

...feel free to donate a TURN server for PvP to enable internet play for everyone!

Hey, I already know a game named PvP!

Sir, you're a legend! This game is formerly a remake of a fictional game. In 2016 KesieV started a 4-years game development project called Wright in which he explored different game genres (and pop-philosophical themes) writing 100 retro games that never existed. One of them was a 1-on-1 arena shooter with a ZX Spectrum vibe called Player Versus Player.

After the game was out KesieV and his colleagues played it a lot during lunch breaks. Some of them used to say that It should be a first-person shooter! It seems like he doesn't forget.

Why it plays better on Firefox?

The game runs quite smoothly on most modern mobiles and computers but the overall speed seems capped on some laptops using Google Chrome. Moreover, the WebRTC IP Anonymization feature on Chrome may block you from playing PvP in LAN. We suggest you to try using Firefox to play PvP if you're facing one of these problems.

Is there a kiosk mode?

Yes! You can run the game on Google Chrome via game launchers like Playnite with a command like <your Chrome path>/chrome.exe -kiosk --autoplay-policy=no-user-gesture-required "<your PVP installation>/client/index.html#kiosk". The game will autostart and add a "Quit" option.

Contacts

As usual, you can contact KesieV on Twitter or using this GitHub project tools.