Comments (8)
Thanks for opening the ticket. The issue tracker is perfectly fine for ideas or proposals, so don't hesitate to open them!
-
That would be great. The docstrings should be fairly complete, but proper API documentation needs to be generated. I plan to set up automatic building via ReadTheDocs.
-
I have hesitated to do this for one reason. Currently the cache needs to be invalidated whenever anything is added or deleted. I wanted to investigate if it's feasable to implement caching on a per-Component or per-Entity basis. This would likely require a very custom cache implementation, or a change in the internal DBs. Maybe this is best left to the future, and just roll in the current implementation for now as you suggested (since it's pretty much faster in most cases).
-
This is not something I personally use, since I rely on pyglet's event classes for most of my games. However, I am open to this as long as it's not too bloated. The key thing is that it shouldn't cause any performance hit if it's not used.
from esper.
Oops. Accidentally pressed the wrong button :)
from esper.
Thanks for replying. I'll hold off on the Cached World for now. I have a few ideas for event systems, but depending on how things go I might can it or just create a new repo if it doens't fit the scope of this project. I'll check out ReadTheDocs and try and see if I can implement that myself.
from esper.
I was thinking of switching the readme from RST to Markdown, simply because of my familiarity with Markdown. Would that be alright with you, or should I stick to RST?
from esper.
Either one would fine for the README, but I would prefer to stick to RST. This is what Sphinx uses by default.
On another note, I have found a bug with the new CachedWorld. In a real application, try_component
will sometimes throw a key error. I haven't yet tracked this down. Instead of rolling back the changes completely, I think I will just do idea # 2 instead.
from esper.
Just FYI, CachedWorld is now the default World. I'm happy about this now that I've done it, as things are much simpler.
I still want to investigate more advanced caching for the future, even though it will likely require some changes to the internal DBs. Implementing caching per component type seems like a good start to investigate.
from esper.
That's great to hear. I'll look into caching per component type when I finish with the Readme and event system prototype.
from esper.
Closing this issue to create more specific issues.
from esper.
Related Issues (20)
- esper.current_world not usable as a module-level property HOT 2
- Initializing the world is not working HOT 1
- Avoid unnecessary multiple dict lookup inside `has_components` function
- Create an entity with a specific id HOT 4
- Try another ECS implementation - ecs_pattern library HOT 2
- Typing of world under the processor class HOT 3
- Testing esper HOT 4
- mypy `get_components` gives "object" type HOT 1
- Relationships HOT 8
- `World().create_entity()` does not create entity if no components are given HOT 1
- `remove_component()` method removes entity if no more components left HOT 3
- Add mypy to unit tests HOT 2
- Querying entities with denylist of components HOT 5
- API Design : Why so much OOP ? HOT 20
- "Quick start" in README is targeting old version HOT 3
- Seeking Guidance on Persisting and Loading Esper from a Database HOT 2
- Is esper Thread-Safe for Multi-threaded Environments? HOT 5
- Why roll up world into esper module? HOT 4
- Event handlers set within a function don't remain once the block scope exits. Why use weak references here? HOT 4
- Event System does not preserve event handlers upon switching context HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esper.