[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Slick Forums • View topic - 64 Limit of Bag --> ComponentMapper

Slick Forums

Discuss the Slick 2D Library
It is currently Wed Jun 07, 2023 8:46 am

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sat Dec 29, 2012 1:41 am 
Offline

Joined: Thu Apr 19, 2012 3:54 pm
Posts: 10
Hi, I'm pretty new to Artemis. I've started programming a game of mine with this new framework + Slick and it's taken quite a while to wrap my head around this Component/System structure. BUT! I am finally making a bit of progress.

And before I continue, I would like to say amazing work on Artemis appel. Keep on developing it!

Now, I have ran into an error that isn't very urgent, but I'm worried it will affect my game in the future.
The error I've found is the 64 limit to the ComponentMapper. When I try to add a certain component to over 64 entities, I'm hit with this error. Is there a way that I can change the ComponentMapper to use something other than a Bag to store... (components(?) or whatever it stores)?

To give a couple of details of my game, I'm planning to have pretty much everything made up out of tiles (maybe like 20x20 px per tile). So, I'm going to have more than 64 tiles on the screen at once, each having very similar components. I foresee a problem with the ComponentMapper here.

Any help/suggestions would be great! And please don't hold back from telling me if I'm doing something wrong here. I moved to Artemis so that I could get a fresh start doing something the correct and organized way. All criticism is appreciated.

I'll probably be posting many more questions here in the near future. Stay tuned!


Top
 Profile  
 
PostPosted: Sat Dec 29, 2012 1:43 am 
Offline
Game Developer
User avatar

Joined: Tue Nov 21, 2006 4:46 am
Posts: 620
Location: Iceland
This limit no longer exists on newer versions of artemis.


Top
 Profile  
 
PostPosted: Sat Dec 29, 2012 2:04 am 
Offline

Joined: Thu Apr 19, 2012 3:54 pm
Posts: 10


Top
 Profile  
 
PostPosted: Sat Dec 29, 2012 4:09 am 
Offline
Game Developer
User avatar

Joined: Tue Nov 21, 2006 4:46 am
Posts: 620
Location: Iceland
Hmm... strange, I'll take a look at it.

Hopefully I'll have a fix over the weekend.


Top
 Profile  
 
PostPosted: Sat Dec 29, 2012 4:56 am 
Offline

Joined: Thu Apr 19, 2012 3:54 pm
Posts: 10


Top
 Profile  
 
PostPosted: Sun Dec 30, 2012 10:27 pm 
Offline
Game Developer
User avatar

Joined: Tue Nov 21, 2006 4:46 am
Posts: 620
Location: Iceland
Hopefully this year :D


Top
 Profile  
 
PostPosted: Sat Jan 12, 2013 7:59 am 
Offline
Game Developer
User avatar

Joined: Tue Nov 21, 2006 4:46 am
Posts: 620
Location: Iceland
Not been able to reproduce. First I misunderstood you, thought you meant 64 different types of components. Please send me code that reproduces this. Else this may be specific to your project.


Top
 Profile  
 
PostPosted: Sat Jan 12, 2013 8:02 am 
Offline

Joined: Thu Apr 19, 2012 3:54 pm
Posts: 10


Top
 Profile  
 
PostPosted: Sat Jan 12, 2013 9:43 pm 
Offline
Game Developer
User avatar

Joined: Tue Nov 21, 2006 4:46 am
Posts: 620
Location: Iceland


Top
 Profile  
 
PostPosted: Sat Jan 12, 2013 10:49 pm 
Offline

Joined: Thu Apr 19, 2012 3:54 pm
Posts: 10


Top
 Profile  
 
PostPosted: Sat Jan 12, 2013 10:59 pm 
Offline
Game Developer
User avatar

Joined: Tue Nov 21, 2006 4:46 am
Posts: 620
Location: Iceland
You're requesting ViewController component from entities that don't have it.


Top
 Profile  
 
PostPosted: Sun Jan 13, 2013 5:12 pm 
Offline

Joined: Thu Apr 19, 2012 3:54 pm
Posts: 10
Okay, so I should split the ViewSystem into 2 different systems, 1 dealing with the Entity I would like to center on screen and the other dealing with the InWorld Entities.


Top
 Profile  
 
PostPosted: Sun Jan 13, 2013 8:08 pm 
Offline

Joined: Sun Nov 04, 2012 7:01 pm
Posts: 7
You could also use the getSafe-method on ComponentMapper instead of get for the optional components.

And you might want to rewrite your super-call like this
super(Aspect.getAspectForAll(Transform.class).one(InWorld.class, ViewController.class)); // or the other way around

Because the way your code looks like, you want all components to have the Transform-component and then either the InWorld- or the ViewController-component.

Something else: Are you sure you want to use the TagManager to tag your squares? You are calling the TagManager.register-method inside of a loop and the TagManager will only remember the last tagged entity with the same tag. TagManager.unregister would also only be able to remove the last tagged entity.


Top
 Profile  
 
PostPosted: Mon Jan 14, 2013 3:46 am 
Offline

Joined: Thu Apr 19, 2012 3:54 pm
Posts: 10
Awesome! Thank you for the suggestions. I will implement them right when I have the time.

In regards to the TagManager thing, I honestly am not 100% sure what it does or how to use it. I was mostly reading off code from a demo game and copied the (what I thought were) essentials and put my own code around it. But I will do more research and figure it out!

Thanks again.


Top
 Profile  
 
PostPosted: Sat Feb 16, 2013 7:33 pm 
Offline

Joined: Fri Jul 13, 2012 9:59 pm
Posts: 25


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB® Forum Software © phpBB Group