Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (767)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (854)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: 1 2 [3]
61  Discussions / Miscellaneous Topics / Re: C++ standard library is really lacking - good or bad? on: 2014-02-27 15:54:52
Also, from a professional standpoint, the typical jobs associated with java and c++ are quite different (not even sure I've ever seen a non-enterprisey java job offer, small indie games being an exception). As a dilettante of c++ myself, I think it promotes a more low-level view of the world, whereas java in it's most immediate form emphasizes a higher level way of thinking.
62  Discussions / General Discussions / Re: 4.8 MT System bus.. Big deal? versus 5.2 on: 2014-02-26 17:10:49
4GB is enough to run 99% of everything...

Depends on your use case; 4GB is enough to run most (all?) games, but quickly depletes if rendering large scenes or running a heavy dev environment. My KDE setup at work currently reports 7.4GB ram usage. I personally wouldn't get anything less than 16GB if I bought or upgraded a computer today.

63  Game Development / Newbie & Debugging Questions / Re: Artemis Map vs List on: 2014-02-26 09:05:48
When you say Artemis Map, do you mean the Bag class in Artemis ESF? If so, Bag is a list-type collection - entities are retrieved via indices, not keys, and can be iterated the same way a list is.

Quote
Could you explain more? I doubt anyone would understand your question..

Yes, some more details would be nice Smiley
64  Java Game APIs & Engines / Engines, Libraries and Tools / Re: FFI JEP on: 2014-02-25 10:22:50
Thanks for the link!

Quote
along with arrays2.0/packed objects.
One can dream.

I'm cautiously optimistic; I know IBM have experimented with it, and there's also an oracle presentation floating around somewhere on the internet about it. If it will actually make it into Java 9 though... well, the dreaming is strong in me.
65  Java Game APIs & Engines / Engines, Libraries and Tools / Re: FFI JEP on: 2014-02-25 09:10:12
I thought making Unsafe public was more of a rumor or wishful thinking, would love to have it confirmed for java 9 though - along with arrays2.0/packed objects.
66  Discussions / General Discussions / Re: So you thought Java strings were immutable? on: 2014-02-17 21:00:39
I guess one could configure a security manager - or use an agent - that disables reflexive code. But that sounds like much less fun.
67  Games Center / WIP games, tools & toy projects / Re: Synthclipse - GLSL demo development environment based on Eclipse IDE. on: 2014-02-17 20:46:00
I'm already using git on sourceforge. Contribution to Synthclipse shouldn't be more diffcult than in github.

Yeah, maybe it's just my personal aversion to SF; not a biggie regardless.

Hadn't heard Beat Bizarre before; pretty sweat stuff!
68  Discussions / General Discussions / Re: So you thought Java strings were immutable? on: 2014-02-17 20:22:29
This reminds me of http://thedailywtf.com/Articles/Disgruntled-Bomb-Java-Edition.aspx - not that anyone would do such a thing... *eh-heh*
69  Discussions / General Discussions / Re: So you thought Java strings were immutable? on: 2014-02-17 19:43:20
Yes, with reflection and similar tricks no class is immutable, keep in mind though that the hashcode is cached upon first calculating it. Iirc, String's hashcode caching is removed in the more recent jdk7:s (that, or I dreamt it).
70  Games Center / WIP games, tools & toy projects / Re: Synthclipse - GLSL demo development environment based on Eclipse IDE. on: 2014-02-17 13:35:50
This is great! I was actually looking for some rudimentary glsl support a couple of days ago. Taking it for a spin later.

Didn't find a changelog however (noticed 0.1.1 is released) - would be nice to have it on the page somewhere; unless I just missed it.

Edit: Any chance the codebase will migrate to github? It would make contributing easier imo.
71  Discussions / General Discussions / Re: Data bases and game programming on: 2014-02-13 12:19:25
+1 for kryo; it's fast and very easy to work with. Alternatively, plain json - mostly for describing game entities and such.
72  Discussions / General Discussions / Re: Simple JAR/Library repository on: 2014-01-30 10:11:37
Hmm, Some strange posts here. Maven doesn't need to become part of your project. It's more of a tool to assist you with creating your project (like using an IDE for example).


Well, to fully utilize maven's dependency management and whatever else you need, it's best to integrate it with your IDE. IDE-maven integration is pretty good with all major IDE:s at least, at least when keeping in line with maven's conventions/view of the world.

We also use maven extensively at work (and I use it for all my personal projects too); it's definitely a polar love/hate relationship. If you love it, embrace it - else find something more likeable.
73  Discussions / General Discussions / Re: JGO coinage tally on: 2014-01-29 12:34:14
What about (also) using flattr as a means for bringing in some extra cash?
74  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Libgdx overcoming color limitations? on: 2014-01-16 11:36:08
What's wrong with
1  
color.set(1f, .1f, .1f, 1f)


or, if you just want to make certain colors brighter:

1  
color.mul(2f, 1f, 1f, 1f)
75  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Libgdx + Eclipse. on: 2014-01-15 13:27:26
Eclipse maintains its own file cache, which can become inconsistent in projects spanning multiple eclipse projects. You could come around eclipse's caching by loading resources with a different FileHandle type (Local, I think, or external - don't remember which).

Ref: https://github.com/libgdx/libgdx/wiki/File-handling
76  Game Development / Game Mechanics / Re: Simulations vs Emergent Behavior on: 2014-01-07 11:55:45
If you're after emergent behaviors, you might want to check out utility-based AI:s - IA on AI has some pretty good introductory posts on it, such as Getting More Behavior out of Numbers.
77  Discussions / General Discussions / Re: Progressing from General Knowledge to Game Programming on: 2013-12-05 12:51:41
I found Tamas Jano's tutorial series on libgdx very helpful when I first started out. Granted it's not LWJGL, but what really makes the tutorial shine is the emphasis on code design/architecture.

http://obviam.net/index.php/getting-started-in-android-game-development-with-libgdx-create-a-working-prototype-in-a-day-tutorial-part-1/
78  Discussions / General Discussions / Re: Java "Mods" on: 2013-12-04 13:30:36
I was in class today and I started thinking, what if someone figured out a way to make Java "mods", eg, they could add little pieces of their own syntax directly into the language, not as a library. There could be a plugin for Eclipse that would be able to grab the mod from a supplied URL and install it into your Java installation. Or maybe even a Linux application and Windows one. And a Mac app at that.

<snipped>

Is there such a thing?

Others have already addressed unsigned ints, but for more general transformations, see Project Lombok. It rewrites the AST during compilation. Consequently this only works with supported compilers - eclipse and javac/netbeans in this case - and extending it is somewhat beyond comprehensible imo. Check out lombok-pg if you're interested in exploring that route.

Alternatively, one can use bytecode transformation libraries like ASM or javassist. At least ASM can be used as both as a compile-time step or runtime - via a custom classloader. It is however, to the best of my limited knowledge, not possibly to hack in new syntax this way.



79  Game Development / Shared Code / [entity system framework] artemis-odb 0.5.0 and agrotera 0.3.0 on: 2013-11-28 10:20:09
Introduction
If you haven't heard of artemis or entity systems before, the blurb:

Quote
Artemis is a high performance Entity System framework for games, written in Java, and is a framework to manage entities in a game world. It is inspired by Entity Systems are the future of MMORPG blog series by Adam Martin. We also borrowed ideas from Ted Brown who implemented a simple high-performance Entity System in Processing based on Adam Martin's blog.

The framework is based on the concept that entities in a game world exist as pure identifiers, their components contain only data, and systems process entities based on their aspects. This promotes separation of concern and simplifies game design tremendously.

artemis-odb aims to preserve the simplicity of the original artemis framework while at the same time extending it with new features. The recently released 0.5.0 introduces "packed" components and pooling of entities and optionally components.

agrotera is a small annotation-driven compile-time plugin for reducing boilerplate associated with configuring EntitySystems, Managers and - new in 0.3.0 - general classes. Since agrotera solely relies on compile-time weaving, there is no performance or memory cost associated with its features.


artemis-odb compared to original artemis:
- All known bugs present in original artemis have been resolved.
- Less object allocation.
- New component types:
  - PooledComponent: automatically recycled.
  - PackedComponent: single instance component backed by a static array
- Optional compile-time bytecode weaving: @PooledWeaver and @PackedWeaver annotations rewrites normal com.artemis.Component classes into the requested type.
  - Since weaving takes place during compile-time, this works on android too.

The PackedComponent implementation, while harboring noble ideals, is somewhat naive at the moment:
 - Requires setters/getters for all values (I personally much prefer direct field access for components).
 - Assumes that the component will be present in all entities (internally, the entity id is used as index in the component's backing array). Still applicable for Position and similarly ommipresent properties.
 - @PackedWeaver requires that all fields share the same primitive type.

Future releases will offer more flexibility in regard to automatically weaving packed components (see here).

The benefit of using the @*Weaver annotations is that the components still look like "normal" POJO components and hence are less prone to mundane errors. Additionally, it may make debugging slightly easier since reverting a woven component back to a normal is a simple as removing the annotation.

agrotera

agrotera removes nearly all boilerplate from systems (well, it could be argued that it's simply been moved to annotations instead, but the net result is less code):

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
// inject profiling, invoked at start of begin() and before any exit points in end()
@Profile(using=Profiler.class, enabled=Profiler.PERF_PROFILE)
// Injects ComponentMapper fields for all referenced component types
// and any referenced systems and managers.
// Eclipse's editor/compiler is aware of any injected fields.
@ArtemisSystem(
    requires={Position.class, Thrust.class, PrecomputedThrust.class, GravityAffected.class, RepulseAffected.class},
    systems=GravityFieldComputer.class)
public final class PrecomputedThrustSystem extends EntityProcessingSystem
{
    public PrecomputedThrustSystem()
    {
        // null is replaced with the appropriate Aspect, deduced from @ArtemisSystem
        super(null);
    }
   
    @Override
    protected void process(Entity e)
    {
        Position position = positionMapper.get(e);
        Thrust thrust = thrustMapper.get(e);
       
        gravityFieldComputer.cachedGravity(thrust, position.x(), position.y());
    }
}


From the annotated classes, agrotera can generate a system overview from artemis' point-of-view:


Bytecode weaving - for both artemis and agrotera - is quite fast. On my laptop (i7 @ 3ghz):
1  
2  
3  
4  
[INFO] --- artemis-odb-maven-plugin:0.5.0:artemis (default) @ hallucinolog-core ---
[INFO] Processed 10 PackedComponents and 11 PooledComponents in 67ms.
[INFO] --- agrotera-maven-plugin:0.3.0:agrotera (default) @ hallucinolog-core ---
[INFO] Processed 25 EntitySystems, 5 Managers and 1 Injected types in 75ms.


Caveats
- There's a pretty heavy reliance on maven (for bytecode weaving), although most things can still work outside a maven context, as an eclipse builder or as part of an ant script.

- (only agrotera) lombok-pg and lombok aren't compatible, and lombok-pg hasn't been updated for some time. I've seen some forks that have been busy keeping lombok-pg up to date with lombok - should look into those in the future. lombok-pg is responsible for injecting fields early enough for Eclipse to see them.

- (also mostly agrotera) Eclipse is the only IDE officially "supported", with projects preferably setup as maven modules. Furthermore, lombok-pg (a fork of the my all-time favorite Project Lombok) is required to make agrotera fly. I'm not sure to what degree other IDE:s are used, but let me know if you think I should add support for others.
80  Discussions / Miscellaneous Topics / Re: Fragmentarium (shader tool) on: 2013-11-05 22:39:25
Awesome, I had completely missed it. A lot of people from FractalForums.com are thanked on the fragmentarium site. Really cool forum, used to spend a lot of time there when I dabbled in 3d fractals.
81  Discussions / Miscellaneous Topics / Compile-time lib similar to Riven's MappedObjects? on: 2013-11-04 12:57:26
I'm looking for a lib that would assist me in converting "value" object types into packed/mapped types: the transformation should happen at compile-time (or more precisely, post-compile), so that it can work with android/dalvik too.

It seems that the source code and jar for Riven's MappedObjects have been removed? Otherwise, it sounds like it could be modified to work at compile-time (I'm assuming it does its wiring during runtime).

Are there similar libraries out there?

The use case: I'm extending artemis with new component types - PooledComponent and PackedComponent - and I want to offer the functionality to automate the conversion from normal com.artemis.Component:s into the new PooledComponent and PackedComponent types by annotating the component with @PooledWeaver or @PackedWeaver.

I have @PooledWeaver working, and @PackedWeaver is working for the most basic use cases. Auto-wiring PackedComponents turns out to be a bigger undertaking than I first assumed, as all field access has to be re-written to work on primitive arrays etc, which in turn sprinkles changes all over the operand stack. In short, it would take a long time to bring my own implementation up to par with something like MappedObjects.

Am I doomed to implement my own solution or is there hope?
Pages: 1 2 [3]
 
EgonOlsen (1256 views)
2018-06-10 19:43:48

EgonOlsen (1124 views)
2018-06-10 19:43:44

EgonOlsen (862 views)
2018-06-10 19:43:20

DesertCoockie (1271 views)
2018-05-13 18:23:11

nelsongames (1104 views)
2018-04-24 18:15:36

nelsongames (1335 views)
2018-04-24 18:14:32

ivj94 (2074 views)
2018-03-24 14:47:39

ivj94 (1227 views)
2018-03-24 14:46:31

ivj94 (2169 views)
2018-03-24 14:43:53

Solater (792 views)
2018-03-17 05:04:08
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!