Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Navigating Isometric Rooms-HELP!!!

Author
Message
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 4th Nov 2002 04:01
I'm writing a game that uses Isometric views like in Baldur's Gate, and Diablo.

My gorgeous 2D animated heroine can walk around, but getting her to avoid objects in the rooms is eluding me.

Part of the problem is that there's only one sprite in the room that she needs to walk around, but she must also stay in the room, avoid things that are next to the walls, etc.

If the rooms were done in a view other than Isometric, it wouldn't be a problem, but all of the angles have me stumped.

Is or are there formula(s) to handle this?
Any ideas?
Anyone?
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 4th Nov 2002 08:36
hmm... well Baldurs gate and diablo are technically 3D, and how i'd sort this out is actually give everyone a collision box for the 3D hidden world
that way collision is detected in 3D making it much simpler and if all the objects are hidden shouldn't affect speed much

Anata aru kowagaru no watashi!
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 4th Nov 2002 15:29
Well, I was considering using an old 2D trick from times past, but it would require modifying every page.

Basically a 2D version of what you suggested, hence easier to do, and less memory intensive.

And that is to make a duplicate page of the viewing area, but in black and white. Black being where she can't go, white where she can. And reading that page pixel by pixel will tell where she can go.

And since segments of the room screens are black, I can even color shift pixels by one and do it on-screen without affecting memory usage to much.

The problem with that method is that in outdoor scenes it becomes more complicated, and very memory intensive.
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 4th Nov 2002 21:51
well i'm not sure... i mean if you're using full 2D, then it might be an idea to have an array map - so you grid up where she can and can't go and just read the array positions, the array will have either a 0 or 1 to say if she can or can't - could even setup a function to do it like CheckCollision(x,y) or something. might require a little pregame compiler to setup these areas so basically what you've suggesting but have the computer figure this all out prior - then its a simple case of array reading, when you go into a new area undim the array and load the next one
peice 'o pie

Anata aru kowagaru no watashi!
Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 5th Nov 2002 02:22
I know you probably don't want to pay out, but this book might be useful?

http://www.amazon.com/exec/obidos/ASIN/0761530894/ref%3Dcm%5Fbg%5Fd/102-5327736-0176960

It's also working in 3D, but you never know

Your idea sounds okay if the draw order is correct - for example if you had a tree you wanted her to walk around, you wouldn't want the whole tree to be "black" and a no-go zone, you'd just want the "trunk" part of it to be like that. Otherwise she'd have to avoid the entire tree and would never look like she's gone behind it. Probably better to use a grid-based system only use a diamond shape and not a square?

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 5th Nov 2002 04:00
When it comes to trees, I don't even do the trunk, or branches.
I usually use a circle which is the diameter of the trunk, plus the width of the character.
This allows the character to get in close, but leaves a comfortable looking clearance.
As to the draw order, I usually set the Character in front, until the her lower edge is higher on the screen than the lower edge of the tree.
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 5th Nov 2002 09:29
yeah diamonds are probably better, i have a problem thinking outside of 3D - so basically i was thinking of a seperate plane where everything is so you have like and overhead in memory zelda style and then you could translate that onto the actual scene.
Or just a simple precompile, or use Billboard Planes in a 3D World

I dunno upto you really, but hopefully have a good few ideas now.

Anata aru kowagaru no watashi!
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 6th Nov 2002 18:52
Rich,
I checked out the book.
A bit pricey, but packed with a lot of info.
The reviews, however, made it sound like it was a waste of money, but thanx anyway.


I've redone the graphics of the rooms.
I rotated the room 45', basically squaring them up, which makes programing them easier.
Ciao!

Login to post a reply

Server time is: 2024-04-26 18:25:10
Your offset time is: 2024-04-26 18:25:10