All Projects → niksudan → sk

niksudan / sk

Licence: other
💀 GameMaker skeleton animation

Programming Languages

Projects that are alternatives of or similar to sk

stitch
A Gamemaker Studio 2 Pipeline Development Kit. A CLI and Node.JS API for creating GMS2 pipelines. Includes cross-project imports, batch-creating/updating sprites and sounds, texture page management, and more.
Stars: ✭ 54 (+184.21%)
Mutual labels:  gamemaker
Kawase
Kawase dual filter blur for GameMaker Studio 2
Stars: ✭ 23 (+21.05%)
Mutual labels:  gamemaker
iota
Miniature delta time and time dilation library for GameMaker Studio 2.3.2
Stars: ✭ 19 (+0%)
Mutual labels:  gamemaker
gamemaker-godot-dictionary
A dictionary for people moving from GM:S to Godot
Stars: ✭ 172 (+805.26%)
Mutual labels:  gamemaker
sonic-gms2
A GameMaker Studio 2 template project used for constructing games based on the Sonic the Hedgehog series.
Stars: ✭ 18 (-5.26%)
Mutual labels:  gamemaker
BBMOD
Advanced 3D in GameMaker
Stars: ✭ 31 (+63.16%)
Mutual labels:  gamemaker
textboxy
Simple textboxes for Game Maker Studio 2
Stars: ✭ 58 (+205.26%)
Mutual labels:  gamemaker
Sublime-GameMaker-Studio-Language-Bundle
A sublime bundle for GameMaker Language (GML)
Stars: ✭ 32 (+68.42%)
Mutual labels:  gamemaker
gms2-destructible-terrain
⛰️ Collidable, destructible terrain in GameMaker Studio 2
Stars: ✭ 24 (+26.32%)
Mutual labels:  gamemaker
dotobj
.obj/.mtl loader, written in native GML, for GameMaker Studio 2.3
Stars: ✭ 27 (+42.11%)
Mutual labels:  gamemaker
gm extensions
📖 GameMaker Library Extensions
Stars: ✭ 14 (-26.32%)
Mutual labels:  gamemaker
GMTest
GameMaker Testing Automation Suite
Stars: ✭ 14 (-26.32%)
Mutual labels:  gamemaker
Rubber
Javascript GMS2 commandline compilation
Stars: ✭ 27 (+42.11%)
Mutual labels:  gamemaker
steamworks.gml
Various expansions to Steamworks SDK support in GameMaker: Studio / GMS2.
Stars: ✭ 73 (+284.21%)
Mutual labels:  gamemaker
Gdevelop
🎮 GDevelop is an open-source, cross-platform game engine designed to be used by everyone.
Stars: ✭ 3,221 (+16852.63%)
Mutual labels:  gamemaker
DDDEditorGMS2
General purpose game editor made in Game Maker Studio 2. The basis for a lot of the tools I make.
Stars: ✭ 22 (+15.79%)
Mutual labels:  gamemaker
AGD-Studio
An integrated development environment for AGD
Stars: ✭ 39 (+105.26%)
Mutual labels:  gamemaker
handytools
A series of libraries to extend GameMaker 2022 LTS
Stars: ✭ 45 (+136.84%)
Mutual labels:  gamemaker
blur-shaders
A collection of blur shader examples, with a written tutorial.
Stars: ✭ 33 (+73.68%)
Mutual labels:  gamemaker
SNAP
Easy data format saving and loading for GameMaker Studio 2.3.2
Stars: ✭ 49 (+157.89%)
Mutual labels:  gamemaker

Game Maker skeleton system

sk

sk is an easy to use skeletal system for Game Maker Language by Nik Sudan. Please give credit when used, that's all I ask of you!

Massive thanks to Michael Savchuk for the sk icon!

Demo

Creating Skeletons

You cannot define a skeleton within Game Maker, sk loads in skeletons externally, using .sk files. These are structured like .ini files, and contain information about each joint's properties. A GUI for creating skeletons is available on itch.io for a very small fee for Windows only.

GUI

Setting Up The Skeleton

Simply import the .gml file into your project - preferably a folder within your scripts. Nothing else is needed with you and the scripts, you're done.

Skeletons are loaded using sk_import and return the skeleton's data for use with skeleton systems. This way you can load one skeleton that'll be used by loads of entities. Calling this in the Game Start or Room Start events are recommended. Use this function:

data = sk_import('pathToFile');

Once you've initialised the skeleton, you can now use with objects. You can set an object to become a skeleton by using the following function in it's Create event:

sk_create( data );

Now you've set it up, but the skeleton won't move. You need to update it, and this can be done with the Begin Step event. You can use an Alarm event if you want to call it less often, but it's a lot smoother when you don't do that. Simply call this function:

sk_update();

And that's it!

Making Joints Move

I take it you want to manipulate the joints and give it a cool, smooth animation. You can move a joint by calling the following function:

sk_setTargetAngle( jointID, angle );

The angle the skeleton is imported in at will be the zero value for angle. You can find out the jointID from your sk file or the creator.

Note: There is a function called sk_setAngle() in the library - this will immediately change the angle of the joint. The joint will move back to the target angle after you call this, so don't use it for animation.

You can then set the rotation speed of the joint with the following function:

sk_setRotationSpeed( jointID, speed );

The bigger the speed is, the faster it'll move (duh).

Drawing Stuff

Ok, you'll want to see your skeleton, right? You can call a little debugging function to see the skeleton in action:

sk_draw();

I wouldn't recommend using that for your final product. You can get the position and angle of each joint by calling these respective functions:

jointX = sk_getX( jointID );
jointY = sk_gety( jointID );
jointAngle = sk_getAngle( jointID );

Draw whatever you want on these, I won't hold you back.

Examples Of Use

Demo

Demo

Demo

Demo

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].