Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ramsestom/Ogar
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: OgarProject/Ogar
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.

Commits on Aug 1, 2015

  1. Move tasks from if statments to functions

    Kaiden Prince committed Aug 1, 2015
    Copy the full SHA
    9c45029 View commit details
  2. Copy the full SHA
    511c47b View commit details
  3. renamed windows install script

    Kaiden Prince committed Aug 1, 2015
    Copy the full SHA
    1ee6f13 View commit details
  4. Added Linux start script

    Kaiden Prince committed Aug 1, 2015
    Copy the full SHA
    69c64d9 View commit details
  5. modified .gitignore for linux start script

    Kaiden Prince committed Aug 1, 2015
    Copy the full SHA
    6978bb4 View commit details

Commits on Nov 8, 2015

  1. Update cell.js and add custom speed support

    The code checks the config for an option called playerSpeed and uses that value as the base of the player's speed.
    mnurzia committed Nov 8, 2015
    Copy the full SHA
    d2f218f View commit details
  2. Add playerSpeed default to gameserver.js

    Without this the game might crash if there is no gameserver.ini
    mnurzia committed Nov 8, 2015
    Copy the full SHA
    801a226 View commit details
  3. Copy the full SHA
    25ba078 View commit details
  4. Merge pull request OgarProject#277 from maxmillion18/master

    Add player speed option
    vram4 committed Nov 8, 2015
    Copy the full SHA
    f8a3c0e View commit details

Commits on Dec 11, 2015

  1. Copy the full SHA
    6f13582 View commit details
  2. Added help command.

    microcoded committed Dec 11, 2015
    Copy the full SHA
    38b83c6 View commit details
  3. Merge pull request OgarProject#301 from JCookie20001/patch-2

    Added help command.
    vram4 committed Dec 11, 2015
    Copy the full SHA
    1050a4f View commit details
  4. Merge pull request OgarProject#300 from JCookie20001/patch-1

    (Updated Botnames To Every Skin)
    vram4 committed Dec 11, 2015
    Copy the full SHA
    191c6d1 View commit details
  5. Copy the full SHA
    fdd8d2e View commit details

Commits on Dec 12, 2015

  1. Copy the full SHA
    0d21ac8 View commit details

Commits on Dec 13, 2015

  1. Merge pull request OgarProject#304 from JCookie20001/patch-4

    Added a title at the start.
    vram4 committed Dec 13, 2015
    Copy the full SHA
    83e4d5b View commit details

Commits on Dec 14, 2015

  1. Merge pull request OgarProject#303 from JCookie20001/patch-3

    Removed skins that are no longer in agar.io
    vram4 committed Dec 14, 2015
    Copy the full SHA
    b41cdab View commit details

Commits on Dec 23, 2015

  1. Merge pull request OgarProject#316 from jlachniet/master

    More description on help menu
    vram4 committed Dec 23, 2015
    Copy the full SHA
    9e3b24c View commit details

Commits on Dec 24, 2015

  1. More description on help menu

    Added structure of arguments to help menu
    BuildTools committed Dec 24, 2015
    Copy the full SHA
    3c860d4 View commit details
  2. Update GameServer.js

    I've improved the colors. Now the colors are generated automaticaly and are much beautyful and much like the original agar.io colors.
    Tiberiu02 committed Dec 24, 2015
    Copy the full SHA
    fa05b6e View commit details

Commits on Dec 25, 2015

  1. Merge pull request OgarProject#318 from Tiberiu02/patch-3

    Updated Colors
    vram4 committed Dec 25, 2015
    Copy the full SHA
    e135388 View commit details
  2. Updated the move engine

    I've found that is better to move cells close to the mouse first.
    Tiberiu02 committed Dec 25, 2015
    Copy the full SHA
    f6a0df6 View commit details
  3. Updated collision engine

    I've found that the collision engine was wrong coded. After the changes I've made the collisions will be exactly like on the original agar.io
    Tiberiu02 committed Dec 25, 2015
    Copy the full SHA
    8b3ca1a View commit details
  4. Merge pull request OgarProject#320 from Tiberiu02/Tiberiu02-patch-1

    Updated move engine
    vram4 committed Dec 25, 2015
    Copy the full SHA
    3f31fee View commit details
  5. Kickbot command

    I've added the kickbot command
    Tiberiu02 committed Dec 25, 2015
    Copy the full SHA
    29b2e15 View commit details
  6. Merge pull request OgarProject#322 from Tiberiu02/patch-5

    Kickbot command
    vram4 committed Dec 25, 2015
    Copy the full SHA
    a329de5 View commit details

Commits on Dec 26, 2015

  1. Update PlayerCell.js

    Tiberiu02 committed Dec 26, 2015
    Copy the full SHA
    6fd8fc4 View commit details
  2. Update botnames.txt

    Ronit Sajeey aka. (_matias98_, LevnettUK_Ronit, ItzLevvie, LaishaBear and Castia994) committed Dec 26, 2015
    Copy the full SHA
    5538845 View commit details

Commits on Dec 27, 2015

  1. Update GameServer.js

    Tiberiu02 committed Dec 27, 2015
    Copy the full SHA
    2f22d7c View commit details
  2. Update gameserver.ini

    Tiberiu02 committed Dec 27, 2015
    Copy the full SHA
    63cc621 View commit details
  3. Merge pull request OgarProject#324 from rsajeey/patch-1

    Added 22 more skins. {Tested}
    vram4 committed Dec 27, 2015
    Copy the full SHA
    eef46d5 View commit details
  4. Merge pull request OgarProject#326 from Tiberiu02/patch-7

    Added eject mass cooldown
    vram4 committed Dec 27, 2015
    Copy the full SHA
    2729c6b View commit details

Commits on Dec 31, 2015

  1. Copy the full SHA
    8c18ccf View commit details
  2. Merge pull request OgarProject#333 from mrmarktyy/feature/food-grow

    feature: add the ability for food to grow like agar.io
    vram4 committed Dec 31, 2015
    Copy the full SHA
    b645e53 View commit details

Commits on Jan 1, 2016

  1. Copy the full SHA
    076a308 View commit details
  2. Copy the full SHA
    058a86c View commit details
  3. Merge pull request OgarProject#346 from llbraughler/master

    Improvements to AI code
    vram4 committed Jan 1, 2016
    Copy the full SHA
    c788cd9 View commit details
  4. Copy the full SHA
    25fc7ed View commit details
  5. Copy the full SHA
    1bb77f1 View commit details

Commits on Jan 2, 2016

  1. Merge pull request OgarProject#350 from mrmarktyy/bug/food-mass-grow

    bug fixes for food mass grow feature
    vram4 committed Jan 2, 2016
    Copy the full SHA
    42d8811 View commit details
  2. Fixed bug (food grow feature) in Experimental Teams

    Without this, you'll get an error
    
    TypeError: Cannot read property 'config' of undefined
        at Cell.Food (C:\Users\XXXX\Desktop\Ogar-master\src\entity\Food.js:11:24)
        at Cell.MotherCell.spawnFood (C:\Users\XXXX\Desktop\Ogar-master\src\gamemodes\TeamX.js:404:13)
        at Cell.MotherCell.update (C:\Users\XXXX\Desktop\Ogar-master\src\gamemodes\TeamX.js:341:18)
        at Mode.TeamX.updateMotherCells (C:\Users\XXXX\Desktop\Ogar-master\src\gamemodes\TeamX.js:47:16)
        at Mode.TeamX.onTick (C:\Users\XXXX\Desktop\Ogar-master\src\gamemodes\TeamX.js:299:14)
        at GameServer.gamemodeTick (C:\Users\XXXX\Desktop\Ogar-master\src\GameServer.js:367:19)
        at GameServer.mainLoop (C:\Users\XXXX\Desktop\Ogar-master\src\GameServer.js:387:29)
        at wrapper [as _onTimeout] (timers.js:275:19)
        at Timer.listOnTimeout (timers.js:92:15)
    ItzLevvie committed Jan 2, 2016
    Copy the full SHA
    635ce6f View commit details
  3. Merge pull request OgarProject#353 from ItzLevvie/patch-1

    Fixed bug (food grow feature) in Experimental Teams
    vram4 committed Jan 2, 2016
    Copy the full SHA
    112e19f View commit details
  4. Update PlayerCell.js

    Without this, you'll get an error
    ```
    TypeError: cell.simpleCollide is not a function
        at Mode.Teams.onCellMove (C:\Users\XXXX\Desktop\Ogar-master\src\gamemodes\Teams.js:105:23)
        at Cell.PlayerCell.calcMove (C:\Users\XXXX\Desktop\Ogar-master\src\entity\PlayerCell.js:84:25)
        at GameServer.updateMoveEngine (C:\Users\XXXX\Desktop\Ogar-master\src\GameServer.js:531:14)
        at GameServer.cellTick (C:\Users\XXXX\Desktop\Ogar-master\src\GameServer.js:351:10)
        at GameServer.mainLoop (C:\Users\XXXX\Desktop\Ogar-master\src\GameServer.js:385:29)
        at wrapper [as _onTimeout] (timers.js:275:19)
        at Timer.listOnTimeout (timers.js:92:15)
    ```
    
    NOTE: This error occurs when you add bots to Teams, Zombie or Zombie Team.
    ItzLevvie committed Jan 2, 2016
    Copy the full SHA
    bc27afb View commit details
  5. Merge pull request OgarProject#354 from ItzLevvie/patch-1

    Fixed bug when adding bots to Teams, Zombie or Zombie Teams.
    vram4 committed Jan 2, 2016
    Copy the full SHA
    c17cc90 View commit details

Commits on Jan 5, 2016

  1. Copy the full SHA
    1531a0f View commit details
  2. Merge pull request OgarProject#323 from Tiberiu02/patch-6

    Border update
    vram4 committed Jan 5, 2016
    Copy the full SHA
    2399538 View commit details
  3. Merge pull request OgarProject#359 from EvanCarroll/master

    fixed to use new version of ws (compatable with modern node)
    vram4 committed Jan 5, 2016
    Copy the full SHA
    0210e3a View commit details

Commits on Jan 6, 2016

  1. Coordinate system obfuscation as an anti-bot measure

    Each client is provided with a different, randomized coordinate system. This thwarts communication between minion bots and a cheating player.
    scholtes committed Jan 6, 2016
    Copy the full SHA
    414d891 View commit details
  2. Merge pull request OgarProject#363 from scholtes/security-fix-1

    Coordinate system obfuscation as an anti-bot measure
    vram4 committed Jan 6, 2016
    Copy the full SHA
    9c8baef View commit details
  3. Update PacketHandler.js

    ItzLevvie committed Jan 6, 2016
    Copy the full SHA
    76ec4d4 View commit details
Showing with 4,435 additions and 3,272 deletions.
  1. +3 −0 .gitignore
  2. +14 −0 Dockerfile
  3. +8 −0 Install Dependencies.bat
  4. +9 −3 README.md
  5. +6 −0 docker-compose.yml
  6. +178 −157 ogar-linux-script.sh
  7. +2 −1 package.json
  8. +86 −0 src/CollisionHandler.js
  9. +259 −622 src/GameServer.js
  10. +374 −0 src/NodeHandler.js
  11. +54 −50 src/PacketHandler.js
  12. +23 −0 src/PlayerHandler.js
  13. +280 −153 src/PlayerTracker.js
  14. +100 −0 src/PluginHandler.js
  15. +36 −0 src/Start-linux.sh
  16. +3 −0 src/Start-windows.bat
  17. +0 −2 src/Start.bat
  18. +1 −3 src/ai/BotLoader.js
  19. +133 −446 src/ai/BotPlayer.js
  20. +1 −2 src/ai/FakeSocket.js
  21. +30 −2 src/ai/Readme.txt
  22. +127 −50 src/botnames.txt
  23. +59 −118 src/entity/Cell.js
  24. +33 −24 src/entity/EjectedMass.js
  25. +32 −12 src/entity/Food.js
  26. +66 −116 src/entity/PlayerCell.js
  27. +88 −68 src/entity/Virus.js
  28. +0 −1 src/entity/index.js
  29. +13 −14 src/gamemodes/Debug.js
  30. +99 −178 src/gamemodes/Experimental.js
  31. +36 −56 src/gamemodes/FFA.js
  32. +26 −0 src/gamemodes/GamemodeList.js
  33. +187 −48 src/gamemodes/HungerGames.js
  34. +10 −10 src/gamemodes/Mode.js
  35. +134 −41 src/gamemodes/Rainbow.js
  36. +95 −81 src/gamemodes/TeamX.js
  37. +221 −191 src/gamemodes/TeamZ.js
  38. +44 −53 src/gamemodes/Teams.js
  39. +12 −13 src/gamemodes/Tournament.js
  40. +24 −21 src/gamemodes/Zombie.js
  41. +0 −53 src/gamemodes/index.js
  42. +65 −38 src/gameserver.ini
  43. +35 −27 src/index.js
  44. +750 −372 src/modules/CommandList.js
  45. +150 −0 src/modules/QuadTree.js
  46. +73 −0 src/modules/Rectangle.js
  47. +159 −0 src/modules/Vector.js
  48. +17 −28 src/modules/ini.js
  49. +18 −11 src/modules/log.js
  50. +3 −3 src/packet/AddNode.js
  51. +4 −3 src/packet/ClearNodes.js
  52. +0 −1 src/packet/DrawLine.js
  53. +85 −0 src/packet/DynamicBuffer.js
  54. +0 −1 src/packet/SetBorder.js
  55. +49 −114 src/packet/UpdateLeaderboard.js
  56. +79 −83 src/packet/UpdateNodes.js
  57. +0 −1 src/packet/UpdatePosition.js
  58. +0 −1 src/packet/index.js
  59. +3 −0 src/plugins/README.md
  60. +35 −0 src/plugins/example/index.js
  61. +4 −0 src/plugins/options.ini
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -32,3 +32,6 @@ node_modules
src/.settings/.jsdtscope
src/.settings/org.eclipse.wst.jsdt.ui.superType.container
src/.settings/org.eclipse.wst.jsdt.ui.superType.name

# Linux start script warning file
src/.readwarning
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:argon

# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

# Install app dependencies
COPY package.json /usr/src/app/
RUN npm install

# Bundle app source
COPY . /usr/src/app

EXPOSE 8080
8 changes: 8 additions & 0 deletions Install Dependencies.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@echo off
npm install
echo.
echo.
echo Successfully installed all dependecies!
echo Please don't touch folder "node-modules".
echo It is the folder where dependecies are installed.
pause >nul
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -10,12 +10,16 @@ If you've purchased a copy of Ogar, you've probably been ripped off. [This post
## Obtaining and Using
If you are on Windows, you can download the latest binary build of Ogar [from this page](http://dl.ogarproject.com/). The binary is the easiest way to get started running an Ogar server. If you'd like to tinker with the source code, you can follow the instructions below (and slightly modify them) to run the source on Windows.

As Ogar is written in Node.js, you must have Node.js and its "ws" module installed to use it (unless you are using the Windows binary). You can usually download Node using your distribution's package manager (for *nix-like systems), or from [the Node website](http://nodejs.org). To install the "ws" module that is required, open up your system command line (cmd for windows, terminal for mac) and type "npm install ws". If you are on Linux, you can use the install script which would also automatically install node.js and ws.
As Ogar is written in Node.js, you must have Node.js, its "ws" and "vector2-node" modules installed to use it (unless you are using the Windows binary). You can usually download Node using your distribution's package manager (for *nix-like systems), or from [the Node website](http://nodejs.org). To install the "ws" module that is required, you can:
- for Windows, run `Install Dependecies.bat` located in the folder where this file is.
- for Mac, open your terminal, go to this directory with `cd` and type in `npm install`.
- for Linux, you can use the install script which would also automatically install node.js and ws.

Manual:
```sh
~$ git clone git://github.com/OgarProject/Ogar.git Ogar
~$ npm install ws
~$ cd Ogar
~$ npm install
~$ node Ogar
```
Using the install script:
@@ -72,6 +76,8 @@ The current available console commands are listed here. Command names are not ca
* Spawns a food cell at those coordinates. If a mass value is not specified, then the server will default to "foodStartMass" in the config.
- Gamemode [Id]
* Changes the gamemode of the server. Warning - This can cause problems.
- Help
* Shows List Of Commands
- Kick [Player ID]
* Kicks the specified player or bot from the server.
- Kill [Player ID]
@@ -83,7 +89,7 @@ The current available console commands are listed here. Command names are not ca
- Name [Player ID] [New Name]
* Changes the name of the player with the specified id with [New Name].
- Playerlist
* Shows a list of connected players, their IP, player ID, the amount of cells they have, total mass, and their position.
* Shows a list of connected players, their IP, player ID, the amount of cells they have, total mass, and their position.
- Pause
* Pauses/Unpauses the game.
- Reload
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
web:
build: .
ports:
- "8000:80"
- "8181:443"
command: node src/index.js
Loading