Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / How to get Spine to work in c++

Author
Message
3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 10th Feb 2015 14:33 Edited at: 10th Feb 2015 14:49
Well this took me a while to figure out but I eventually did it. This post shows the user how to export data from spine to use it in c++, since the agk help command does not explain this very well.
Let us start with spineboy which is the common import the spine produces. After you have created your figure these are the following steps to export the image as well as how to use it in c++

Steps:
1. Click on the spine menu
2. Click Export.
3. Click on Setting.
4. Change the settings to following export.



5. Put these files in the media folder of your game .atlas, png, and the Jason exports files in the media folder of the application that you are building. Notes on the .atlas file: Make sure the .atlas file is the same name as the png file. The png file should be all contained within on sprite sheet that is of size 1024 by 1024 or less to work properly for the import.

6. This is an example of how you code it in c++.



This code does not work unless you use these element in loading the spine file in c++. in the begin portion you have to use loadimage agk command to store the image you wish to use. agk:laySkeleton2DAnimation see help file for more information about this command.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-25 16:29:23
Your offset time is: 2024-11-25 16:29:23