[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/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 - Tilemaps in ECS

Slick Forums

Discuss the Slick 2D Library
It is currently Wed Feb 19, 2020 5:33 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Tilemaps in ECS
PostPosted: Fri Nov 01, 2013 6:36 pm 
Offline

Joined: Fri Nov 01, 2013 6:29 pm
Posts: 1


Top
 Profile  
 
 Post subject: Re: Tilemaps in ECS
PostPosted: Sun Nov 03, 2013 5:43 pm 
Offline

Joined: Sun Jun 03, 2012 9:21 pm
Posts: 49

_________________
: bytecode-weaving antiboilerplate lib for artemis. | : bugfixing and performance optimized fork.


Top
 Profile  
 
 Post subject: Re: Tilemaps in ECS
PostPosted: Wed Dec 18, 2013 12:08 pm 
Offline

Joined: Sat Mar 03, 2012 3:51 pm
Posts: 3
Sorry for hijacking this thread, but it deals more or less with the problems I'm having with my game. I also read the sticky post about not asking questions regarding game design, but I see a few posts here about that, so I'll try :)

I'm using a tilemap in my game like the OP, although I only have one layer. My problem is updating only the section of screen you're currently seeing. How do you go about this with atemis-odb? To be clear, I have a tilemap of, say, 500x100 tiles, but my camera only covers 32x24 at any given time. How do I make the systems update only those? Preferably, I'd like not to fill a collection first and then pass that collection to every system, as I see this as not performant, but maybe that's is my only option with an ES approach?

Thank you in advance!


Top
 Profile  
 
 Post subject: Re: Tilemaps in ECS
PostPosted: Wed Dec 18, 2013 8:20 pm 
Offline

Joined: Sun Jun 03, 2012 9:21 pm
Posts: 49

_________________
: bytecode-weaving antiboilerplate lib for artemis. | : bugfixing and performance optimized fork.


Top
 Profile  
 
 Post subject: Re: Tilemaps in ECS
PostPosted: Wed Dec 18, 2013 9:43 pm 
Offline

Joined: Sat Mar 03, 2012 3:51 pm
Posts: 3


Top
 Profile  
 
 Post subject: Re: Tilemaps in ECS
PostPosted: Fri Dec 20, 2013 11:52 pm 
Offline

Joined: Sun Jun 03, 2012 9:21 pm
Posts: 49
Why don't you want to create a collection though? If you reuse the same instance, it doesn't incur a higher cost to pass a collection than any other object. But it sounds somewhat headachey since you'd need to make sure that all entities that are cull-aware have matching aspects - or you'd need to allocate a Bag/collection for each unique aspect.

Without being familiar with your code, I'd consider having a culling system that populates entity ids into a BitSet; interested systems would then check if the entity.getId() is present in the bitset before processing (extend EntitySystem and do the check inside EntitySystem#processEntities). If it turns out to be a bottleneck (though I doubt it), consider tracking whenever an entity goes from being culled/not culled - and manually manage the Entities held by affected systems (by calling EntitySystem#enabled and EntitySytem#disabled, from your culling system).

_________________
: bytecode-weaving antiboilerplate lib for artemis. | : bugfixing and performance optimized fork.


Top
 Profile  
 
 Post subject: Re: Tilemaps in ECS
PostPosted: Fri Dec 20, 2013 11:58 pm 
Offline

Joined: Sat Mar 03, 2012 3:51 pm
Posts: 3
There is no code yet (well, there IS some code, but nothing ES yet, that's why I'm asking all this questions before implementing anything :D)

I'll try your suggestions, thank you very much for your time :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

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