going to make adventure, need a lil help..

Started by
20 comments, last by Shadow_Of_Spawn 22 years, 5 months ago
Me and my friends are gonna make an adventure, we are still working on the design doc, but I was wondering how to best approach some things... We already decided we want some character to walk around in a 2D environment. I only want him to walk on certain sections, for example there's a lake on the screen and I only want him to be able to walk around it. Also I want him to be smaller when further away. The way I figured I could accomplish this is by dividing the screen into small sections. Every section would have some boolean value attachted to it to decide if the surface is walkable. Also every section would have an integer value to decide on scaling. Is this a good way to do it, or is there a better way to accomplish it that I have overlooked? Any help would be appreciated, S_O_S Edited by - Shadow_Of_Spawn on October 17, 2001 10:47:17 AM
Advertisement
First of all, I think you''d best be making a tile-based game. I think that''s what you meant by ''dividing the screen into sections''. Every tile can then be given certain attributes, such as walkability. You can then check your character''s position on the map with the tile he''s trying to move onto, and then decide whether the move is legal.

As for the scaling thing, I think you''ll get some pretty weird effects if you try to scale depending on the tile you''re walking on. The motion gets kinda quirky. Maybe you can give some more details?

Jappie
----------------------------- JappieBabJap Productions"There's no such things as bugs; they're just unintentional extra features"
Well the thing is every different scene could have a different perspective, so I can''t make a general scaling based on the Y coordinate of the player. So instead I''d give every tile a value that gets higher(lower?) depending on the height of the tile. When the player moves to a heigher tile, I''d make him smaller. Of course neighboring tiles won''t differ that much in the scalenumber so I''d be making relatively small adjustments each time.

I don''t know yet if I''ll attach each value to a tile or just make a grid represented by a matrix or something.

S_O_S
assuming that the view is from above, when the character went onto a higher tile, he should be bigger, not smaller (he is closer to the camera)...

--- krez (krezisback@aol.com)
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
I don''t know if this helps at all, but I have a found that using arrays to hold map data is very effective (though I too am a newbie). The bool thing you were talking about is sort of what I do as well, good to know someone at least had the same idea, hehe.

About the smaller / larger thing... I don''t really think it''s necessary. The reason being is unless you did a REALLY good job, it might be hard to understand that when the character goes up, he gets larger (for the player). I think it''s easy enough to portray height with just normal tiles anyway. Take the classic final fantasy games, for example.
Peon
quote:Original post by krez
assuming that the view is from above, when the character went onto a higher tile, he should be bigger, not smaller (he is closer to the camera)...


Umm no the view is from the side, like in old lucasarts adventures. so when you get higher that would be further away.

S_O_S


what you mean with higher on the screen is actualy a lower y value, so the higher y value the closer your character will be to the camera.(that is if you use tile based graphic)
Romance is dead,it was bougth by Disney and Hallmark and sold to the public in small portions.
I made my own adventure game a couple of years ago. Some ideas from my game might help:

Walkabout:
I was young and perhaps not very "wise" at that time, but I still think the following is a good idea. I created an image covering the entire lower part of the screen. It''s memory-wasting, but very accurate. You could walk on white cells, but not black. I didn''t cover the upper part, since my game didn''t support "kleggy-shoes", allowing you to walk on ceilings...

Distance:
This is the neat part using the above masking. If the depth of the mask is 8 bits for every cell, you can tell what distance the character will be on *AT EVERY PIXEL*! Say 0 is non-walkable. If it isn''t 0, you use the value for distance (the following is a simple 3D projection):

SCALE = FOCUS * SIZE / MASK[ADDRESS];

SCALE : scale factor on sprite
FOCUS : some value to "flatten out" the projection
SIZE : sprite size
MASK[ADDRESS] : the current value;

Then use SCALE in some kind of a sprite-drawing routine! Note that a simple char-array will be enough (you''ve got 1..255 to use for distance!).

This depth-map can be created easily. Use a nice drawing program and make plain areas, gradients etc with the tools you''ve got with ONLY ONE color (say red). Then convert it into 8-bits grey-shade and save it. That''s it!

Hope this gave you some ideas...
It sounds to me like you are trying to make a game similar to the old KingsQuest/SpaceQuest games. Not sure how you would do it (im a noob too) but I thought this would help clarify the picture in the minds of others.
if you use an image box to store your character in, then you could use the stretch option to make him bigger or smaller depending on where he is. Hope this helps.

This topic is closed to new replies.

Advertisement