120 reputation
4
bio website
location Montevideo, Uruguay
age 20
visits member for 1 year, 9 months
seen Jun 5 at 20:08

Oct
11
comment Have the character automatically slide around obstacle corners
@Seth If neither the x and the y in the movement vector equal to 0, the function does nothing but call itself again, first changing the movement vector y to 0 and then changing the movement vector x to 0. I don't really like this approach, but it's the only one I could get to work perfectly.
Oct
11
asked Have the character automatically slide around obstacle corners
Oct
4
comment Tilemaps in a Entity System Framework?
Say my map is an entity. How would another entity go about accesing the map's isSolidAt method?
Oct
3
awarded  Student
Oct
2
accepted Dealing with sprite loading and setting in an entity-component system
Oct
2
comment Dealing with sprite loading and setting in an entity-component system
Man, that is perfect! Thanks!
Oct
2
awarded  Commentator
Oct
2
asked Dealing with sprite loading and setting in an entity-component system
Nov
1
awarded  Scholar
Nov
1
awarded  Supporter
Nov
1
comment Actor and Sprite, who should own these properties?
Guess I'm gonna go with this. For now, at least. A big thanks to everyone who tried to help!
Nov
1
accepted Actor and Sprite, who should own these properties?
Oct
30
comment Actor and Sprite, who should own these properties?
It's not. It's just convenient enough to be common, I think. In any case, even if the sprite isn't changed or re-set every frame, it would be counterintuitive (not to mention cumbersome) that things like the scaling of the sprite or its rotation angle are lost when changing it. Currently the Actor is in charge of making sure these things are kept.
Oct
30
comment Actor and Sprite, who should own these properties?
@Torious Hmm... currently a Sprite is, in essence, just a bunch of Images. Sprite.draw just calls the draw method of the image currently being shown in the animation (as determined by index). Is that what you mean?
Oct
30
comment Actor and Sprite, who should own these properties?
I'm sorry, but what you said souds very ambiguous. "adapt the sprite class to what you need"? "make a global Renderer class and you adapt that"?
Oct
30
comment Actor and Sprite, who should own these properties?
It should do nothing at all. It's just most people wouldn't want to write if not occupied and sprite is not SpriteIdle then set_sprite(SpriteIdle).
Oct
29
comment Actor and Sprite, who should own these properties?
Since the sprite is usually set every frame, and the sprite owns index, index would be reset to 0 every frame if the actor didn't pass it from the old sprite to the new one.
Oct
29
comment Actor and Sprite, who should own these properties?
Well, you are pretty much describing how my system currently looks like. How do you suggest I solve the problem? Thanks.
Oct
29
comment Actor and Sprite, who should own these properties?
Sprites handle animation already. The Sprite isn't likely to be changed every frame, but to be re-set every frame. Something like if not occupied then set_sprite(SpriteIdle) in a method that is called every frame is common. That's what I meant. (It wasn't me who downvoted you, by the way.)
Oct
28
asked Actor and Sprite, who should own these properties?