Giter Club home page Giter Club logo

libgdx-ashley-box2d-example's Introduction

#Example libGDX using Box2D and Ashley ECS

This is a starter project available to get up and running with libgdx using Box2D in an Ashley ECS based structure. The code is very basic, and the game does very little at this time. This example will give you a starting point with:

  1. Configured texture-packer module that is wired into the gradle system so textures are re-packed when you run (see core/build.gradle)
  2. Simple Texture, Transform, Animation, State, and Body components.
  3. RenderingSystem that accounts for world units to pixels and Z indexing (based heavily on the ashley-superjumper example)
  4. AnimationSystem that supports animations for different States.
  5. PhysicsSystem that will run the World.step() and update TransformComponents for any physics Entities.
  6. A basic splash screen that will show the splash image and a progress bar based on the AssetManager loading progress.
  7. An Asset utility class to setup your AssetManager loading, and retrieval of assets in one location (you'll want to add code to this file to expose more assets)
  8. A crude Screen dipatching pattern that can allow each screen to signal when it has ended and needs to move to the next. You can implement your own IScreenDispatcher or modify the existing to do more complex screen swapping.
  9. Added the required gdx.reflect.include options for Ashley Components and Systems so that the GWT Html build works.

#Running

The project was created with the libGDX setup application, and is gradle based. You can import it into your IDE of choice as a Gradle project.

From the command line you can run the project:

git clone https://github.com/RoaringCatGames/libgdx-ashley-box2d-example.git
cd libgdx-ashley-box2d-example
./gradlew texture-packer:run desktop:run

NOTE: You only need to run the texture-packer:run target once after pulling down the project. If you add/update art assets in the texture-packer project, you'll need to re-run the texture-packer:run target

libgdx-ashley-box2d-example's People

Contributors

barryrowe avatar

Watchers

 avatar  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.