• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
kburkhart84

Creating "Chains" of objects with smooth motion.

7 posts in this topic

I'm making a game with Game Maker(Studio), but I understand C/C++ so that won't be a problem.

I'm looking at creating a bit of variety. Simple chains that follow a path are pretty easy, but what about chains that are more "wild." It seems like they are partly IK chain based, but I'm not so sure, considering that I don't think older platforms had enough power to really do IK with this many "links/bones" as these games have. So it seems to me that in general this should not be too difficult to do. I'm pretty sure it wasn't done pre-drawn, also considering the limited space constraints of these old platforms. I have found a few videos so you can see what I'm talking about.
[media]http://www.youtube.com/watch?v=BUoAVtYn6GQ[/media] at time 1:54. The guy talking is pretty stupid sounding, but it is a good example, which is the scorpion boss from Legend of Zelda: A Link To The Past(SNES) You can see the scorpion tail is "wagging" for the most part, but then gets shot out towards link.
[url="http://www.youtube.com/watch?v=NcXuvqwIztc"][media]http://www.youtube.c...?v=NcXuvqwIztc[/media][/url] is the final boss to the SNES game BioMetal( a really difficult Shooter). You can see the "arm" chain thing at the bottom that moves around pretty fluid and random, and doesn't appear to follow a given path, or be constrained to an IK chain type thing either.
There are other examples, including bosses from the Contra series of games.
So, does anyone have any insight how to create this effect. I'm sure the ones where the chain objects simply follow the leader is easy, as you can simply have each one follow the next one in line, but how about the fluid circular motion, etc...?

Thanks in advance for the help.
0

Share this post


Link to post
Share on other sites
I don't know much about GameMaker, but if it has a physics module you can model something like that as a chain of hinge joints, with angular constraints on the hinges to keep the chain from folding up. (Remove the constraints to provide a movement mode like in the second video, when the chain sort of collapses in on itself). Lightweight 2d physics libraries such as Box2D make this sort of thing relatively easy.
0

Share this post


Link to post
Share on other sites
I doubt there's anything remote resembling physics in there.

Looks more like some kind of Bezier in the Zelda screen shot.

In the second it looks like delta offsets are passed up the chain. The start of the tail seems to only turn clockwise or counter clock wise and those movements chain along to the outside. When the arm lashes out to the top left it looks like a scintillating series of cw/ccw turns.
0

Share this post


Link to post
Share on other sites
[quote name='JTippetts' timestamp='1352782778' post='5000463']
I don't know much about GameMaker, but if it has a physics module you can model something like that as a chain of hinge joints, with angular constraints on the hinges to keep the chain from folding up. (Remove the constraints to provide a movement mode like in the second video, when the chain sort of collapses in on itself). Lightweight 2d physics libraries such as Box2D make this sort of thing relatively easy.
[/quote]

I actually have to agree with the quote below. I seriously doubt any of this is physics related, although GM Studio does now include Box2D physics.

[quote name='Endurion' timestamp='1352785985' post='5000475']
I doubt there's anything remote resembling physics in there.

Looks more like some kind of Bezier in the Zelda screen shot.

In the second it looks like delta offsets are passed up the chain. The start of the tail seems to only turn clockwise or counter clock wise and those movements chain along to the outside. When the arm lashes out to the top left it looks like a scintillating series of cw/ccw turns.
[/quote]

So how do you think they did those in the original console systems? I'm wondering if the SNES even had the processing power to handle bezier curves.
0

Share this post


Link to post
Share on other sites
[quote name='kburkhart84' timestamp='1352847974' post='5000708']
So how do you think they did those in the original console systems? I'm wondering if the SNES even had the processing power to handle bezier curves.
[/quote]A wristwatch should have the processing power to handle Bezier curves.

That said, they don't need Bezier curves to get that Zelda tail. Like Endyrion said, it could be a simple transform getting re-applied on top of itself to produce the next point on the tail. If a constant transform doesn't quite give them what they want, they might also be slightly nudging the transform between applying it. Neither the initial transform or the nudges need not be rigorously correct, just cheap and good enough.
0

Share this post


Link to post
Share on other sites
OK, I see how the transforms would work, and I'm pretty sure I can apply it to GM's gml scripting with no problems. Now, I doubt that the randomness of the second tail was done with simple transforms. In fact, it at times "scrunches" into itself, it does a "whip-like" motion creating a wave, and it sometimes extends trying to hit the ship. Does anyone have any clue how that part could be done?
0

Share this post


Link to post
Share on other sites
Correct, the posted videos probably weren't using physics systems. However, in today's world, 2D physics libraries are an extremely cheap drop-in solution, and you can get such a thing up and running literally in moments. I did a small test using Love2D and Box2D, and got a chain swirling around very much like the one in the second video in about 15 minutes. I can post the code, if you like; it's dead simple. The hard work is done by the physics library, all I had to do was tweak a few parameters.

That being said, you could probably also achieve a similar effect by using "canned" animations, by pre-computing animation tracks for each ball in the chain for a particular movement, especially for the Zelda boss, since there isn't the wavy variation that the second one has. I suspect the second one might be canned, too, since those bullet-hell games tended to be pretty tightly timed and patterned. Edited by JTippetts
1

Share this post


Link to post
Share on other sites
I actually just posted something like the "canned" things you are talking about on the GMC(game maker community). Since GM has a path system, and easy functions to calculate positions on those paths(between 0 and 1) similar to lerping along the path, I can take advantage of that. I'm thinking I create multiple paths, like for example the tail for the scorpion have a path for left and one for right. Each point of the chain would be at a certain position of paths(0, 0.1, 0.2, of there are 10 chain links) and then I can simply have the links lerp to the respective positions between paths. I can also apply something similar to the biometal one by having some paths that are more "weird" than simple curves, and then lerping points between them. Lastly, the path system lets you create paths at runtime, with different parameters, so for example it is easy to make paths like bezier curves instead of linear paths, so I could even make random paths for the chain links to lerp between.

So far, this seems like it is going to be the best solution. In fact, now that I'm thinking more about it, I may be able to come up with a sort of "cheap IK chain" using these same paths...We'll see.
1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0