Archived

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

RPG tech questions (not mmorpg!)

This topic is 4946 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hiya Everyone! hehe, Im not a newb asking for someone to code me a mmorpg, lol. However, I am working on a limited multiplayer/single player rpg right now in the style of diablo 2 or war craft. I have some simple questions for you guys. First though, let me say that this is really my first large game project, however, please dont say "Do not make it 3D". I making this project because I feel I am ready. Anyway, here they are: 1) The game world... The base of the world will be a terrain and then for towns, my friend will model buildings and such. My question is, should the terrain and static models be stored within the same tree? 2) There will be a free camera view but limited to a certain angle, I want the terrain to appear relativley large, however, I do not want to use height maps larger then 1024x1024. In the past, I simply scaled the terrain up to 4x, while this did the trick, it played havock with terrain collision and made it appear that you were moving very slowly unless you were very close to the ground which then caused textures to look crappy. I figured that the solution should be to simply scale the objects down instead... im sure some of you have faced the same dilema, what did you do? 3) Inventory, what would work better: adding the pointer to an item to a list and settings it''s parent your character... or when you hit the item, it simply stored an id/rtti flag to your inventory list and then when you pull it, it gets created on the fly. What are your opinions? 4) Fighting...
psuedo:

if (enimy->position < x)
    state=COMBAT;
...

if (close enough to enimy)
{
    useweapon(current);
    enimy->health -= current.hitamount;
}
What im asking is, should the two warriors cause each other damage when ever they use there weapon, or should the weapons be more directly responcible. (ie. if a hit test between the weapon and the opposing warrior resturns true, then the damage will be caused, or when the warrior swings thier weapon...). Alrighty, one last question. Is it common for a game to support both skeletal and keyframe animation, ie. a gun uses keyframe since its animation is not to complex? Damn, that brings up an entire new issue... are weapons and such normally animated for each character? Thanks in advance guys. -new user name comming soon... (''no one'' sucks )

Share this post


Link to post
Share on other sites
What makes you feel ready anyway? =p

1) If they are really static and don't change at all then storing all of them in a tree works well. Why not? However you have to consider what uses you have for you tree and whether it's important to make distinctions between buildings and terrain.

3) An inventory would ideally be implemented as list of item IDs. This would suffice if your items do not need to know who it's owner is. Otherwise, it would also be trivial for each item to store an ID of its owner.

4) That is something you have to tackle in your design. To create a robust system, surely the Weapon class will know about how to inflict damage and this should be its responsibility. But if you want to keep things simple, then your pseudocode could be used. But I wouldn't do it that way.

[edited by - Darkor on May 31, 2004 2:26:36 PM]

Share this post


Link to post
Share on other sites
I know how to tile the textures... never mind with that one, im sure I can figure that one out later. However, ive seen demos (like far cry) where they paint textures on the terrain like you would in photoshop, I haven''t been able to find anything on that.

Darkor, about #3, hehe, yah that was only a really rough example just to get my point accross

Alrighty, thanks.

Share this post


Link to post
Share on other sites
quote:
Original post by no one

2) There will be a free camera view but limited to a certain angle, I want the terrain to appear relativley large, however, I do not want to use height maps larger then 1024x1024. In the past, I simply scaled the terrain up to 4x, while this did the trick, it played havock with terrain collision and made it appear that you were moving very slowly unless you were very close to the ground which then caused textures to look crappy. I figured that the solution should be to simply scale the objects down instead... im sure some of you have faced the same dilema, what did you do?



Personally I use several 128x128 heightmaps and make meshes out of them, and a textfile that defines which one goes where. Although I need to write an editor that takes adjacent files into account, right now it needs massive manual correction. But this allows you to draw only what is close and you could even free the heightmaps or meshes that are no longer used from memory.

Regarding crappy looking terrains...

You can use a detail texture. Say your units are 1.0=1 meter. Then you can draw a grass or rock texture using a 256x256 color texture on a 16x16 or 32x32 patch using texture coordinates that range from 0 to 1. This will make it look very blurred of course. But if you use a second texture, a greyscale one filled with noise and use a second pair of texture coordinates that range from 0 to 16 (causing it to wrap) and blend that, it'll look great.

You'll have to experiment a bit with the blend mode (add or modulate) to see what looks the best.

[edited by - Fidelio66 on June 1, 2004 6:25:39 AM]

Share this post


Link to post
Share on other sites