It appears you have not yet registered with our community. To register please click here.

Origin XT RPG Network Home

Units Program Discussion


Jul 25 2009, 08:47 AM (Post #1)
General
* * * * * * *
Posts: 4,936
Cash: 29,817,299 / 68,857,771
Group: Representative
Joined: 11/26/02 02:31 AM
Okay, here's a slice of direction that I'm taking initiative to... initiate.

What exactly should a "unit" be, programming-wise, as in, what methods, variables, etc, constitute a "unit"?


Here's a basic run down of the Parent class "Unit". Subclasses can and will have to of course be implemented for personality's sake

Constructor

variables:

string unit-sprite
small unit-move-range
small unit-attack-range
small unit-attack-type (might be unnecessary, depending)

methods:

none so far




Are there any other propositions for variables or methods to include into the class?


I was being a pernicious fellow in Civilization, and I found that one of my favorite abilities is called Blitz, which allows a unit to attack multiple times in one turn, at the cost of one movement point per attack. It might be in our interest to implement something like that.
Post Options

 
Jul 25 2009, 06:16 PM (Post #2)
Here for the cute boys ;)
* * * * * * * * *
Posts: 16,850
Cash: 9,336,061 / 95,912
Group: Nobility
Joined: 5/08/05 04:11 AM
I don't even get this. :X
Post Options

Jul 25 2009, 06:45 PM (Post #3)
Commander in Chief
* * * * * * * *
Posts: 5,699
Cash: 2,145,476,571 / 2,147,483,647
Group: Representative
Joined: 12/23/06 04:45 AM
QUOTE (Billy Mays @ Jul 25 2009, 03:47 AM)
Okay, here's a slice of direction that I'm taking initiative to... initiate.

What exactly should a "unit" be, programming-wise, as in, what methods, variables, etc, constitute a "unit"?
Here's a basic run down of the Parent class "Unit". Subclasses can and will have to of course be implemented for personality's sake

Constructor

variables:

string unit-sprite
small unit-move-range
small unit-attack-range
small unit-attack-type  (might be unnecessary, depending)

methods:

none so far
Are there any other propositions for variables or methods to include into the class?
I was being a pernicious fellow in Civilization, and I found that one of my favorite abilities is called Blitz, which allows a unit to attack multiple times in one turn, at the cost of one movement point per attack. It might be in our interest to implement something like that.
*



Ultimately, I think we can have a final product with a lot more than that, but for now, I think the first 3 will suffice. As far as attack type, I think all it really needs to be is attack power. I imagine it would work something like this: say your swordsman is against a marine, the swordsman would have an attack power of, say, 5, and the marine would have 25. Then we pick a random number between 0 and 29, where if it's between 0 and 4, the swordsman strikes, etc. Also, each unit will need a max health and current health, if we're going to be that detailed about it. Plus, they'll need coordinates, of course. I think that will be enough.

What are you getting at with methods? Is that a programming term?
Post Options

Jul 25 2009, 09:52 PM (Post #4)
General
* * * * * * *
Posts: 4,936
Cash: 29,817,299 / 68,857,771
Group: Representative
Joined: 11/26/02 02:31 AM
method is the b*tch-term for function, sorry.
Post Options