Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Structure of objects in isoland


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 17 December 1999 - 03:56 AM

I'm currently in the process of designing a CRPG. Not in code phase yet, mostly design.

I prefer to know what I'm going to do before I actually do it. ;-)

What I would like to do is to give all objects (trees, tables, walls) different physical characteristics.
Since they got it in real life I thought it would be neat to have it in the game as well.

A stone wall acts differently to a explosion than a paper wall.

Looking at an isometric tile there is a possibility of adding at least five objects on that tile. As far as I can see anyway.

I could make loads of maps to sort out all the objects but I thought that there must some better way.

Any ideas on how to build something like that?


Sponsor:

#2 TANSTAAFL   Moderators   -  Reputation: 1152

Like
Likes
Like

Posted 17 December 1999 - 03:56 AM

the use of inheritance would be well applied here. the main issue is developing an interface that provides all of the functionality you need while remaining generic enough to encompass all of the descendent classes. also, each class will have to make good use of encapsulation, since your map only knows that there is a CThingie on the tile, not that it is a CStoneWall, or CRock, or CTree. You may find that containing a number of internal variables, such as Durability, can accomplish keeping track of things like how decimated a stone wall has become, or how destroyed a tree is.

you may also have to come up with a base class for mobile game objects like catapult stones, arrows, or whatever, so that you can generically give an InteractWith() member function to your immobile object's base class.

so, anyway, there's MY thought.

***OOP- THE WAY TO BE***





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS