Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/leia-uwu/resurviv into fe…
Browse files Browse the repository at this point in the history
…at/accounts
  • Loading branch information
lmssiehdev committed Sep 10, 2024
2 parents 923bc6c + 47c67c1 commit 7852bb4
Show file tree
Hide file tree
Showing 55 changed files with 1,146 additions and 4,646 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
reference/

# config file
# legacy
resurviv-config.json
# new
survev-config.json

# env file
.env
Expand Down
44 changes: 22 additions & 22 deletions HOSTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Hosting your own Resurviv server
Looking to host your own Resurviv server to mess around or play against friends? This is the place for you.
# Hosting your own survev server
Looking to host your own survev server to mess around or play against friends? This is the place for you.

## Prerequisites
Before diving into the setup instructions, make sure you have the correct tools for the job. Hosting a dedicated Resurviv server requires two things:
Before diving into the setup instructions, make sure you have the correct tools for the job. Hosting a dedicated survev server requires two things:
* SSH access to a VPS (or some other form of dedicated hosting)
* The ability to open ports on said machine

Expand Down Expand Up @@ -42,7 +42,7 @@ For security reasons, you cannot view your password as you type it. Type in the
If you see a notice notifying you of the machine you have just logged into, congratulations! You have succesfully SSH'd into your server.

### Dependencies
[Resurviv](https://github.com/leia-uwu/resurviv.git) requires a few dependencies:
[Survev](https://github.com/leia-uwu/survev.git) requires a few dependencies:
* [Git](https://git-scm.com)
* [NGINX](https://nginx.org)
* [Node.js](https://nodejs.org)
Expand Down Expand Up @@ -73,8 +73,8 @@ npm i -g pnpm
Next, move into `/opt`, clone the repository and traverse into it:
```sh
cd /opt
git clone https://github.com/leia-uwu/resurviv.git
cd resurviv
git clone https://github.com/leia-uwu/survev.git
cd survev
```

Install the necessary dependencies:
Expand All @@ -94,7 +94,7 @@ openssl rand -base64 32
Configure server:

```sh
nano resurviv-config.json
nano survev-config.json
```
And populate it with the following content:
```json
Expand Down Expand Up @@ -129,17 +129,17 @@ Example config file:
{
"apiKey": "j0wo7RY0pYgD6W2mEy2wLa7VE4olUPD1r2hZma8FU6o=",
"gameServer": {
"apiServerUrl": "https://resurviv.io"
"apiServerUrl": "https://survev.io"
},
"regions": {
"na": {
"https": true,
"address": "na.resurviv.io:8001",
"address": "na.survev.io:8001",
"l10n": "index-north-america"
},
"eu": {
"https": true,
"address": "eu.resurviv.io:8001",
"address": "eu.survev.io:8001",
"l10n": "index-europe"
}
},
Expand All @@ -162,7 +162,7 @@ If you are only hosting a game server you can skip this.

Make sure the build directory has the proper permissions:
```sh
sudo chown -R www-data:www-data /opt/resurviv/client/dist
sudo chown -R www-data:www-data /opt/survev/client/dist
```

First, remove the default file:
Expand All @@ -173,7 +173,7 @@ sudo rm /etc/nginx/sites-available/default

Create a new file:
```sh
nano /etc/nginx/sites-available/resurviv.conf
nano /etc/nginx/sites-available/survev.conf
```

And populate it with the following content:
Expand All @@ -186,7 +186,7 @@ server {
# Client build
location / {
root /opt/resurviv/client/dist;
root /opt/survev/client/dist;
}
# API server
Expand Down Expand Up @@ -225,7 +225,7 @@ Save the file using `Ctrl + X`, and press `Y` to confirm the file name.

To enable the configuration:
```sh
sudo ln -s /etc/nginx/sites-available/resurviv.conf /etc/nginx/sites-enabled/resurviv.conf
sudo ln -s /etc/nginx/sites-available/survev.conf /etc/nginx/sites-enabled/survev.conf
sudo systemctl restart nginx
```

Expand All @@ -236,17 +236,17 @@ which will ensure our application starts at boot and won't terminate if we end o
If you are only hosting a game server, skip the API server part.

```sh
sudo nano /etc/systemd/system/resurviv-game.service
sudo nano /etc/systemd/system/survev-game.service
```

And populate it with the following content:
```ini
[Unit]
Description=Resurviv dedicated game server.
Description=survev dedicated game server.

[Service]
Type=simple
WorkingDirectory=/opt/resurviv/server
WorkingDirectory=/opt/survev/server
ExecStart=/usr/bin/pnpm start:game
Restart=on-failure

Expand All @@ -258,23 +258,23 @@ Save the file using `Ctrl + X`, and press `Y` to confirm the file name.

Enable the unit:
```sh
sudo systemctl enable --now resurviv-game
sudo systemctl enable --now survev-game
```

Now do the same for the API server if applicable:

```sh
sudo nano /etc/systemd/system/resurviv-api.service
sudo nano /etc/systemd/system/survev-api.service
```

And populate it with the following content:
```ini
[Unit]
Description=Resurviv dedicated API server.
Description=survev dedicated API server.

[Service]
Type=simple
WorkingDirectory=/opt/resurviv/server
WorkingDirectory=/opt/survev/server
ExecStart=/usr/bin/pnpm start:api
Restart=on-failure

Expand All @@ -285,7 +285,7 @@ Save the file using `Ctrl + X`, and press `Y` to confirm the file name.

Enable the unit:
```sh
sudo systemctl enable --now resurviv-api
sudo systemctl enable --now survev-api
```

If you've done everything correctly, you should be able to access the server at `http://youriphere` (ex: `http://1.1.1.1`).
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Open sourced surviv.io
Resurviv.io is an open source recreation of a hit web game "surviv.io" that has been permanently shut down.
Survev.io is an open source recreation of a hit web game "surviv.io" that has been permanently shut down.

Our goal is to immortalize it by getting the recreation as close as possible to the last canonical version of the game.

Expand Down
62 changes: 55 additions & 7 deletions client/css/app.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import url(font.css);

:root {
--side-pad: 12px;
}
Expand Down Expand Up @@ -308,27 +306,73 @@ a:active {
background-color: rgba(0, 0, 0, 0.5);
border-radius: 5px;
box-sizing: border-box;
height: 323px;
height: 250px;
margin-right: 30px;
width: 300px;
overflow-y: auto;
}

@media (max-width: 850px),
(max-width: 900px) and (-webkit-min-device-pixel-ratio: 3),
(max-width: 900px) and (min-resolution: 3dppx) {
#ad-block-left {
margin-right: 18px;
height: 230px;
height: 165px;
width: 200px;
}
}

.ad-block-med-rect {
padding: 20px;
overflow-y: auto;
height: 250px;
width: 300px
}

@media(max-width: 850px),(max-width:900px) and (-webkit-min-device-pixel-ratio:3),(max-width:900px) and (min-resolution:3dppx) {
.ad-block-med-rect {
position:absolute;
-webkit-transform: scale(.67);
transform: scale(.67);
-webkit-transform-origin: left top;
transform-origin: left top
}
}

.surviv-shirts {
background-position: center;
background-repeat: no-repeat;
background-size: cover;
display: block;
height: 250px;
width: 300px
}

.surviv-shirts a {
height: 250px;
position: absolute;
width: 300px
}

.surviv-shirts {
background-image: url(/img/discord-promo.png)
}

/*
.adblock-plea {
display: none;
height: 250px;
width: 300px
}
.adblock-plea span {
color: gold;
display: block;
font-size: 24px;
font-weight: 700;
line-height: 28px;
padding: 64px 24px;
text-align: center
}
*/

.ui-stats-adblock {
background-color: rgba(0, 0, 0, 0.5);
display: none;
Expand Down Expand Up @@ -6659,6 +6703,10 @@ input [type="image"]:focus {
transform: translateX(-50%);
}

.ad-block-med-rect {
transform: scale(.92);
}

#team-menu {
position: absolute;
width: 275px;
Expand Down
15 changes: 0 additions & 15 deletions client/css/font.css

This file was deleted.

56 changes: 35 additions & 21 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,26 @@
<meta charset='UTF-8'>
<title>survev.io - 2d battle royale game</title>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover, user-scalable=no">
<link rel="manifest" href="manifest.json">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="survev.io">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="application-name" content="survev.io">
<meta name="description" content="Like games such as Player Unknown's Battlegrounds (PUBG), Fortnite or Apex Legends? Play this free 2d battle royale io game in your browser!">
<meta property="og:description" content="Like games such as Player Unknown's Battlegrounds (PUBG), Fortnite or Apex Legends? Play this free 2d battle royale io game in your browser!">
<meta name="keywords" content="survev, resurviv, survivio, surviv, 2d battle royale, io, battle royale browser game, 2d battlegrounds, battlegrounds, battleroyale, battle, royale, browser game, br, survival, game, web game, multiplayer">
<meta property="og:type" content="website">
<meta property="og:title" content="survev.io">
<meta property="og:url" content="https://survev.io/">
<meta property="og:site_name" content="survev.io">
<meta content="https://raw.githubusercontent.com/leia-uwu/resurviv/master/client/public/img/title.png" property="og:image">
<meta content="https://survev.io/img/survev_title.png" property="og:image">
<link rel="canonical" href="https://survev.io" />
<link rel="apple-touch-icon" href="img/apple-touch-icon-180x180.png">
<link rel="apple-touch-icon-precomposed" href="img/icon_app.png">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="mask-icon" href="img/maskable-icon-512x512.png" color="#FFFFFF">
<meta name="theme-color" content="#80af49">
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700" rel="stylesheet">

<link href="css/app.css" rel="stylesheet">
<link href="css/game.css" rel="stylesheet">
</head>
Expand Down Expand Up @@ -773,24 +779,32 @@ <h2 data-l10n='index-account'>Account</h2>
</div>
<div id='left-column' class='menu-column'>
<div id='ad-block-left'>
<div class='ad-block-med-rect'>
<h3 class='news-header'>About survev</h3>
<p>Survev.io is an open source recreation of a hit web game "surviv.io" that has been permanently shut down.</p>
<p>Our goal is to immortalize it by getting the recreation as close as possible to the last canonical version of the game.</p>
<p>We do not consider any updates after the Kongregate acquisition canonical, so those will not be a part of the project.</p>
<div class='surviv-shirts'>
<a href='https://discord.gg/6uRdCdkTPt' target="_blank"></a>
</div>
<!--
<div class='adblock-plea'>
<span>Please consider supporting us by disabling your adblocker.</span>
</div>
-->
<div class='ad-block-med-rect' id='surviv-io_300x250'>
</div>
</div>
<!-- <div id='social-share-block-wrapper'>
<div id='social-share-block-wrapper'>
<div id='social-share-block' class='menu-block'>
<div class='btn-social-wrapper'>
<a href='https://facebook.com/resurviv' target='_blank' class='btn-social btn-darken btn-facebook'></a>
<a href='https://twitter.com/resurviv' target='_blank' class='btn-social btn-darken btn-twitter'></a>
<a href='https://www.instagram.com/resurviv/' target='_blank' class='btn-social btn-darken btn-instagram'></a>
<a href='https://discord.gg/resurviv' target='_blank' class='btn-social btn-darken btn-discord'></a>
<a href='https://www.youtube.com/c/resurviv?sub_confirmation=1' target='_blank' class='btn-social btn-darken btn-youtube'></a>
<!--
<a href='https://facebook.com/survev' target='_blank' class='btn-social btn-darken btn-facebook'></a>
<a href='https://twitter.com/survev' target='_blank' class='btn-social btn-darken btn-twitter'></a>
<a href='https://www.instagram.com/survev/' target='_blank' class='btn-social btn-darken btn-instagram'></a>
-->
<a href='https://discord.gg/6uRdCdkTPt' target='_blank' class='btn-social btn-darken btn-discord'></a>
<!--
<a href='https://www.youtube.com/c/survev?sub_confirmation=1' target='_blank' class='btn-social btn-darken btn-youtube'></a>
-->
</div>
</div>
</div> -->
</div>
</div>
<div id='start-menu' class='menu-column menu-block'>
<div class='play-loading-outer'>
Expand Down Expand Up @@ -1265,11 +1279,11 @@ <h2>&nbsp;</h2>
</div>
<div class='modal-divider'></div>
<!-- <div class='btn-social-wrapper'>
<a href='https://facebook.com/resurviv' target='_blank' class='btn-social btn-darken btn-facebook'></a>
<a href='https://twitter.com/resurviv' target='_blank' class='btn-social btn-darken btn-twitter'></a>
<a href='https://www.instagram.com/resurviv/' target='_blank' class='btn-social btn-darken btn-instagram'></a>
<a href='https://discord.gg/resurviv' target='_blank' class='btn-social btn-darken btn-discord'></a>
<a href='https://www.youtube.com/c/resurviv?sub_confirmation=1' target='_blank' class='btn-social btn-darken btn-youtube'></a>
<a href='https://facebook.com/survev' target='_blank' class='btn-social btn-darken btn-facebook'></a>
<a href='https://twitter.com/survev' target='_blank' class='btn-social btn-darken btn-twitter'></a>
<a href='https://www.instagram.com/survev/' target='_blank' class='btn-social btn-darken btn-instagram'></a>
<a href='https://discord.gg/survev' target='_blank' class='btn-social btn-darken btn-discord'></a>
<a href='https://www.youtube.com/c/survev?sub_confirmation=1' target='_blank' class='btn-social btn-darken btn-youtube'></a>
</div> -->
<div class='modal-divider'></div>
<div id='modal-hamburger-bottom'>
Expand Down
3 changes: 1 addition & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
},
"devDependencies": {
"@types/jquery": "^3.5.30",
"vite": "^5.4.0",
"vite-plugin-pwa": "^0.20.1",
"vite": "^5.4.3",
"vite-plugin-strip-block": "^1.0.1"
}
}
Binary file removed client/public/img/apple-touch-icon-180x180.png
Binary file not shown.
Binary file added client/public/img/discord-promo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7852bb4

Please sign in to comment.