Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
cant find a pattern to fit neatly - how to make a large number of monsters?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="stevenmathers, post: 598367"] performance not an issue in this application, but codebase size is. and it would be nice to be able to add new types of abilities and monsters to the system just by adding a few bytes to a table and a function or two to handle them, and then have a factory creatre them at runtime. example of the process I was thinking of: monster object: holds intrinsic characteristics and list of optional abiltiies ability object: enables monster to perform some function, and/or modifies some of its abilities. so there is a dependency there between monster and ability, but how to make it as weak as possible. The vector of change is definately more types of abilities, and more types of monsters. use case 1: monster makes a melee attack: it interrogates each of its abilities: are you my current melee weapon, and if so, what type and degree of damage do you do? use case 2: monster needs to use its SPEED characetristic to determine if it is its turn to act yet. it interogates all its current abilities: here is my current SPEED - modify it if you will. Perhaps there is a better system? [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
cant find a pattern to fit neatly - how to make a large number of monsters?
Top