Giter VIP home page Giter VIP logo

artemis-odb's Introduction

Artemis-odb

Build status Discord Chat License

Artemis-odb is a high performance java based Entity-Component-System framework.

It is mature, actively maintained, and a continuation of the popular Artemis.

Highlights

See CHANGELOG.md for more details

Fast!

Artemis-odb is one of the fastest incarnations of Artemis! Don't take our word for it, check out and run the benchmarks yourself!

Operations/second. Higher is better.

it16k ir16k arc16k

Learn from others!

Dozens of games with source available in the Game Gallery!

Use it commercially!

Dog Sled Saga

Expand your toolkit!

Tools, Extensions and Frameworks

Getting started

Community

Share your thoughts and questions with us!

Maven

<dependency>
	<groupId>net.onedaybeard.artemis</groupId>
	<artifactId>artemis-odb</artifactId>
	<version>2.4.0</version>
</dependency>

See weave automation and module overview

Gradle

  dependencies { compile "net.onedaybeard.artemis:artemis-odb:2.4.0" }

Manual Download

License

This work is licensed under BSD 2-Clause "Simplified" License except the cross platform reflection code, which has been sourced from LibGDX and falls under the Apache License 2.0. These files can be identified by the Apache License header. Apache 2.0 license can be found under artemis-core\artemis\LICENSE.libgdx.

SPDX-License-Identifier: BSD-2-Clause AND Apache-2.0

artemis-odb's People

Contributors

a-ivanov avatar daanvanyperen avatar deepscorn avatar denniskaselow avatar dependabot[bot] avatar encounter avatar fabiitch avatar fabio-t avatar flet avatar gitter-badger avatar gjroelofs avatar jessetg avatar josephknight avatar junkdog avatar lopho avatar matozoid avatar mr00anderson avatar mtsr avatar namek avatar nicolaichuk avatar oliver32767 avatar piotr-j avatar schosin avatar siminn-arniag avatar snorrees avatar sonirico avatar wulf avatar zielmartin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

artemis-odb's Issues

Request: Inject superclass fields with @Wire

Loving @Wire on the class so far, neat and clean! Reduced the boilerplate a lot.

Do have a small request. Could @Wire class annotation be extended to inject inherited fields from superclasses?

This would be a great way to support more flexibility in designing a System hierarchy (in my case for Jams, I could do away with a lot of boilerplate using a common manager/componentmapper providing superclass).

GroupManager can make tons of duplicate entities in a group.

    public void add(Entity e, String group) {
        Bag<Entity> entities = entitiesByGroup.get(group);
        if(entities == null) {
            entities = new Bag<Entity>();
            entitiesByGroup.put(group, entities);
        }
        entities.add(e);//TODO: only one instance per group!!!

        Bag<String> groups = groupsByEntity.get(e);
        if(groups == null) {
            groups = new Bag<String>();
            groupsByEntity.put(e, groups);
        }
        groups.add(group);
    }

There are no checks to make sure we're not adding an entity to a group where that entity is already there. Imaging calling this add method over and over for the same entity and group... then when we decide to delete an entity from a group, keep in mind that bag only removes the first entry it finds. That leaves the entity in the group unless we remove it an equal number of times.

Can someone verify this? I'm new to Bag, plus I don't have testing setup, so I could use a thumbs up before I proceed.

Small Request: Distinguish artemis gwt ReflectionCache exceptions

Could you perhaps make the Couldn't find Type for class message in ReflectionCache uniquely identifiable to Artemis.

Spent several hours last night figuring out why the artemis-odb gwt module was failing to serve up reflection information on a properly registered class.

Apparently it was LIBGDX querying it's own ReflectionCache, not Artemis. Both frameworks clone the same code apparently, so all the error messages are identical. gwt debugging is not so straightforward so having an Artemis tag in this specific exception would help greatly. ๐Ÿ‘ป

Ideally LibGDX and Artemis would share the same reflection helper but I figure that's too complicated right now.

Or people can find this ticket via google after a couple of hours of bashing their heads against the wall, that works too ;)

Automatically @Wire systems, managers and mappers.

New reflection-triggering injection annotation covering all worldly things: will eventually replace @Mapper as this will work the same but not be limited to ComponentMappers.

@Inject might be better, but it's so popular that it might conflict with 3rd party libraries, hence @Wire, unless there's a better alternative.

Throw out stuff from com.artemis.utils thats not used by artemis

Utils
FastMath
TrigLUT
Timer

Why carry this stuff around? If a user needs these kind of utils they can get them everywhere.

Sure, it's convenient to have, let's say, fastmath for games, but still, you can get fastmath stuff about everywhere.
I'd say anything not used by artemis or directly related to artemis should not be in artermis.

anyways, too little sleep, too much LCD tan.
night.

add listener/handler

Hi,
can youi please add some listener like:
enetity added to world, entity removed, entity component changed, world updated.

I think that is usefull to keep in sync artemis with other not-entity sistem, like physic and graphic engine; also this can enable sub-engine drop and play if the sub-system component will be standardized between similar project

Removing entites causes nullPointerException

oh shit.
Well seems like the performer update wasn't very nice.

I wrote up a small unit test with one system and one type of component, the only thing this system does is this:

TestSystem#process

protected void process(Entity e) {
    e.deleteFromWorld();
}

It throws a NullPointerException exactly after HALF of the entites have been processed.

I guess it's because how the iteration in EntityProcessingSystem works, as it gets the data from the bag once, then gets the size once, but during the iteration things get removed, thus the size is changing, and the data is slipping through because the empty spots get filled with the last entity.

There is no way, I know of, to ensure during the loop, that all entites will get processed, and to leave entites out that have been deleted but not processed yet.

EntitySystem#removeFromSystem

private void removeFromSystem(Entity e) {
    actives.remove(e);
    e.getSystemBits().clear(systemIndex);
    removed(e);
}

EntityProcessingSystem#processEntities (passes actives as bag)

protected final void processEntities(ImmutableBag<Entity> entities) {
    Object[] array = ((Bag<Entity>)entities).getData();
    for (int i = 0, s = entities.size(); s > i; i++) {
        process((Entity)array[i]);
    }
}

I'll give a pull request with the UnitTest right away.

Request: Shorten ComponentMapper

Expecting a 'use your IDE's features better you slacker' response but figured I'd give it a try.

Any chance of renaming ComponentMapper into something more concise. ;)

Get rid of WildBag class

It's a bad idea to have this class for a number of reasons. The implementation is not very clean, it exposes dangerous functionality to the user of the class. Having this "internal" is not a very good excuse. It promotes bad coding practices inside the library.

My suggestion would be to change the clear method of the Bag class to be:

    public void clear() {
        Arrays.fill(data, null);
        size = 0;
    }

And also add a new method along the lines of:

    public void clearNonFreeing() {
        size = 0;
    }

Performers, changedEntity, deleteEntity ... redundancy

in World:
changedEntity, deleteEntity, enable, disable
In each of these methods, check(Entity, Performer) being called, thus informing all managers and systems of the changes right when it happens.
Now these systems and managers get informed twice, the second time happening in
World#process().

Surely these calls in World#process() can be removed? Also these Bags:
deleted, changed, enable, disable

I'm not seeing any strange stuff so far doing so in my current project.

If I'm missing anything as why these calls must stay, give me a heads up.
Otherwise, just let me know as well.
I'll remove them in my world-performance branch (or not), and give it a pull.

(EDIT: not sure if i should post this here but not on slick, BUUUT forum registration is taking FOREVER ;_;. seems moderated)

DelayedEntityProcessingSystem expires all entites at once

This is an old bug from the original Artemis. I've tested this on the trunk version of artemis-odb.

"Unfortunately, the newer DelayedEntityProcessingSystem still has the problem I described in my other post. If you add an entity A with an expiration of, say 1 second at T1, and then add another entity B that has the same expiration of 1 second at T2, where T2 < T1 + 1 second, entity B will expire before it should... it will expire at the same time as entity A."

Source: http://slick.ninjacave.com/forum/viewtopic.php?f=28&t=5478&hilit=DelayedEntityProcessingSystem#p30809
"my other post": http://slick.ninjacave.com/forum/viewtopic.php?f=28&t=5477&p=30798#p30798

Pooled and Packed component types, phase 1 of 3.

See the flyweight-components branch for details. (Yeah, I know, not strictly flyweight per definition).

Public API changes

These are the first changes to the API which will eventually break compatibility with the original artemis API.

These commits change a lot under the hood, but the public API changes have been kept to a minimum, instead relying on Artemis to handle it internally.

Entities create their own components

Entity#addComponent methods have been deprecated, superseded by Entity#createComponent(Class<Component>). It returns the newly created component; so constructor initialization is no longer possible, neither is passing previously constructed components (might change this in the future, for non-Pooled and non-Packed components). It's ugly, but quite hard to get around. Fluent setters could work, but those are a pain to generate in Eclipse. Not sure about other IDE:s.

Entity#addComponent still works like before, except it throws an Exception if a PackedComponent is passed to it.

New component types

PooledComponent

Nothing much to say about it, it has a reset() method, requires a zero-argument constructor. Automatically reclaimed during removal. Only permits non-final fields.

PackedComponent

Right now, PackedComponents have to conform to a memory-friendly definition to be useful, which is a little cumbersome. The most notable ramifications for PackedComponent types:

  • No direct field access
  • Some boilerplate methods defined by PackedComponent
  • It easy to mistakenly work on the wrong entity when working on same-type components of different entities. A PackedComponentMapper keeps its own view of the PackedComponent, so different mappers working on the same type will never interfere (assuming the component definition is valid).

For sake of efficiency, a single backing array per component type should be used to store all data. This becomes a little awkward when different primitive types are employed, requiring some bit masking and shifting.

It should be noted that PackedComponents only ever make sense for scenarios where a huge number of entities are processed. It makes debugging more difficult, requiring helper methods for debugging etc.

A simple example:

package com.github.junkdog.hallucinolog.component;

import com.artemis.PackedComponent;
import com.badlogic.gdx.math.Vector2;

public class Position extends PackedComponent {
    private static final int COMPONENT_SIZE = 2;
    private int entityId; // should be instance field
    private int index;    // should be instance field

    private static DumbUnsafeFloatArray mem = new DumbUnsafeFloatArray();

    @Override
    public void reset() {
        mem.items[index + 0] = 0;
        mem.items[index + 1] = 0;
    }

    public float x() {
        return mem.items[index + 0];
    }

    public Position x(float x) {
        return this;
    }

    public float y() {
        return mem.items[index + 1];
    }


    public Position xy(float x, float y) {
        mem.items[index + 0] = x;
        mem.items[index + 1] = y;
        return this;
    }

    public Position y(float y) {
        mem.items[index + 1] = y;
        return this;
    }

    public Position addX(float x) {
        mem.items[index + 0] += x;
        return this;
    }

    public Position addY(float y) {
        mem.items[index + 1] += y;
        return this;
    }

    public Position add(float x, float y) {
        mem.items[index + 0] += x;
        mem.items[index + 1] += y;
        return this;
    }

    public PackedComponent setEntityId(int entityId) {
        this.entityId = entityId;
        this.index = entityId * COMPONENT_SIZE;
        if ((mem.items.length - 1) <= index) mem.grow();
        return this;
    }

    private static class DumbUnsafeFloatArray {
        float[] items;

        public DumbUnsafeFloatArray() {
            items = new float[64];
        }

        private void grow() {
            float[] old = items;
            items = new float[(old.length * 2)];
            System.arraycopy(old, 0, items, 0, old.length);
        }
    }
}

So, this is a little awkward and prone to making mistakes. As noted in the #9, I intend to create a bytecode transformation plugin to automate most of this work, relying on annotations to specify transformations during compile-time.

This approach would make it easier to write up PackedComponents, but introduce even more difficult debugging since your IDE of choice probably won't figure out that the class has changed. On the flip-side though, reverting the component to a normal Component is as simple as removing the annotation.

package com.github.junkdog.hallucinolog.component;

import com.artemis.PackedComponent;
import com.badlogic.gdx.math.Vector2;

@PackedComponentWeaver
public class Position extends Component {
    private float x;
    private float y;

    public float x() {
        return x;
    }

    public Position x(float x) {
        this.x = x;
        return this;
    }

    public float y() {
        return mem.items[index + 1];
    }

    public Position xy(float x, float y) {
        this.x = x;
        this.y = y;
        return this;
    }

    public Position y(float y) {
        this.y = y;;
        return this;
    }

    public Position addX(float x) {
        this.x += x;
        return this;
    }

    public Position addY(float y) {
        this.y += y;
        return this;
    }

    public Position add(float x, float y) {
        this.x += x;
        this.y += y;
        return this;
    }
}

@PooledComponentWeaver could be used to transform Components into PooledComponents too, removing the reset() method boilerplate.

For now though, until #9 is resolved, components must be manually declared and extend the appropriate class.

Component weavers, 1st incarnation.

@PackedComponentWeaver and @PooledComponentWeaver

Annotate a com.artemis.Compoent with one of the above annotations to transform it into suggested component type at compile-time.

This is a simpler approach before tackling #9.

Basicically, it saves one from the boilerplate of setting up reset() and, for PackedComponents, setEntityId().

The @PackedComponentWeaver should be able to automatically pack components consisting of a single primitive type - for now.

GroupManager keeps instances of entities forever?

Howdy JunkDog, hope all is well.

I think I found a leak in GroupManager.

This is the remove method in GroupManganger:

        public void remove(Entity e, String group) {
                Bag<Entity> entities = entitiesByGroup.get(group);
                if(entities != null) {
                        entities.remove(e);
                }

                Bag<String> groups = groupsByEntity.get(e);
                if(groups != null) {
                        groups.remove(group);
                }
        }

Imagine that this entity was only in one group and we are now removing it from that group. Shouldn't we then check to see if it was the last and if so continue to eliminate that Entity, Bag pair from groupsByEntity hasmap?
What if we were preparing to delete and dispose of an entity in the game... now the garbage collector can't remove the entity object because it's being held here in groupsByEntity as a key and paired with an empty bag. uh oh.

Am I wrong?

If you look thru all of GroupManager focusing on the groupsByEntity HashMap you may notice that entity keys are only ever 'added' to the map never removed. Surely removal is not automatically done somewhere I'm not noticing.

I would like to fork/add/pr a fix for this if my suspicion is correct, just let me know.

== edited for typos (mixed up groupsByEntity with entitesByGroup)
== also: this is a problem for removeFromAllGroups too.

ASM-transformed Pooled and Packed component types, phase 2 of 3.

What it does:

Packs components into a single per component class primitive array by annotating the component with @PackedComponent.

A post-compilation hook rewrites setters and getters to access the backing array at the correct offsets. Will take the form of a maven plugin and eclipse builder.

Problems:

  • Packing non-primitive type data into arrays requires some thinking.
  • Efficiently packing the data inside the array - alternatively use a ByteBuffer, though it yields less performance benefits.

Caveats:

  • Accessors required: can't use @PackedComponent on components utilizing public fields.

(Possible) New methods (at a glance):

ComponentMapper#get(Entity e, boolean forceNewInstance) - if a flyweight object is used for accessing the component data.
World#createComponent(Class<Component> component, boolean forceNewInstance)
World#createComponent(Class<Component> component)

Similar endeavors

Component and Entity pooling

I seem to have trouble posting on the Artemis forum, so I figured I'd ping you here instead. I'm the guy working on gdx-artemis. (https://github.com/apotapov/gdx-artemis)

You guys have done an awesome job cleaning up Artemis, and it seems our intentions are pretty well aligned: improving the implementation and making it more peformant, specifically in memory management. Ultimately, I would like to see our codebases converge, rather than diverge maintaining separate forks.

I'm not particularly married to the idea of having libgdx as a dependency for artemis. As a matter of fact in hindsight it's probably a bad idea to do so.

My biggest issue with Artemis has been the lack of entity and component pooling. It wouldn't be so bad if I could instantiate my own Entity and Component managers into an Artemis world, but the framework seems to be hell bent on preventing any reasonable extension of classes. (almost everything internal is either private or package protected)

So, long story short, my proposal is to work with you to add pooling to Artemis. Thoughts?

EntitySystem warning

when using Aspect.getAspectForAll(...) i get this warning:
A generic array of Class<? extends Component> is created for a varargs parameter

am i doing something wrong? is suppressing the warning the only solution?

JDK 7.0

Component library support: automatically adding component dependencies

I have certain components (Homing, Gravity) that always depend on other components to make any sense (Physics).

What are your thoughts on adding support for adding component dependencies implicitly to decrease boilerplate? For example, by hinting via component annotation that Artemis should add these automatically if missing. ie:

@Depends( Physics.class )
class Gravity extends Component {

Support for class annotation @Wire in GWT

Suspect there might be some reflection emulation missing for annotations on classes in the artemis gwt module.

I get the following error while using @Wire on classes:

      [ERROR] Errors in 'jar:file:/C:/Users/Daan/.gradle/caches/modules-2/files-2.1/net.onedaybeard.artemis/artemis-odb/0.5.1-SNAPSHOT/389efc327d4d018a043defee2
038557f6827b28b/artemis-odb-0.5.1-SNAPSHOT-sources.jar!/com/artemis/World.java'
         [ERROR] Line 620: The method getAnnotation(Class<Wire>) is undefined for the type Class<capture#2-of ?>
         [ERROR] Line 654: The method isAssignableFrom(Class<capture#7-of ?>) is undefined for the type Class<ComponentMapper>
         [ERROR] Line 656: The method isAssignableFrom(Class<capture#8-of ?>) is undefined for the type Class<EntitySystem>
         [ERROR] Line 658: The method isAssignableFrom(Class<capture#10-of ?>) is undefined for the type Class<Manager>
      [ERROR] Errors in 'jar:file:/C:/Users/Daan/.gradle/caches/modules-2/files-2.1/net.onedaybeard.artemis/artemis-odb-gwt/0.5.1-SNAPSHOT/e474ca6cca0fabc6a2c03

Also noticed the Wire annotation is not included in ArtemisReflect.gwt.xml

For full disclosure, I have not tested basic @Wire support on fields, given the errors indicate missing .getAnnotation in World.java.
Setup: LibGDX snapshot gradle project with artemis-odb 0.5.1 snapshot.

annotation processor improvements

  • investigate whether it's possible to automatically jack in the AP into eclipse under maven w/o doing it the eclipse way.
  • remove stupid recommendations

Support for @Wire superclass properties to subclasses to allow game/library setup

Warming up for the Ludum Dare! ๐Ÿ‘ฏ Attempting to compile a library of components and systems commonly used in Jams. Map loading, Physics, animation rendering and the like. I'm running into some issues setting up a solid design, maybe you have some insight, since you're a lot more familiar with entity systems.

My main issue seems to be @Wired systems being so tightly integrated I am having trouble separating them into common library and game logic.

As a concrete example, assume I have a map system in my common library, that deals with map loading. During map loading it needs to instance entities, which is delegated to a second system.

Both very common systems in my games that I'd like to add them to a library, but I need to somehow be able to extend them with game specific code.

considered some options.

  • circumventing @Wire and just inject systems as needed via constructor, but that gets a bit messy.
  • extend this specific system to rely on json to assemble entities for example, but that wouldn't be very flexible.
  • Don't make a library and just copy the systems I need.
  • extend @Wire so it can wire a subclass to a superclass property, like you see in other DI packages. That way the library systems can refer to interfaces or base systems, and @Wire to game classes.
  • Ask junkdog for tips. XD

Any thoughts?

GWT Compatibility

I'm progressing nicely in the spaceship warrior rewrite/adaptation with artemis-odb and the libgdx maven archetype. Desktop and Android builds area running great!

However, I've run into an issues when packaging an HTML build via GWT in libgdx. In GWT, only a subset of Java is supported, and a few items are popping up as errors when attempting to compile.

A few easy ones can be remedied without a ton of effort:

  • using Class.cast
    • can just to an explicit cast of the type instead: (T) foo
  • java.util.UUID and java.util.Bitset
    • use GWT's super source in gwt.xml and provide safe versions that will only be used in HTML build

However, the tough one is Reflection and using annotations. Specifically the @Mapper annotation. I think its possible to make this work, but it would take a good amount of effort.

@junkdog - Is GWT support something you feel is important to include in this framework?

Also, I found @SenkChristian's repo SenkChristian/artemis-gwt which deals with GWT in artemis, but the code supporting @Mapper is removed because it is tough to support (I assume). Also its an old/fork of artemis that is not artemis-odb. The solutions for the "easy fixes" above are being used here, but its built using gradle. Maybe efforts can be combined? :)

Make delayedDeletion non-static in EntitySystem class

Currently delayed deletion is a static field in EntitySystem class:

private static final WildBag<Entity> delayedDeletion = new WildBag<Entity>();

This is a bad idea in case the user decides to instantiate multiple copies of an Artemis world. delayedDeletion should be instance based.

Question: libgdx Gradle + artemis-odb project possible?

I've made a little 7DRL game (http://7drl.org/2014/03/17/tox-puzzle-roguelike-dont-do-drugs-kids/) based on artemis&LibGDX (snapshot with gradle), that I'd like to port to web so more people can play it. I tried using the artemis-odb snapshot but I'm having gwt compilation issues.

Just to be clear, I'm a GWT beginner. There's a lot of converging technologies here so I might just be missing something fundamental. I /suspect/ I might be including some compiled jars in the wrong place.

Specifically this error during gwt compile:

Compiling module net.mostlyoriginal.tox.GdxDefinition
   Validating units:
      [ERROR] Errors in 'com/artemis/gwtref/gen/ReflectionCacheGenerator.java'
         [ERROR] Line 27: No source code is available for type com.google.gwt.core.ext.Generator; did you forget to inherit a required module?
         [ERROR] Line 29: No source code is available for type com.google.gwt.core.ext.TreeLogger; did you forget to inherit a required module?
         [ERROR] Line 29: No source code is available for type com.google.gwt.core.ext.GeneratorContext; did you forget to inherit a required module?
         [ERROR] Line 29: No source code is available for type com.google.gwt.core.ext.UnableToCompleteException; did you forget to inherit a required module?
         [ERROR] Line 30: No source code is available for type com.google.gwt.core.ext.typeinfo.TypeOracle; did you forget to inherit a required module?
         [ERROR] Line 32: No source code is available for type com.google.gwt.core.ext.typeinfo.JClassType; did you forget to inherit a required module?
      [ERROR] Errors in 'com/artemis/gwtref/gen/ReflectionCacheSourceCreator.java'

Steps I took so far:

generated a gradle project as described at https://github.com/libgdx/libgdx/wiki/Project-Setup-Gradle and made a game using artemis-odb. I'm not using any advanced features or helpers, just @Mapper.

Compiled artemis-odb for GWT 2.6.0. (I got xml errors compiling libgdx with GWT 2.5.1) and put them in a libs/ folder in my project root, to manually include later.

Added artemis backends definition to GdxDefinition.gwt.xml, based on the GWT demo app you linked to in the changenotes (which might not be identical of the intended odb method) .

<module>
    <inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
    <inherits name='com.artemis.backends.artemis_backends_gwt' />
    <inherits name='net.mostlyoriginal.tox.ToxGame' />
    <extend-configuration-property name="artemis.reflect.include" value="net.mostlyoriginal.tox.component" />
    <extend-configuration-property name="artemis.reflect.include" value="net.mostlyoriginal.tox.system" />
    <entry-point class='net.mostlyoriginal.tox.client.GwtLauncher' />
    <set-configuration-property name="gdx.assetpath" value="../android/assets" />
    <set-configuration-property name="gdx.assetoutputpath" value="html/target/webapp" />
</module>

Added compile definitions to the main build.gradle of the LIBGDX project. Also bumped up gwt version to 2.6.0

project(":gwt") {
    apply plugin: "gwt"
    apply plugin: "war"
    webAppDirName = 'webapp'

    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
        compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
        compile files('../libs/artemis-odb-gwt-0.5.1-SNAPSHOT.jar')
        compile files('../libs/artemis-odb-gwt-0.5.1-SNAPSHOT-sources.jar')
        compile files('../libs/artemis-odb-0.5.1-SNAPSHOT-sources.jar')
    }

    gwt {
        gwtVersion='2.6.0' // Should match the gwt version used for building the gwt backend
        maxHeapSize="4G" // Default 256m is not enough for gwt compiler. GWT is HUNGRY
        minHeapSize="2G"

        src = files(file("src/")) // Needs to be in front of "modules" below.
        modules 'net.mostlyoriginal.tox.GdxDefinition'

        compiler {
            strict = true;
            enableClosureCompiler = true;
            disableClassMetadata = true;
            disableCastChecking = true;
        }
    }
}

Any thoughts?

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.