Creating a Tentacle

Started by Quikpick01, Tue 03/06/2008 04:42:02

Previous topic - Next topic

Quikpick01

Hi, I have a question.

Is there a way I could create a tentacle that would grab for an area that the player clicks on. if not that, would it be better to use more of a frog tongue like tentacle. I am experimenting with draw line right now.

Khris

It depends on how you want the tentacle to look like.
I can think of these solutions:

-If the tentacle's "start" can be off-screen, create animations for a few different angles and distances, then move the start while animating it so the "end" ends up at the clicked location at the end of the animation.

-Do it SNES-style: draw 10 or 15 seperate parts, then use complex formulas ;) to determine where every part's supposed to be to form a moving tentacle.

-Or, indeed, rawDraw the whole thing.

magintz

I've been working with the DrawLine function lately and it might not be the best thing to use, the most irritating thing is that it draws to the background so it lays behind all objects and characters regardless of what you do.

I don't really know of a better way unless the object is always in the same place then you could just create a static anim or even use things like the rotate and resize sprite functions to move the tentacle.
When I was a little kid we had a sand box. It was a quicksand box. I was an only child... eventually.

SSH

Quote from: magintz on Tue 03/06/2008 13:04:22
I've been working with the DrawLine function lately and it might not be the best thing to use, the most irritating thing is that it draws to the background so it lays behind all objects and characters regardless of what you do.

Unless you use it on a DrawingSurface of a Dynamic Sprite which can be placed on an overlay, GUI, objects, character, etc...
12

Quikpick01

its going to start in the middle of the screen. I may try the SNES style just to see what I can get. basically it just shoots out to grab stuff in the air.

GarageGothic

As SSH said, the DrawingSurface routines allow you to draw on objects and characters. If you use an earlier AGS version, you can use the screen as a buffer by RawSaving the screen when the player enters the room, the clearing it with the magical pink (RGB 255,0,255) drawing your stuff and retrieving it to a DynamicSprite with CreateFromBackground and finally do a RawRestoreScreen.

Depending on your art style, it would probably be better to settle for the frog tongue effect since a full tentacle drawn with flat colors would probably look out of place.

Shane 'ProgZmax' Stevens

...or you could take another route entirely and just draw and animate the tentacle yourself for x-directions.  4 would be fine for most people, but 8 directions would certainly be enough to simulate the tentacle following your mouse clicks, and best of all it involves little to no actual scripting (just a check when you mouse click to have the tentacle 'character' face those coordinates and then perform the grab animation).

Quikpick01

so just section off the screen basically and say if I click in this area play this animation. and if i click in this area play thin animation. basically divide the screen into hotspots almost

Quikpick01

the original idea I had was something along the way the lines are drawn in PixelJunk Eden

http://www.youtube.com/watch?v=viLB8_u5jJ4

I can handle the art but my guess is the programming is uber complicated.

monkey0506

The graphics and physics end of that video look pretty complicated, and to be honest I doubt AGS is really the best program for making something like that. AGS isn't really suited to the dynamic creation of solid objects at run-time.

If you simply wanted something like that going on in the background, you could just animate the "tentacles" yourself, export all the frames from the animation, import them into AGS, put them in a view, and make them animated objects.

Quikpick01

an idea was to just make a lot of animations. for each of the sections of the screen, but i worried about a sky rocketing file size.

SMF spam blocked by CleanTalk