Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Bones animation in Game Maker 8.1  (Read 6432 times)

0 Members and 1 Guest are viewing this topic.
Bones animation in Game Maker 8.1
« on: July 26, 2012, 11:53:02 pm »
  • AKA "Micah DS"
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1347
Whether you know or not (or care), I've been working on a commercial game. For this game I needed to create a bone animation system and I've gotten the hard part done, which is calculating rotations from any number of bones and points. The next part is to make a bone-based model and to give it animations (not really hard at all but should be very time consuming).

Even though I plan to sell my game, I still plan on releasing an editable of the bones animating code along with a tutorial. That is, if anyone is interested.. ? I'm willing to offer this out because I know how extremely frustrating it has been for me to learn how to do bones animation in Game Maker (REALLY frustrating), and I think people could really use this if they wanted to make a 3D Zelda fan game with Game Maker.

I guess I should show what I've done in my dev test:

(Ignore the horrid shading, low res, and the graphical fighting. These will be remedied when it matters.)

The green joint is the origin point of the model. The red parts are the main set of bones and the cyan bones show that a set of bones can branch off from any joint.

Basically, the only thing this can't do is have circular joint connectivity, which is completely unnecessary anyway. If you wanted to make a human with realistic movements, this would work just fine.

I should note that this bones animation engine is using ONLY the d3d functions. I'm not using external scripts to load in models or anything. The reason why is because I wanted to figure out the basics and make something simple so that people can learn. Also, I just want to test how far I can go with only using game maker's d3d functions. I'm betting it will kill the cpu (because I believe the d3d functions don't use the gpu) and that I'll have to move on to a more efficient method that isn't so hard on the cpu. But still, this should be pretty useful if anyone wants to make a 3d fan game with Game Maker.

Actually, I'm planning on making a model of Link as a test, so that it might serve the community in some way. I'm shooting for Link to be able to walk, run, jump, block with his shield, and swing a sword in various manners. Of course, since I'm using bones, I can easily make link walk or run while blocking with the shield or while swinging his sword and I don't have to have "frames" of animation, like, "run with shield block" and "walk with shield block". Instead, I can simply have "run", "walk", and "shield block", as the legs will do their thing, not caring what the top half of Link is doing (unless I want it to). The animation is actually even more open than that, but I'm sure you get the idea.

Bones animation gives me more freedom to have smooth animations and more realistic movements, depending on how well I set up the bones and how much time I take in rigging it, etc.


If anyone has feedback or questions, feel free to shout out. XD
« Last Edit: July 27, 2012, 04:51:06 am by Frozen炎 »
Logged
  • My Music
Re: Bones animation in Game Maker 8.1
« Reply #1 on: July 27, 2012, 12:18:10 am »
  • Oh.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 579
If you're making a commercial game in 3D you really shouldn't be using Game Maker. I'm not 100% on how Game Maker has evolved over the years, but unless you're willing to write and bind your own libraries to Game Maker (at which point you may as well write your own engine in a real development environment), you're going to be at the mercy of several unmaintained and deprecated DLL's to try and facilitate the functionality that your game needs.
Logged
Hm.
Re: Bones animation in Game Maker 8.1
« Reply #2 on: July 27, 2012, 12:20:51 am »
  • Yeah, I don't even...
  • *
  • Reputation: +11/-4
  • Offline Offline
  • Gender: Female
  • Posts: 1008
^This, You might as well use C#, XNA or C++, There are many libraries and drivers and such you can use for them, and you can code your own.
Logged
Re: Bones animation in Game Maker 8.1
« Reply #3 on: July 27, 2012, 04:45:41 am »
  • AKA "Micah DS"
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1347
If you're making a commercial game in 3D you really shouldn't be using Game Maker.

I totally understand where you're coming from and I'd completely agree if I were thinking about 3D as most people do, however, I envision 3D game design very differently from many people. When most people hear the word "3D", they tend to think graphics first and gameplay second, where I think of gameplay first and second I think of how the graphics can compliment the gameplay to make it an enjoyable experience. I guess I tend to think more "indie" than most people, if you get what I mean. I'm probably not getting my point across very well, but I believe Game Maker has come along far enough to at least give my idea a shot.

And if Game Maker fails to be efficient enough to make my game become a reality, I will just use Game Maker to prototype and I will switch to using Monkey to make the game instead. And what I make with Game Maker I can release to the public on here, because I'm sure it will be useful to some fan game creators. I think that Flying Rooster has already proven that Game Maker can do some styles of 3D well. Flying Rooster mainly lacked in good character animation (though it wasn't bad) and proper shadows, both of which I have already gotten to a level that I think is good enough for a commercial quality indie game. Especially from looking at the indie games that sell on Steam, I have pretty high confidence that I can make a game of a high enough quality to match or even surpass some of those games.

... unless you're willing to write and bind your own libraries to Game Maker (at which point you may as well write your own engine in a real development environment), you're going to be at the mercy of several unmaintained and deprecated DLL's to try and facilitate the functionality that your game needs.

Right you are. Fortunately, I have figured out what extra functionality I'd need for this game and I've already got that covered. The only question is how much does it weigh on the CPU from only using Game Maker's d3d functions as opposed to importing models. Mainly I just need to stress test by using a lot of 3D rotations combined with shapes drawn in 3D (I'll probably just clone a healthy amount of bone animated characters and monitor fps, cpu, and ram). If I end up having to use real models then I'm going to move on from Game Maker and use Monkey.

The reasons that I'm using Game Maker first instead of Monkey are: 1) I've used Game Maker ever since it came out, so I know GML very well and I've only fiddled with a Monkey demo, and 2) I've already bought Game Maker and I don't want to spend $120 for Monkey unless I have to. Also, Game Maker is very visual and it's really great for prototyping if nothing else.


I guess I'm just not willing to give up on Game Maker before trying to see if it can handle the kind of 3D style that I'm going for.

I DO HAVE A WONDERING THOUGH:
In the case that Game Maker doesn't work out, would Monkey be a good way to go? I know that it can automatically translate into C# or C++ among other programming languages, allowing to easily port to Xbox, Mac, Tablets, etc. That's really the only reason I like it, mainly because I'd only have to learn Monkey Code and it takes care of translating the code for porting from PC to any other platforms that I'd want my game to be on.
Logged
  • My Music

noseblunt3

Woodman is awesome
Re: Bones animation in Game Maker 8.1
« Reply #4 on: July 27, 2012, 05:14:37 pm »
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Gender: Male
  • Posts: 132
You could always use Unity3d, there's a lot of support available and it's pretty easy to use. 
Logged
Rome wasn't built in a day, but they didn't waste time by sitting around doing nothing either!
Re: Bones animation in Game Maker 8.1
« Reply #5 on: July 28, 2012, 09:44:35 pm »
  • AKA "Micah DS"
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1347
You could always use Unity3d, there's a lot of support available and it's pretty easy to use.

Thanks noseblunt3. I looked up unity and watched some beginning tutorials. I can't believe how easy it is to understand! Everything is laid out really well. I may just have to switch over to Unity for developing my game, but I have to do a bit of research before I decide. One concern I have is wondering if I'd find myself needing to switch to Pro, which I really don't have pockets deep enough for ($1500 is heavy! .. though understandable), not to mention the additional feature costs if I wanted to go for tablets/phones (though I don't think I will).

On topic: I will be fooling around with Unity, but I will still make the animated Link model with Game Maker, and I'll at least make a walking animation example, and probably a sword swing or two. Though I might not do any more than a walking example because, if I switch to using Unity for my game, then programming in Game Maker becomes a waste of time. But I'll be sure to make the game maker example very straightforward so that anyone can make their own additional animations with the Link character. The code for the bones was the hard part (and that actually turned out to be far easier than I had previously believed.. almost stupidly so).

Anyway, I'm going to begin working on the Game Maker example right now. Should have an update later tonight or some time this Monday.
« Last Edit: July 28, 2012, 09:47:39 pm by Frozen炎 »
Logged
  • My Music
Re: Bones animation in Game Maker 8.1
« Reply #6 on: July 30, 2012, 10:12:13 pm »
  • AKA "Micah DS"
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1347
Hmm, I tried doing a toon outline by turning culling on, drawing the shapes inside out, yadda yadda.. it works mostly as expected but then I get lines bleeding through where I don't want them:


I think this is due to the way I'm drawing the model but I don't think there's a workaround because it seems to be unavoidable if you draw shapes that overlap in any way (I'm using ellipsoids for joints and the limbs connect at the center points of joints to create what is supposed to be seamless rotations).

This is unfortunate because I was totally relying on toon lines for this bone animation example, because without it I would have to use lighting, which is simple cheap lighting that looks like crap. Or I could go without any light, but then the depth becomes difficult to discern and it doesn't look as good as toon lines do.

I thought Drandula somehow overcame the issues I'm having, but after looking at his old FR project I think he just designed his models within the limitations of this drawing method (though I could be completely wrong). Who knows, I might just be overlooking something.


If I can't get toon lines to work, I'm going to let this project die. If anyone wants the code, I'll clean up the example a bit and I'll post it here. I really did want to see this with a perfectly working toon outline though. *sigh* At least this solidified my decision to move on to Unity.
Logged
  • My Music
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.049 seconds with 51 queries.

anything