• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Legacy GM Errors with spine

G

GameBorgs

Guest
I'm on 1.4.1763
Spine:3.0.10 essential
This rig has 16 gigs of memory
660ti
i5 2500k

I can import the spine files just fine into gamemaker with no errors.

With a blank room with no objects I get the same problems. If i change the sprites to something not from spine it works fine.Spine exports to other formats just fine(gif,avi)

When I try to compile it for windows The error either says OUT OF MEMORY or just doesn't do anything doesn't run the game. I thought the files might be too big so i reduced them down to 218x154 but I still get errors.

With HTML5 the error says could not find the file ".atlas". But the atlas file is right where I left it and is clearly there.

Compiling for android brings up the normal cmd prompt for testing but nothing happens on the phone.

This has been driving me crazy and I've looked everywhere I can thing of for answers to no avail.
 

obscene

Member
Personally the only time I've encountered an out of memory error with a spine sprite was when I tried to import a sprite with slots and no sprites. Doubt that is helpful but it's all I got.
 
S

Scooter

Guest
Hey buddy,
Currently seeing this bug again after I figured out a workaround last time that I've conveniently forgot. The workaround had something to do with copy and pasting the export files created by Spine directly into the Sprite > Image folder in the Project directory.
Will update this post once I figure it out again,
 

rIKmAN

Member
Hey buddy,
Currently seeing this bug again after I figured out a workaround last time that I've conveniently forgot. The workaround had something to do with copy and pasting the export files created by Spine directly into the Sprite > Image folder in the Project directory.
Will update this post once I figure it out again,
Are you using the new EA version?
It has updated it's Spine support and added Events.

There is no documentation yet but @Nocturne is (hopefully) working on it.

You might also have to import <> export your existing Spine files from the new version for them to work in the EA, so make sure you back them up before you try updating them as you won't be able to load them in the earlier version of Spine once you have re-exported them.
 
S

Scooter

Guest
Confirmed the workaround I posted above works. You just gotta put the files (.json, .atlas, and .png) in the project directory, import them from there, then rename them to your sprite name before running.

Are you using the new EA version?
It has updated it's Spine support and added Events.

There is no documentation yet but @Nocturne is (hopefully) working on it.

You might also have to import <> export your existing Spine files from the new version for them to work in the EA, so make sure you back them up before you try updating them as you won't be able to load them in the earlier version of Spine once you have re-exported them.
Thanks for the reply my dude.

I haven't tried this yet on the EA build. Good to hear they're increasing Spine support because I'm starting to get into it more and the events seem like the can be really useful!

Will check this out on EA when I get a chance and report back.
 

rIKmAN

Member
Confirmed the workaround I posted above works. You just gotta put the files (.json, .atlas, and .png) in the project directory, import them from there, then rename them to your sprite name before running.



Thanks for the reply my dude.

I haven't tried this yet on the EA build. Good to hear they're increasing Spine support because I'm starting to get into it more and the events seem like the can be really useful!

Will check this out on EA when I get a chance and report back.
No worries man, yeah let us know how it goes and post back here.

Events are really useful, I've been waiting for them to be implemented for a few months now as most of my animations use them, just waiting on docs to be updated now.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
There is no documentation yet but @Nocturne is (hopefully) working on it.
Documentation is done, but just not updated yet. For now, here's a summary:

Spine events are now triggered in GameMaker and there is a new event type – it’s “Other->Animation event”
This event is triggered on an object which has a spine sprite assigned to it, and where the spine sprite is drawn automatically, or via draw_self(). It currently won’t trigger on spine sprites drawn any other way. Inside the action for an animation event, a ds_map called “event_data” is accessible (this works the same way as “async_load” in an async event). This has the following fields:
  • “name” – the name of the event
  • “track” – the index of the track the animation is playing on
  • “integer” – an integer value associated with the event (the event parameters are set up in the Spine IDE)
  • “float” – a float value associated with the event
  • “string” – a string value associated with the event (this is just “” if there is none)

A few new spine-related functions:

skeleton_animation_get_frames(anim_name)” – this returns the total number of frames for the specified animation (returns 0 if the specified animation doesn’t exist)
skeleton_animation_get_frame(track)” – this returns the frame index of the animation on the specified track (returns 0 if no animation exists on that track)
skeleton_animation_set_frame(track, index)” – this sets the frame index of the animation on the specified track
"skeleton_get_minmax()” – this returns a 4-element array containing the room-space bounds of all the bounding boxes attached to the current spine skeleton – the order of entries is: minX, minY, maxX, maxY
skeleton_get_num_bounds()” – this returns the number of bounding boxes attached to the current spine skeleton
skeleton_get_bounds(index)” – this returns an array containing information about the bounds with the specified index (the index is a value from 0 to n (where n is the number of bounding boxes)). The array has the following entries:
  • 0 – number of points
  • 1 – the name of the bounding box (this is a string)
  • 2 – the x position of the first point
  • 3 – the y position of the first point
  • 4 – the x position of the second point, etc. (up to the number of points)
:)
 
S

Scooter

Guest
Alright, I checked out this issue on EA. The Out of Memory error on compile wasn't there. However, it would still print some errors during the compile log then crash after the splash screen when running with the basic Windows module.

I have a speculation on what's causing the problem (at least for me). I'm on a Mac and trying to import the files from the native Mac directories. I've already had to move my Android SDK and NDK because GM doesn't support pulling from these kind of directories. Once I move the Spine export files to my Windows virtual drive, and import them from there, they work correctly.
 
G

Gamely

Guest
I don't understand why game maker returns these slow maps instead to something else..The entire spine api pipeline rely them making the runtime anim modification a pain.
I hope that in future they will replace maps with predefined return structs you can access with dot sintax or at least arrays you can always index by enums.
 
B

BlueSlime

Guest
Documentation is done, but just not updated yet. For now, here's a summary:

Spine events are now triggered in GameMaker and there is a new event type – it’s “Other->Animation event”
This event is triggered on an object which has a spine sprite assigned to it, and where the spine sprite is drawn automatically, or via draw_self(). It currently won’t trigger on spine sprites drawn any other way. Inside the action for an animation event, a ds_map called “event_data” is accessible (this works the same way as “async_load” in an async event). This has the following fields:
  • “name” – the name of the event
  • “track” – the index of the track the animation is playing on
  • “integer” – an integer value associated with the event (the event parameters are set up in the Spine IDE)
  • “float” – a float value associated with the event
  • “string” – a string value associated with the event (this is just “” if there is none)
:)


does this work in EA 1.99.525 too?

I can get the event to trigger but the values I set in Spine for the event don't show up it is all the default values instead?


What is wrong with this?

(in the animation event)
Code:
if (ds_map_exists(event_data, "string") && ds_map_exists(event_data, "integer") )
{
    a = event_data[? "string"];
    b = event_data[? "integer"];
   
    show_debug_message("string: " + string(a));
    show_debug_message("integer: " + string(b));
}
//show_debug_message("ended triggered");

it outputs an empty string and an integer of 0




but I set them in the Spine event

 
Last edited by a moderator:
B

BlueSlime

Guest
does this work in EA 1.99.525 too?

I can get the event to trigger but the values I set in Spine for the event don't show up it is all the default values instead?


What is wrong with this?

(in the animation event)
Code:
if (ds_map_exists(event_data, "string") && ds_map_exists(event_data, "integer") )
{
    a = event_data[? "string"];
    b = event_data[? "integer"];
  
    show_debug_message("string: " + string(a));
    show_debug_message("integer: " + string(b));
}
//show_debug_message("ended triggered");

it outputs an empty string and an integer of 0




but I set them in the Spine event



Ok I got it to work.... I had to set the values as default in setup mode ... even when I changed the values in animate mode GM:S ignores it and only reads the defaults....my first test was with no default values....but now it works I guess
 
Top