yet another walk behind area thread (sorry!)

Started by amateurhour, Mon 08/10/2012 22:37:14

Previous topic - Next topic

amateurhour

Alright, I'm having an issue with my room.

So here's the room, and a character in there for reference.



I set a walk behind area in the right side room and that works fine. I set the baseline to the bottom of the right side of the door frame and it's perfect.

The problem is when the character walks down to go to the coffee table, as expected, he disappears behind the walk behind area.

I've searched the forums for walk behind threads, checked the tutorial, and watched the AGS videos on youtube and unless I missed it I can't figure out how to fix this.

Any help would be appreciated.

Thanks!
Co-Founder of Pink Pineapple Ink Pink Pineapple Ink
Creator of the online comic Trouble Ticket Trouble Ticket

Khris

You're saying that although the character's feet are at a greater Y coordinate than the walk behind's baseline, he's still disappearing behind it?

For debugging purposes, add this to the room script:
Code: ags
void on_key_press(eKeyCode k) {
    if (k == eKeySpace) Display("character baseline Y: %d", player.Baseline);
  }

What does it say when you press space while the character is down at the coffee table?

Also, just to be sure, check that you didn't accidentally set the base line of another walk behind.

amateurhour

Thanks for the quick response, I'll try the script when I get home and let you know.

To answer your first question, yes (I think) The baseline to the walk behind is just a bit above the plug outlet to the left of the coffee table and below the lightswitch (let's say it's 260) so I set that, and when the character walks through the right door, he vanishes, as he is supposed to.

When he exits the room, walks down slightly, and to the right (to the coffee table) his upper half vanishes behind the walk behind area, even though his feet are below the baseline I set previously.

I'll let you know what the debug shows later.
Co-Founder of Pink Pineapple Ink Pink Pineapple Ink
Creator of the online comic Trouble Ticket Trouble Ticket

amateurhour

#3
Fixed the issue, I was manually entering the baseline rather than just clicking and dragging it and I accidentally entered the x cords instead of the y cords... I'm a moron. Thanks though.

I've got a follow up question though, and it's a little more complex. I'm playing with the 9 verb template (I'm not trying to bite off more than I can chew, this is simply just to play with/tech demo kind of thing, just for one room)

So I loaded the 9 verb, imported my room and characters, and set the walkable area, but the main character only covers about half of it. Whenever he gets about halfway down the room (same room above) he just stops.

The rooms both have the default room script from the template. I tried just deleting it and it caused a game crash.

Again, not trying to perfect 9 verb, just trying to learn it more : )

Thanks!
Co-Founder of Pink Pineapple Ink Pink Pineapple Ink
Creator of the online comic Trouble Ticket Trouble Ticket

Khris

Just to be clear, the 9-verb GUI is covering a good deal of the bottom of the screen, and you thought the room background would scroll up to show the part hidden behind it?
Usually, backgrounds are drawn so that only the top 144 pixels are used for walking. If you expected the above behavior, it doesn't work with your background because both the background and the screen are 200 pixels high and thus AGS is unable to scroll it even if it wanted to. GUIs are simply displayed on top of rooms, they don't decrease the active area like that.

It's possible to cheat though; just add 56 empty rows of pixels to the bottom your background.

Regarding the crash: a room script handles room events, emptying it will of course screw things up, and not help a bit with changing the internal workings of AGS.

amateurhour

Khris,

Thanks for the info. I knew that with 9 verb I needed to expand the room. I did that already. I've got a 320x200, 320x240, 640x400, and a 640x480 version of my room in both regular and 9 verb flavors already, as well as characters that fit both sizes. The room I have in 9 verb works fine, the bottom of the room is set to the top of the gui, but for some reason the character will only walk about halfway down the room (about level with the wall socket) in 9 verb though, and I was wondering if it was due to the default 9 verb room scripts.     
Co-Founder of Pink Pineapple Ink Pink Pineapple Ink
Creator of the online comic Trouble Ticket Trouble Ticket

Khris

Could you post a screenshot that demonstrates the problem?

amateurhour

Indeed I can.

Here's the room editor and the walkable areas shown



And here's the actual gameplay under a run, where the character's feet are is the lowest he will go.



I've done nothing to the game scripts themselves. They're the default 9 verb template scripts (hence the cup in the bg)
Co-Founder of Pink Pineapple Ink Pink Pineapple Ink
Creator of the online comic Trouble Ticket Trouble Ticket

Khris

It's pretty obvious with the Go to hovering there. :D

The action line isn't part of the same gui as the buttons. Don't ask why, this setup is years old.
Find the gui called gAction in the editor and set it's background color to black. Upon testing the game, you'll immediately notice that you've been clicking on the GUI the entire time, not the room and its walkable area.
Back in the editor, move the GUI down accordingly. Just add 40 to it's current Top value.

amateurhour

Thanks for the help.

Regarding the backgrounds, is it easier to just add 56 or 112 empty pixels to my 320x200 and 640x400 backgrounds, and THEN change the game style to 320x240 or 640x480 and adjust accordingly, or is it easier to build the game with 144 or 288 walkable pixels from the start?

Can I just take my 320x200, add 56 empty pixels to the bottom, and then load that into a 320x200 9 verb?

Sorry to bug you, thanks for the help so far.
Co-Founder of Pink Pineapple Ink Pink Pineapple Ink
Creator of the online comic Trouble Ticket Trouble Ticket

Khris

If you add 56 rows of pixels to a 320x200 background in a 320x200 9verb game, the room will scroll up and down, showing the entire original 200 pixels above the GUI (but only 144 at a time).
IMO this will look pretty weird, and I think that the LucasArts games that used the 9verb GUI only had horizontally scrolling rooms.

I'm still not sure what exactly you're trying to do and why you're messing around with 4 different resolution settings.

Personally, I'd do one of two things:
a) decide on whether to use 320x200 or 320x240, then only use the top 144 / 184 pixels of the background so the room doesn't scroll vertically.
b) ditch the 9verb template or make it fadein or whatever, so that the entire background is shown for the most part of the game.
I'm nostalgic about it, too, but I greatly prefer a two button interface.

amateurhour

The resolution settings were just an exercise in futility, I realized that with the nearest neighbor setup it's not really necessary to make different sized backgrounds.

The 9 Verb was just something I wanted to play with, but I realize now that won't happen without me re-drawing my background images to have a smaller walkable area.

Honestly this is my first game, and a demo at that, so I think I'll just take the advice and stick with the basic game template until I know what I'm doing a little better.

Thanks for the advice Khris. I appreciate it.

This can be closed.
Co-Founder of Pink Pineapple Ink Pink Pineapple Ink
Creator of the online comic Trouble Ticket Trouble Ticket

SMF spam blocked by CleanTalk