Giter VIP home page Giter VIP logo

raycaster's Introduction

Raycaster

This is a quick port of "A first-person engine in 265 lines" from JavaScript to Java using the libGDX framework.

Screenshot

Porting details

Besides the obvious changes in rendering and input code there is four new types introduced that in the original code are represented either as an Array or Object.

  • Point
  • Projection
  • Ray
  • Step

Building

To test it out download the repository and build it using gradle.

Requirements

The following instructions assumes you are in the root folder of the project, eg.

$ git clone https://github.com/walle/raycaster.git
$ cd raycaster

The first time you build the project is going to take a while since all dependencies are downloaded, will be faster after that.

Building the desktop version

The easiest way to test the project is on desktop, just run

$ ./gradlew desktop:run

Building the Android version

Make sure you have the Android SDK and have created an AVD. http://developer.android.com/sdk/index.html#download Start the emulator with your AVD and have it running before building the project. Eg.

$ cd /path/to/android/sdk
$ tools/emulator -avd my_avd_name -gpu on

When you see the emulated home screen, run the gradle task

$ ./gradlew android:installDebug android:run

Building the web version

$ ./gradlew html:superDev

Then open your browser to http://localhost:8080/html/

Building the IOS version

To build the IOS version it's required to use OS X. Also to have Xcode installed, install it from the AppStore. When you have Xcode installed, make sure you have the iOS Simulator installed, otherwise install it. Xcode -> Preferences -> Downloads Then run the gradle task to start the simulator.

$ ./gradlew ios:assemble launchIPhoneSimulator

License

The code is under MIT license, ported from JavaScript.

The images used are from the article http://www.playfuljs.com/a-first-person-engine-in-265-lines/.

raycaster's People

Contributors

walle avatar

Watchers

James Cloos avatar Novemberfive 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.