Archived

This topic is now archived and is closed to further replies.

Shadow_Of_Spawn

going to make adventure, need a lil help..

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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


Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
quote:
Original post by Mman
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.


Eeew!

Sprite scaling (that''s what you''re talking about) is achieved by repeating your pixels by the scaling factor. If you have a 50x50 sprite and you scale up by a factor of 2, then the resulting image is 100x100. The area of this new image is 4 times the original, so for every pixel in the original you''ll have 4 (2 in each direction) in the result. Of course this results in blocky images, especially with large scaling factors, so you should look into anti-aliasing (essentially averaging the colors of adjacent pixels to provide a smoother image; it''s used a lot in drawing arbitrary 2d lines) as well.

Share this post


Link to post
Share on other sites
The objects to be scaled will look to blurry if you scale them up. Alos, drawing those big images with antialiasing will slow the game down, though you can use OpenGL with bilinear filtering and stuff.

But for software, I''d go for making big characters from the beginning. You might loose some tiny pixels, but tell me a similar adventure game to yours that have perfect graphics... Loosing some pixels in high resolution doesn''t affect the visuality very much.

Share this post


Link to post
Share on other sites
Good ideas coelurus. In the scaled sprite-based systems I created (DOS) I drew the characters at 75% or more of the maximum scaling factor (100% if reasonable given memory constraints) so that I usually scaled down (and thus didn''t need to antialias; I got the effect automatically).

Given today''s technology, I''d recommend creating such a system using one of the modern 3D APIs (representing sprites as textured polygons) because the API would automatically handled z-buffering (in a 2D context that means deciding which image is on top of which other image), scaling and several other nice eye candy effects.

Share this post


Link to post
Share on other sites
What do you mean by an _adventure_ game? What kind of game do you want to make? Like monkeys island or day of the tentacle? or like the classic zelda and final fantasy games? or like zelda 64?

Share this post


Link to post
Share on other sites
Why do you want the player to become smaller further away? I don''t think thats necessary. I mean, it''s a adventure game. You don''t want the player to go far away so the user don''t see the player actions in that distance. It''s better to make all actions close to the screen so the user see what''s happening. As I recall, most adventure games (like sierra''s and lucasart''s) don''t have that effect. At least not often.

Share this post


Link to post
Share on other sites
It''s gonna be kinda like day of the tentacle, one of my friends already drew some concept art and it was looking pretty good. And zelda is not an adventure, it''s an rpg.

And maybe it doesn''t need scaling, maybe it does I really dunno, but I would like to know how to do it anyway. Maybe everything will be close up or maybe some scenes will be larger.

S_O_S

Share this post


Link to post
Share on other sites
Zelda is a rpg/adventure game . Anyway, to create a day of the tentacle-like game, I would do the following:

- Create a (big) bitmap with an image of an area.
- Then create another bitmap (or 2d array) to store whether a pixel is walkable or not, the scaling factor, and maybe some other things like if there´s an item to pick up there and an item id (so you can change the cursor in an handshaped one if the cursor is on that pixel for example).

Share this post


Link to post
Share on other sites
quote:
Original post by nickm
day of the tentacle


that is one of my all time favourite games i havent played that in years. must go and buy sometime in the week. thankyou for reminding me of it

Share this post


Link to post
Share on other sites