#8XLib

1 messages · Page 1 of 1 (latest)

stable matrix
#

Feel free to create issues, critique whatever

#

I am fairly proud of this so far and its the first big software thing I have ever done lol

stoic goblet
#

Can animation_speed be defined by the sprite's speed by default?

stable matrix
#

for that you can use

sprite_get_speed()
#

cause it returns the fps or speed you specify in the sprite editor

stoic goblet
#

what I mean is : perhaps it could be an optional argument that, by default, returns the sprite's speed. I can imagine myself just using whatever speed is in my sprite's already

#

It's an interesting system to solve some of GMs limitations with sprites but I'm a bit confused about some things. Why do you need to specify the scope? wouldn't it be most if times being executed in the object you want to draw it?

stable matrix
#

The scope has to be specified cause of GML's lack of pass-by for functions

#

and I intended for the tick and draw functions to be things you can just drop in and it will work

#

When GML gets pass-by, I plan on updating the module to support that so it will probably be less confusing

#

I hope this makes sense though

stable matrix
stoic goblet
#

yeah of course 👍 Im just reading the code and trying to understand how it is working.

stoic goblet
stable matrix
#

Unfortunately not because you can't modify variables passed into functions, only return them and then modify after

#
angle = 0;
rotate( angle, 90 ) // Would not work

angle = rotate( angle, 90 ) // works
chrome pewter
#

Only if you do this, yeah:```gml
function func(_scope, _var_name, _value) {
_scope[$ _var_name] = _value;
}

#

We might get references at some point in the future.

stable matrix
#

if we dont get references I'll cry

stable matrix
#

Hopefully I can get the map functions done fairly soon. I use a version of Animo for my own game and they are immensely useful for storing animations

#

The whole idea is basically this:
You have a character called Bob. Bob has a massive folder of sprites and all of his assets are tagged as ‘Bob’. Then all of those sprites are initialized as animations at your game preload and you can call ‘animo_retrieve( “Bob”, “walk_cycle” )

#

Or some form of that

chrome pewter
#

I do some sort of that in pretty much every project.

#

Very helpful.

stable matrix
#

Especially since it is all strings it feels much more user friendly

chrome pewter
#

Agreed. Having an abstracted "state enter" function that parses the sprite based on the current state is great.

stable matrix
#

Will also be including naming rules so you can specify snake, camel or pascal case in your sprite asset names

stable matrix
#

Do these function names seem comfortable to use?

// Populates the animo map with all sprites with an inputted tag
animo_map_init_from_tag();

// Retrieves an animo animation from the map with an inputted tag key
animo_map_retrieve();

// Manually adds an entry to the map with an inputted tag key
animo_map_add_entry();
stable matrix
#

hrmm ok I am running into an interesting design problem

#

So the different cases are prefixed by their tag, which means if you have a sprite named 'spr_bob'

#

That would technically not be a valid animation name, however if you do
'spr_bob_walk'

#

then the animation is just named 'walk'

#

I have no idea how I am going to handle the different ways people prefix their assets, if that is even worth it

stable matrix
#
animo_map_retrieve( "guy", "doingstuff" );

This is the kind of thing I imagine people will be doing to retrieve animations

stable matrix
#

Everything should be working fine, my tests showed everything fine

#

Wiki is updated

#

etc etc, hopefully this is still a useful tool!