Game authors and players, please read this thread!

Author Topic: Walking behind hills  (Read 2714 times)  Share 

stuh505

  • Mittens Elite Idiot
Walking behind hills
« on: 27 May 2004, 23:31 »
As it stands I see no way to have a walkable area that accurately represents walking over a hill parallel to the viewing direction.

You can have an abrupt change in scaling, as they go from being on the front side to the far side, but still when they walk to the top of the hill then its a continuous walkable area and all of a sudden they are way far away.

So I have 2 ideas for simple ways to change this.

1) Allow walkable areas to overlap each other, and give them a layering order.  By default it is assumed they are on the top layer.  Make a new tool, the "seam" tool which allows you to join walkable areas.  When the character walks over a seam, the area they are on will switch to the area it was seemed to.  This would allow for characters (in 2d) to appear to be realistically traversing mountanous or other odd terrain.

Here is a screenshot to demonstrate what I mean:



does this make sense?  I think it does...

the second Idea I don't have time to explain because i have to go on a date but ill explain later
« Last Edit: 11 Sep 2005, 18:07 by strazer »

TerranRich

  • The Mystery Begins WHENEVER, Okay? ;)
    • I can help with characters
    •  
    • I can help with proof reading
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
  • TerranRich worked on a game that was nominated for an AGS Award!
Re: Idea for walkable areas
« Reply #1 on: 28 May 2004, 01:36 »
This is complicated, BUT the only way I've seen so far to actually implement behind-hill walkable areas. This might just work. I can already picture the hundreds of newbie questions regarding this feature, even though it will be well documented. :P

Re: Idea for walkable areas
« Reply #2 on: 28 May 2004, 02:36 »
Could a workaround like described in this thread be used for this?

Edit: Hm, I misunderstood obviously. I thought the problem was the walkbehinds.
« Last Edit: 26 Aug 2005, 00:08 by strazer »

Iceboty V7000a

  • Local Moderator
  • * KILL* * KILL * * KILL *
    • Lifetime Achievement Award Winner
    •  
Re: Idea for walkable areas
« Reply #3 on: 28 May 2004, 03:01 »
The problem was that if the areas can overlap themselves large change would be made to the engine, which is not a trivial job, and it doesn't seem to be that useful.

I suggest you may try script over the problem, using functions like the one strazer mentioned.

Sometimes it's good (and maybe essential) to add some new features to the engine but what I recommend is that, as there's actually no end to adding new stuffs, people should learn more about the engine first - what it can and cannot do, and they try to work with the limits. Having limits in an engine doesn't mean it would restrict or prohibit creativity or its usefulness, sometimes you just need to change your ideas a bit and the engine can handle it perfectly already, and try to ask for new features only if it's REALLY needed and there's no easy way to do it at the moment.

Rui 'Trovatore' Pires

  • Lunge da lei per me non v'ha diletto!
    • I can help with AGS tutoring
    •  
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Re: Idea for walkable areas
« Reply #4 on: 28 May 2004, 06:19 »
I'm probably misunderstanding something, but what about using continuos scaling? Won't that solve it?
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Mr Jake

  • Mittens Vassal
    • I can help with web design
    •  
Re: Idea for walkable areas
« Reply #5 on: 28 May 2004, 06:40 »
yes, but he wants his character to disappear behind the hills as he walks over them, but he cant place a walkable area there because its in 2d.

stuh505

  • Mittens Elite Idiot
Re: Idea for walkable areas
« Reply #6 on: 28 May 2004, 07:45 »
hey, its just an idea.

but, there are 2 hurtles redrum:

1 - making the character appear before the hill, and then behind the hill, without crossing a baseline...

2 - making the character be forced to walk backwards or stand still in order to go forwards

continuous scaling would also need to be in effect...but it is not a hurtle because it already exists.

I neglected to mention in my previous example that you would also need to define and link a walk-behind area to the orange/purple walkable areas.

Strazer: I read the thread and downloaded your file but I don't know how to open this type of file (AGT?) and the original posters files are no logner available

Re: Idea for walkable areas
« Reply #7 on: 28 May 2004, 09:22 »
Just put the .agt file in your AGS program directory. Then, a new template is available when you start a new game.

I still don't know if it is what you're looking for, but here's a demo of the first hill I've made.
Took me some time to get the walkable areas just right and place the regions correctly so the pathfinder works as expected.

Quote
original posters files are no logner available

I can still access Scorpiorus's files in that thread. Strange.

Edit: Updated URL
« Last Edit: 02 Jun 2004, 10:29 by strazer »

LostTrav

  • Guest
Re: Idea for walkable areas
« Reply #8 on: 28 May 2004, 21:51 »
I like the idea, but when the walk behind the hill only parts of the body can show

Walkaround

Objects and regions. The objects are crops of the hill. When a player steps on a region next to a sliver of hill the sliver is turned on so that the chars head etc... is hiden. Then a last sliver when he is completely behind to scale. You can use global ints to determine which way he is going as to activate certain slivers

stuh505

  • Mittens Elite Idiot
Re: Idea for walkable areas
« Reply #9 on: 31 May 2004, 18:06 »
Here is an attempt I made to script the going-down half of the problem (not going to do the going-back up part until I like the going down part).  It really looks bad, because when going down the hill, the character has to be sliding irregularly...I can't use the walk command because it would make the character face forward (since he is walking down on the screen) the only way I can think of to get around this would be to make a new VIEW showing with a copy of the characters "walk down" loop, and switch to that view when walking down, and then switch back...but that is pretty funky....how did you do it Strazer?

Quote
function WalkDownHill(int hill_object, int hill_top_x, int hill_top_y, int hill_bottom_x, int hill_bottom_y, int hill_end_x, int hill_end_y){
  //PRE: hill_object is OFF, function called when walk over region at top of hill, hill_object is duplicate image of top of hill
  if (ObjectOff(hill_object)){ //to eliminate infinite loop when walk over region again
    //go to top of hill first
    MoveCharacterBlocking(GetPlayerCharacter(),hill_top_x,hill_top_y,1);
    ObjectOn(hill_object);
   
    //show back
    FaceLocation(GetPlayerCharacter(),character[GetPlayerCharacter()].x,character[GetPlayerCharacter()].y-50);
   
    //"walk" behind hill
    while(character[GetPlayerCharacter()].y != hill_bottom_y){
        character[GetPlayerCharacter()].y++;
        Wait(1);
    }
 
    //walk out of hill range
    MoveCharacterBlocking(GetPlayerCharacter(),hill_end_x,hill_end_y,1);
    ObjectOff(hill_object);
  }
}

Re: Idea for walkable areas
« Reply #10 on: 31 May 2004, 18:22 »
Quote
it would make the character face forward (since he is walking down on the screen)

Heh, good point. I didn't even notice that.
Your view idea sounds good to me.

EDIT:

I've updated the demo with this idea. Requires AGS v2.62.
« Last Edit: 15 Nov 2004, 21:25 by strazer »

Ali

  • What will become of the baron?
  • Ali worked on a game that was nominated for an AGS Award!Ali worked on a game that won an AGS Award!
Walking Behind and Over Hills - a simple solution
« Reply #11 on: 20 Feb 2006, 10:02 »
I've come up with a simple means of making a character walk over hills which I haven't read about in threads like this.

It doesn't requre objects or anything like that. You just enable and disable walk-behinds and change the ego's main view to one where up and down are inverted. Here's a zipped template:

http://www.2dadventure.com/ags/Walk_Behind_Hil.zip

It's a bit awkward at the moment because of the shape of my walkable areas but with tweaking it could work well. It also has the advantage that you don't need to have a cutsequence to go over the crest of the hill.

I'm sorry if this has been brought up before, let me know what you think.

-Al.

EDIT: I didn't realise Strazer's solution used the view-inverting idea. Never mind!
« Last Edit: 06 Mar 2006, 11:39 by strazer »

TheMagician

    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Re: Walking Behind and Over Hills - a simple solution
« Reply #12 on: 20 Feb 2006, 11:04 »
Hi Ali,

just tested your template. Works fine for me!
I just don't get the part
Quote
change the ego's main view to one where up and down are inverted
Why would you need that?

Btw: that's a really lovely character you got there.  :D

Ali

  • What will become of the baron?
  • Ali worked on a game that was nominated for an AGS Award!Ali worked on a game that won an AGS Award!
Re: Walking Behind and Over Hills - a simple solution
« Reply #13 on: 20 Feb 2006, 12:35 »
If you get rid of the 'set character view' numbers for all the walkable areas you'll see that Nelly would walk down the hill backwards.

The inverted-view-swapping makes it possible for a character to walk down the screen playing their up loop so it looks like they're walking away from the camera down the slope.

Btw: Thanks!