Giter Club home page Giter Club logo

13k_lost's Introduction

js13kgames.com Game Server

Game server for the js13kGames Competition.

Install

Download the skeleton. Extract the files and install the third party libraries with npm.

npm install

Running

You can run the server locally with the following command:

npm start

You can reach the test server at http://localhost:3000

Code structure

All your code must be in the public folder. Put your server side code into the server.js file. The shared.js file is loaded at the begining of the server.js file. You can also use this code on the client side.

Deploy to Heroku

  1. Push your files to your GitHub repository
  2. Create new WebApp on heroku
  3. Connect your WebApp with the GitHub repository
  4. Deploy your code

Submit your entry

  1. Zip all files in the public folder.
  2. Submit your entry on the js13kgames.com site.
  3. Add [email protected] games as collaborator to your Heroku WebApp.

Server category rules

  • Sandbox server

  • Package size still below 13 kB

    • Game package will contain all the game code and assets, for the client and the server.
  • Sandboxed environment

    • Your game will run in a node.js based sandbox environment. That means you will not really use node. You cannot require modules and your own modules shipped by your 13k pack.
  • Do not leak the sandbox

    • This is not a hacking competition. This is a way to help the competition admins, the site persistence, and you. Do not touch the procfile and the index.js file.
  • Socket.io client lib

    • You can use it. Simply add <script src="/socket.io/socket.io.js"></script> to your HTML and that will be loaded. No server configuration will be needed. The sandbox already did it.
  • Can I test the sandbox before submitting?

  • Is there any example? How do I develop my game using the sandbox server?

    • There's a simple "Rock, Paper, Scissors" example in the public folder.
  • I have more questions!

FAQ

  • Can I minify the server side code?

    • Yes, but you have to keep the readable code also.
  • Can I add more npm packages?

    • Yes, but you cannot use them in your game code.
  • What files count in the 13kb limit?

    • All files in the public folder.
  • Can I deploy new code after I submited the entry?

    • Yes, but you have to resubmit your entry on the site also.
  • Can I modify the procfile or the index.js file?

    • No

13k_lost's People

Contributors

cypher1 avatar wemyss avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

js13kgames

13k_lost's Issues

Things I need to fix/do

  • Player spawn point. Needs to be random and not inside walls
  • Player update() function. It's disgusting. Can I make it a finite state machine?
  • Add treasure/explosives objects to map.
  • Add camera and zoom/pan with player
  • Add enemies that spawn and search for you

Multiplayer

Opening this to ask the question:
How are we going to synchronise everything.

I think we need to change how the keys are processed so that we send key events directly to the server and then the server sends back thw whole game state.

That or we'd have to synchronise events which is tricky in js.

Any ideas?

compression and minification

I'm thinking just to keep things simple we just use a tool like mergejs, that way we can just focus on writing code.

We aren't using a module bundler which counts out a lot of the automated compression, minification and bundling tools (e.g. gulp, webpack).

Game Idea

  • Theme - Lost
  • Category - Multiplayer (server)

Things to discuss:

  • Mechanic/s, what game mechanic do we want to focus on with 13kb
  • Story or no story
  • Number of players (min, max)
  • Assets, lots, some or none

@Cypher1 feel free to add more ๐Ÿ˜‹

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.