Activity

ericnib2019

changed the structure of aniamtion and texture storge, now a texture can contain multiple animation, and animation are a roll on the picture, and multiple animation can be on the different y level of a animation, now the animation info cached on each sprite does not need to store pointer to the texture, reduce the possibility of dangling pointer if i ever need to recycle loaded textures, and move many things to the heap.

all of this are not supposed to make a difference on performance, but it kind of did, now it normally stays at 2000 microsecond and go up to 3000 when update position of sprite, think its still good, as long as not peak over 3000

also optimized structs because i got aware of struct padding, so now the entire Propertie_Base struct fit in a L1 cache so should be more optimized? idk

Attachment
Attachment
Attachment
0
ericnib2019

I’m working on my first project! This is so exciting. I can’t wait to share more updates as I build.

Attachment
0
ericnib2019

now the sprite’s hands attachment are able to display correctly, idk how i fixed it it just does(dont mind the position of the hands, i just didnt set a offset from the sprite’s origin yet, you can expect animation to be added later)

also, can anyone tell me are there speed difference beteen accessing variable in stack and heap? i really want to move some massive arrays to the heap but im afraid of the accessing speed penalty, especially when design render loop

Attachment
0