सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
Dartemis एक हल्का एंटिटी-कंपोनेंट-सिस्टम (ECS) फ्रेमवर्क है, जो Dart में गेम विकास के लिए है, जिसका प्रेरणा Artemis फ्रेमवर्क से लिया गया है। यह खेल के एंटिटी, कंपोनेंट और सिस्टम को प्रबंधित करने के लिए एक संरचित दृष्टिकोण प्रदान करता है, जो प्रदर्शन और स्केलेबिलिटी को बढ़ावा देता है। Flutter के साथ उपयोग के लिए डिज़ाइन किया गया है, यह Android, iOS, Web, macOS, Windows और Linux जैसे कई प्लेटफॉर्मों का समर्थन करता है। इस फ्रेमवर्क के माध्यम से चिंता के विभाजन के माध्यम से दक्ष डेटा-आधारित गेम लॉजिक को संभव बनाता है, जो जटिल गेम आर्किटेक्चर के लिए आदर्श है। विकासकर्ता अपनी क्षमता को कस्टम सिस्टम और कंपोनेंट के माध्यम से आसानी से विस्तारित कर सकते हैं।
उपयोग
2D/3D खेल निर्माण
बड़ी संख्या में गेम एन्टिटी का प्रबंधन
डेटा-आधारित गेम लॉजिक का कार्यान्वयन
मॉड्यूलर गेम सिस्टम बनाना
गेम लूप में प्रदर्शन को अनुकूलित करना
मुख्य विशेषताएँ
एंटिटी-कॉम्पोनेंट-सिस्टम आर्किटेक्चर
उच्च प्रदर्शन और कम मेमोरी ओवरहेड
क्रॉस-प्लेटफ़ॉर्म समर्थन
विस्तारयोग्य प्रणाली और घटक मॉडल
एम्बेडेड इवेंट और क्वेरी सिस्टम
इनके लिए उपयुक्त
Flutter का उपयोग करने वाले गेम डेवलपर्स
स्केलेबल एंटिटी प्रबंधन की आवश्यकता वाले प्रोजेक्ट
जटिल गेम मैकेनिक्स बनाने वाली टीमें
ईसीएस बेस्ट प्रैक्टिस की तलाश में विकासकर्ता
प्रदर्शन-महत्वपूर्ण अनुप्रयोग
विचार योग्य बातें
ECS पैटर्न की समझ आवश्यक है
शुरुआती लोगों के लिए सीखने का ढलान अधिक तेज है
सीमित निर्मित ग्राफिक्स या ऑडियो समर्थन
एक पूर्ण गेम इंजन नहीं है
डिबगिंग के लिए अतिरिक्त उपकरण के साथ सबसे अच्छा उपयोग किया जाता है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
dartemis is a Dart port of the Entity System Framework Artemis.
The original has been written in Java by Arni Arent and Tiago Costa and can be found here:
https://gamadu.com/artemis/ (archived) with the source available here:
https://code.google.com/p/artemis-framework/
A Component is a pretty simple structure and should not contain any logic:
classPositionextendsComponent{
num x, y;
Position(this.x, this.y);
}
Or if you want to use a PooledComponent:
classPositionextendsPooledComponent{
latenum x, y;
Position._();
factoryPosition(num x, num y) {
final position = Pooled.of<Position>(() => Position._())
..x = x
..y = y;
return position;
}
}
By using a factory constructor and calling the static function Pooled.of, dartemis is able to reuse destroyed components and they will not be garbage collected.
Define a systems that should process your entities. The Aspect defines which components an entity needs to have in order to be processed by the system:
classMovementSystemextendsEntityProcessingSystem{
lateMapper<Position> positionMapper;
lateMapper<Velocity> velocityMapper;
MovementSystem() : super(Aspect.forAllOf([Position, Velocity]));
voidinitialize() {
// initialize your system// Mappers, Systems and Managers have to be assigned here// see dartemis_builder if you don't want to write this code
positionMapper = Mapper<Position>(world);
velocityMapper = Mapper<Velocity>(world);
}
voidprocessEntity(Entity entity) {
Position position = positionMapper[entity];
Velocity vel = velocityMapper[entity];
position
..x += vel.x * world.delta
..y += vel.y * world.delta;
}
}
darteroids - Very simple example included in the example folder of dartemis, (Source)
Shapeocalypse - A fast paced reaction game using
Angular, WebAudio and WebGL
damacreat - An iogame similar to agar.io about creatures
made of dark matter (circles) consuming dark energy (circles) and other dark matter creatures (circles), which can shoot black holes (circles)