Slick Forums

Discuss the Slick 2D Library
It is currently Tue May 21, 2013 10:07 pm

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 420 posts ]  Go to page Previous  1 ... 22, 23, 24, 25, 26, 27, 28  Next
Author Message
PostPosted: Mon Apr 23, 2012 12:28 am 
Offline

Joined: Thu Apr 19, 2012 3:54 pm
Posts: 10
Actually I understand it a lot better now. Thanks for answering my questions, even though I probably shouldn't be delving into Entity/component based programming with Artemis.

Right now I can say I know the basics of how to use it. Only thing is that I want to know how it works. I use tools a lot better when I know how they work and not just that "they do". So I'm guessing this will require learning more about the Entity/component structure in general without the helpful Artemis framework already built for me.

Thanks again for helping me out. I will do more research on the Entity structure in order to use Artemis with more understanding.


Top
 Profile  
 
PostPosted: Sat Apr 28, 2012 8:02 pm 
Offline

Joined: Fri Jun 10, 2011 12:23 am
Posts: 4
Are you aware that your website is down?


Top
 Profile  
 
PostPosted: Sat Apr 28, 2012 8:07 pm 
Offline

Joined: Thu Apr 19, 2012 3:54 pm
Posts: 10
Yeah, it would be nice to have the documentations of the various library classes, but your site is down so no one can access them.


Top
 Profile  
 
PostPosted: Mon Apr 30, 2012 1:35 pm 
Offline

Joined: Fri Jun 10, 2011 12:23 am
Posts: 4
It looks like the main site is back, but the javadoc and SVN links don't work. Are they obsolete?


Top
 Profile  
 
PostPosted: Wed May 02, 2012 9:28 am 
Offline
Game Developer
User avatar

Joined: Tue Nov 21, 2006 4:46 am
Posts: 619
Location: Iceland
Yea, sorry about the site. Got a new fiber connection and the static ip wasn't migrated to the new connection. Will be fixed soon.


Top
 Profile  
 
PostPosted: Thu May 10, 2012 9:55 pm 
Offline
Game Developer
User avatar

Joined: Tue Nov 21, 2006 4:46 am
Posts: 619
Location: Iceland
Finally, Google projects supports mercurial!!

I've put Artemis source back up:
https://code.google.com/p/artemis-framework/


Top
 Profile  
 
PostPosted: Thu May 17, 2012 8:49 am 
Offline
User avatar

Joined: Fri Nov 18, 2011 3:39 pm
Posts: 48
Location: Germany
Nice! :D

But the download section is still empty... :cry:
And the link "http://gamadu.com/artemis/" still leads nowhere.


Top
 Profile  
 
PostPosted: Sat May 19, 2012 12:25 am 
Offline

Joined: Sun Jan 02, 2011 8:39 pm
Posts: 64
Link works fine.


Top
 Profile  
 
PostPosted: Sun May 27, 2012 2:49 pm 
Offline
User avatar

Joined: Fri Nov 18, 2011 3:39 pm
Posts: 48
Location: Germany
Jarp, it's okay! :D


Top
 Profile  
 
PostPosted: Mon May 28, 2012 8:02 am 
Offline

Joined: Mon May 28, 2012 7:25 am
Posts: 1
When trying to write a unit test for my game I ran into a bit of a problem. I am looking for the best way to replace one or more of the system classes with mock objects. As far as I can see the only way I can do this with Artemis is to extract the code I wish to replace into a delegate and let the system class choose between the test and production versions.

It would be nice if I could choose the key that the system manager uses to map my systems with, that way I can swap out any system class without having to let other classes that refer to it know about the change. However this breaks the GoF recommendation to favour delegation over inheritance so perhaps it would be best to keep it the way it is.

How many Artemis users are unit testing? Also what has been your approach to this problem?


Top
 Profile  
 
 Post subject: patch
PostPosted: Sun Jun 03, 2012 9:58 pm 
Offline

Joined: Sun Jun 03, 2012 9:21 pm
Posts: 6
Hi,

I wasn't sure where to post this, but this seemed like the most reasonable place.

I've attached a .patch containing some minor GC/loop enhancements done from an android POV, where the JIT is less clever:
  • No object allocations inside loop clauses.
  • Container size cached during for loop initialization (this was already done in some places).

Reference:
http://developer.android.com/guide/practices/design/performance.html


Attachments:
artemis.patch.gz [1.09 KiB]
Downloaded 37 times
Top
 Profile  
 
PostPosted: Mon Jun 04, 2012 3:56 pm 
Offline

Joined: Mon Jan 16, 2012 2:04 pm
Posts: 1
dmulligan wrote:
When trying to write a unit test for my game I ran into a bit of a problem. I am looking for the best way to replace one or more of the system classes with mock objects. As far as I can see the only way I can do this with Artemis is to extract the code I wish to replace into a delegate and let the system class choose between the test and production versions.

It would be nice if I could choose the key that the system manager uses to map my systems with, that way I can swap out any system class without having to let other classes that refer to it know about the change. However this breaks the GoF recommendation to favour delegation over inheritance so perhaps it would be best to keep it the way it is.

How many Artemis users are unit testing? Also what has been your approach to this problem?



I had the same problem just a few days ago, I tried to have systems that could replace each other.
I solved it by having each type of system implement an interface, then fetching systems taking the interface class as argument, then looking in the system manager for a class implementing that interface.

More about this in this blog post (including my fetch code).

I hope this helps!

_________________
Dev Blog


Top
 Profile  
 
PostPosted: Sat Jun 16, 2012 6:44 pm 
Offline

Joined: Sun Jan 02, 2011 8:39 pm
Posts: 64
New issue with Entity getComponents bug https://code.google.com/p/artemis-frame ... etail?id=1
Quote:
What steps will reproduce the problem?
1. Create a World
2. Create a Entity and give it a 5 varying Component types
3. Call Entity refresh()
3. Call World loopStart() to refresh everything
3. Get the Entity components with getComponents() method or use a breakpoint to browse the contents of the EntityManager componentsByType list.

What is the expected output? What do you see instead?
I expect to see 5 components. Instead depending on the ID of the Entity in my tests with only 1 entity in the World the getComponents() method returned 2 components when it should've returned all 5.

What version of the product are you using? On what operating system?
Latest source from this.

Please provide any additional information below.
I found a work around is to create 50 or so Entities with all my components so that the componentsByType list has all the component bags initialized.


Top
 Profile  
 
PostPosted: Sat Jun 23, 2012 6:51 pm 
Offline

Joined: Sat Jun 02, 2012 7:41 am
Posts: 67
I was wondering... Is there a way I can import in eclipse the javadoc so I can have references in eclipse directly? WOuld be really useful! :?

EDIT: anyways, I'm testing it now and it is really amazing, I totally like this approach :D great work!


Top
 Profile  
 
PostPosted: Tue Jun 26, 2012 12:26 pm 
Offline

Joined: Sat Jun 02, 2012 7:41 am
Posts: 67
Another question, hope someone sees it :lol:

The constructor of the EntityProcessingSystem class take some components, but should I add all the components I use in the system (through the component mappers), or just the main component the system refers to? Because I noticed that even if I don't add to the constructor one of the components used in the system, it works fine. For example, let's say I have a Gravity component: in the GravitySystem's process() method I also change the value of the Position component to move my entity, so I have also a component mapper for Position, but if I pass to the constructor of the system only the Gravity component (Gravity.class) and not the Position one, it doesn't seem to affect how the system works. Am I missing something? :?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 420 posts ]  Go to page Previous  1 ... 22, 23, 24, 25, 26, 27, 28  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group