Latest topics
» The good, the bad, and the ugly
Sun Jun 20, 2010 7:45 pm by Admin

» Events are happing
Wed Apr 14, 2010 11:29 pm by Admin

» Progress! . . .
Fri Apr 09, 2010 5:10 pm by Admin

» Soulmen(jordan)
Wed Feb 24, 2010 7:56 pm by soulmen

» Basic starting blocks
Wed Feb 24, 2010 7:41 pm by Admin

» Okay so uni isn’t so demanding as I first thought.
Mon Oct 26, 2009 4:39 pm by Admin

» MP Architecture: Client/Server or Peer-2-Peer?
Sun Oct 04, 2009 2:34 pm by Daemn

» What I am working on at the Moment READ!
Fri Sep 25, 2009 5:15 pm by Admin

» Development Framework available at SourceForge
Tue Sep 22, 2009 9:46 am by Hairein

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Sample class dialog between player, territory, and building to build or upgrade

Go down

Sample class dialog between player, territory, and building to build or upgrade

Post by jsmoore82 on Fri Jul 31, 2009 9:27 am

Player: I want to build Building X in Territory Y.
Territory Y: Building X, what resources do you need?
Building X: Territory, I need "A" amount.
Territory Y: Player, Building X says it needs "A" amount of resources.
Player: Territory Y, I do/do not have that much.
Territory Y: Building X, Player has the resources, what buildings do you need?
Building X: Territory Y, I need a level 3 B, Level 6 K, and Level 1 Z
Territory: Building X, I have/ do not have those buildings, what research do you need?
Building X: Territory Y, I need RESEARCH
Territory Y: Player, Building X says it needs RESEARCH
Player: I do/do not have that
Territory Y: Player has that, please build/upgrade.
*NOTE* questions are query functions, answers to higher level are reports, answers from building are gets.
avatar
jsmoore82
Regular
Regular

Posts : 46
Points : 3327
Reputation : 1
Join date : 2009-07-25
Age : 35
Location : Spokane, WA

View user profile

Back to top Go down

Re: Sample class dialog between player, territory, and building to build or upgrade

Post by Admin on Fri Jul 31, 2009 10:43 am

Right near the top we would also need

Territory Y: Player X what nation do you belong to.
Player X to Territory Y: I belong to Z Nation
Territory Y: to Player X: I will get your building data from "This file.dat"

Admin
Admin
Admin

Posts : 105
Points : 3449
Reputation : 3
Join date : 2009-07-16
Age : 28
Location : Wrexham, United Kingdom

View user profile http://spartanstudioforum.darkbb.com

Back to top Go down

Re: Sample class dialog between player, territory, and building to build or upgrade

Post by jsmoore82 on Fri Jul 31, 2009 4:38 pm

I was thinking on this, what happens when a player conquers another player's territory with buildings already there?
avatar
jsmoore82
Regular
Regular

Posts : 46
Points : 3327
Reputation : 1
Join date : 2009-07-25
Age : 35
Location : Spokane, WA

View user profile

Back to top Go down

Re: Sample class dialog between player, territory, and building to build or upgrade

Post by Admin on Fri Jul 31, 2009 7:14 pm

In the territory arrays ,

the first 2 numbers should represent the territoryID and the current owner, ie
take the following territory,

territory_1 = { 1, 2, 5, 0, 0, . . . . . . .}

1st number - this is territory 1,
2nd number - it belongs to player number 2
3rd number - it has a town hall level of 5

p.s is it posable to convert your MS word docs to be compatable with 2003.

Admin
Admin
Admin

Posts : 105
Points : 3449
Reputation : 3
Join date : 2009-07-16
Age : 28
Location : Wrexham, United Kingdom

View user profile http://spartanstudioforum.darkbb.com

Back to top Go down

Re: Sample class dialog between player, territory, and building to build or upgrade

Post by jsmoore82 on Fri Jul 31, 2009 9:14 pm

oh, sorry about that, yeah, I will just resave as RTF's to make it even easier for every one.
avatar
jsmoore82
Regular
Regular

Posts : 46
Points : 3327
Reputation : 1
Join date : 2009-07-25
Age : 35
Location : Spokane, WA

View user profile

Back to top Go down

Re: Sample class dialog between player, territory, and building to build or upgrade

Post by jsmoore82 on Fri Jul 31, 2009 9:26 pm

Admin wrote:In the territory arrays ,

the first 2 numbers should represent the territoryID and the current owner, ie
take the following territory,

territory_1 = { 1, 2, 5, 0, 0, . . . . . . .}

1st number - this is territory 1,
2nd number - it belongs to player number 2
3rd number - it has a town hall level of 5

p.s is it posable to convert your MS word docs to be compatable with 2003.

However, the question is lets say player one is Sparten and player 2 is Athenian. Player 1 takes over one of player 2's territories that was built by player 2 and cannot be built by player 1, however they are now in player 1's array and occupying slots player one needs for their buildings.

Do we just convert the buildings from player 2 into player 1 building equivelents?

Territories, by themselves should not care who owns them. That should be handled through the player class and game engine. In essene, each class should be able to operate by itself even though it has client classes, (i.e: buildings dont care how anything else above it operates, whereas territories care how buildings work because it needs to interface with them--not the other way around).
avatar
jsmoore82
Regular
Regular

Posts : 46
Points : 3327
Reputation : 1
Join date : 2009-07-25
Age : 35
Location : Spokane, WA

View user profile

Back to top Go down

Re: Sample class dialog between player, territory, and building to build or upgrade

Post by Admin on Fri Jul 31, 2009 9:45 pm

yeah I get what you mean.
Perhaps a check could be done to see if the buildings that exist in the newly taken over territory can be built by the new owner. If not then they are destroyed

Any buildings that can be built by the new owner will automaticly be converted into the new owners equivents.

The Nation checking I mentioned ealier would allow this. The new territory will be transefed over to the other player. No need to do anything for this bit. when we run the nation check it will simply use the buildings data from the new owners nation file.

Admin
Admin
Admin

Posts : 105
Points : 3449
Reputation : 3
Join date : 2009-07-16
Age : 28
Location : Wrexham, United Kingdom

View user profile http://spartanstudioforum.darkbb.com

Back to top Go down

Re: Sample class dialog between player, territory, and building to build or upgrade

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum