Hi there ! I started to read Paradox’s samples yesterday, and I must say I find the whole thing quite interesting ! I always searched for a simple game engine that wouldn’t “do too much” (thinking of Unity), and this looks like the code-centric engine I was looking for !
I just happen to have some questions about entities, for their true purpose isn’t quite clear for me. I started to code my own first “game”, after reading lots of sources, and the way the engine manages its entities is a bit confuse to me :
I understand that an Entity
is composed of Components
, each type of components allowing several behavior/mechanics. What I don’t understand is : How comes things like translation can be implemented in the Studio and not custom attributes like speed ? What I don’t get is, if I come to code, say, a basic physics system with a couple of balls rushing towards a gravity well in space, I have to implement that speed factor. Then I’ll have the ball’s position defined as a component, and its speed defined in a Ball
class, which will also contain an Entity
as one of its members, right ?
So my class “structure” will be the following (according to the SpriteEntity sample) :
class Ball:
├─Entity:
│ ├─Position
│ └─Collisions
├─Speed
└─Other attributes like color, etc.
Isn’t it a bit, well… unlogical ? I just think I’m getting something wrong, thus I don’t think I got the purpose of Entities right. Could someone explain how Entities can and should be used ?
Thanks in advance !