Giter VIP home page Giter VIP logo

haxesummitus2018workshop's Introduction

banner

Haxe Summit US 2018 Introductory Haxe Workshop

Workshop info: Introductory Haxe Workshop

This is an agar.io clone to demonstrate the capability of Haxe in building cross platform games, where codes are shared among multiple game platforms (web, mac, windows, android & ios), as well as between game client and game server for multiplayer games.

Demo: https://andyli.github.io/HaxeSummitUS2018Workshop/ (single player mode)

Preparation

Participants should have programming experience with at least one programming language. Proficiency with JavaScript, Java, or C# is ideal, but experience with other languages such as C/C++, Python, or Ruby is also sufficient. Participants should have some familiarity using the command line. Participants should bring their own laptop computer, with either Windows, Mac, or Linux installed.

Please follow the instruction listed below before the workshop, such that you can progress smoothly.

Install Haxe

Get Haxe from https://haxe.org/download/. We recommend 3.4.7, but 4.0.0-preview.3 is also fine.

Install Node.js

Get Node.js from https://nodejs.org/. We recommend the LTS version, but the latest release is also fine.

Install Visual Studio Code

Although in theory you can use any IDE or text editor, we recommend using Visual Studio Code with the Haxe Extension Pack, which offers the best Haxe support at the moment.

Notes

We will introduce Haxe and go through creating a simple multi-player game during the workshop together. The instruction will be given during the workshop. Below are some notes for future reference.

The workshop is divided into 5 sections:

  1. Getting started
    • what is Haxe
    • showcases
    • download and install
  2. Haxe programming basics
    • VSCode project setup
    • basic building blocks
  3. Game building with Heaps
    • using Haxe libraries and frameworks
    • game architecture
  4. Using NodeJS
    • using native libraries (writing externs)
    • NodeJS basics (CLI, NPM)
  5. Multiplayer
    • server-client communication

quick links

Shared Code

The World class contains the core game logic. When the game is set to single-player mode, the World is run in the client. In other words, the same piece of Haxe code for the World class is compiled into different platforms (web, mac, windows, android & ios). When the game is in multi-player mode, the World is run on the server. Again, the same piece of Haxe code for the World class is compiled into the server language (nodejs for our choice here).

The Command and Message enums represents the protocol between the client and server in multiplayer mode. The same piece of code is used in both client and server.

Feedback / Questions

Feel free to open issues or contact us directly.

License

CC0
To the extent possible under law, Andy Li has waived all copyright and related or neighboring rights to Haxe Summit US 2018 Introductory Haxe Workshop. This work is published from: Hong Kong.

haxesummitus2018workshop's People

Contributors

andyli avatar kevinresol avatar

Watchers

James Cloos avatar Zaphod avatar

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.