Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: lemniscate on Mon 23/12/2019 13:09:54

Title: Humongous Entertainment-styled-game doable?
Post by: lemniscate on Mon 23/12/2019 13:09:54
Okay, new question. Thank you guys for being so helpful by the way.

I want to make a game styled like a Humongous Entertainment game (Pajama Sam, Freddi Fish, etc.). These games are different from all the other gameplay styles I've seen, and it's clear that AGS is not optimized around this style.
I'm sure there is still a way to make it work, though, so that's what I'm here to ask!

If you are not familiar with these games: You cannot walk freely, and all animations are hand-drawn. For example, if you were to click on an object that's on the other side of the room, the player character would go over to the object, talk about it etc, and then move back to his original position. All movement is hardcoded and all animations are unique.

Is there a viable way to achieve this in AGS?
Title: Re: Humongous Entertainment-styled-game doable?
Post by: Snarky on Mon 23/12/2019 14:15:21
Yes, very easily. Just the same way you play any other custom animation.
Title: Re: Humongous Entertainment-styled-game doable?
Post by: lemniscate on Mon 23/12/2019 14:54:27
Quote from: Snarky on Mon 23/12/2019 14:15:21
Yes, very easily. Just the same way you play any other custom animation.
How can I play a custom animation (especially one which displaces a character) without actually having the character 'walk'? I have to have no walkable areas so that moving freely is not possible.
Title: Re: Humongous Entertainment-styled-game doable?
Post by: Cassiebsg on Mon 23/12/2019 15:30:03
Well, you just hardcode the walk/movement. Either your view/loop has the entire movement included, or you can just use the "anywhere" option when you code the walk/move for the character.
So, no walkable areas are needs.  ;)
Title: Re: Humongous Entertainment-styled-game doable?
Post by: Khris on Mon 23/12/2019 15:51:13
If the animations are all unique, there's no point in moving the player character*.
In theory you can just keep the player positioned at the bottom center of the screen (this will position a screen-sized animation frame exactly inside the viewport), then use basic AGS character animation (https://www.adventuregamestudio.co.uk/manual/ags46.htm#Character.Animate) to play the view loop.

* For a highres game, it's probably better to not use animation frames as big as the screen for every single action; in that case you might want to switch the pivot by placing the character directly on new coordinates right before playing the loop.
Title: Re: Humongous Entertainment-styled-game doable?
Post by: eri0o on Mon 23/12/2019 16:03:35
An Eternity, Reflecting (https://gamejolt.com/games/AER/421186), from Matt Frith, does "the player doesn't walk" well, using AGS.
Title: Re: Humongous Entertainment-styled-game doable?
Post by: Crimson Wizard on Mon 23/12/2019 16:43:47
Quote from: lemniscate on Mon 23/12/2019 14:54:27
How can I play a custom animation (especially one which displaces a character) without actually having the character 'walk'? I have to have no walkable areas so that moving freely is not possible.

I just want to clarify, because there seem to be a misunderstanding. In AGS walking is not happening on its own, even if there are walkable areas. You either explicitly tell character to Walk in script, or call Room.ProcessClick (this is what most templates do), which in turn makes character to walk in case there's no other interaction at these coordinates. Therefore, if you want to avoid "random" walking completely, you may as well just not use Room.ProcessClick, and, for instance, use combination of GetAtScreenXY to get an object under cursor, and then RunInteraction to run command on that object.


Quote from: lemniscate on Mon 23/12/2019 14:54:27
How can I play a custom animation (especially one which displaces a character)

You do it like
Code (ags) Select

cChar.LockView(view_number);
cChar.Animate(loop, delay, RepeatStyle, BlockingStyle, Direction);

(look these functions up in the manual to check what their parameters mean)

Finally you may also move character by changing x and y coordinates by hand even during animation (there's still a question whether it's convenient in your case).