Sprite linking in my retro game engine

posted in GAME1
Published August 28, 2021
Advertisement

Added a “Link Sprite” feature.

What does this do?

It allows you to link a sprite's position to another sprite.

For example, sprite b (shadow) can be linked to sprite a (player). This means that whenever the player moves, the shadow follows.

A linked sprite also has an offset, so for example the shadow can be not exactly under the player sprite, but a little to the right and down.

You can link as many sprites to a single sprite as you want. But a sprite can only be linked to a single sprite. However, you could link sprite c to b to a, having sprites linked to sprites linked to sprites. This could perhaps be used to have pivoting limbs or such.

Additionally, you can link the animations. So for example if the player sprite is on frame 15, the shadow sprite would also be on frame 15. This way you can for example have a shadows that follow the form of the player.

A small example of shadow sprites being linked to player sprites. Note: Currently there is no way to change the front/back order of any sprites, so it's random which sprite goes before which. However you can easily simulate layers, by having several sprite “sets”. This is what you see in the picture.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement