New Dawn
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Latest topics
» The good, the bad, and the ugly
Buildings Design EmptySun Jun 20, 2010 7:45 pm by Admin

» Events are happing
Buildings Design EmptyWed Apr 14, 2010 11:29 pm by Admin

» Progress! . . .
Buildings Design EmptyFri Apr 09, 2010 5:10 pm by Admin

» Soulmen(jordan)
Buildings Design EmptyWed Feb 24, 2010 7:56 pm by soulmen

» Basic starting blocks
Buildings Design EmptyWed Feb 24, 2010 7:41 pm by Admin

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

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

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

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

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Buildings Design

3 posters

Go down

Buildings Design Empty Buildings Design

Post by Admin Mon Jul 27, 2009 11:46 am

Here we can discuss what the buildings in our game shall do. I've done a brief outline of what I belive the buildings data should include

Name,
Building_Group: What group does the building belong to, ie all stables will have a Building Group number of 5 for example whilst all the wood cutter levels will have a Building Group number of 7.

Level: how advanced or built up that particualr industry is withing the city.
Wood Cost
Stone Cost
Metal Cost
Gold Cost


Graphics Icon: when building selected
Graphics_Overview: when on sector overviews.
Graphics_Ingame: ingame Combat simulation

Function: What dose the building do. Does it extract resources, train troops or conduct research.
amount_income: This will be an positive number. for example a unit of knights may cost 60 build_points say our building had an amount_income score of 12 this would mean the unit of Knights would take 5 turns to complete.

build_points: How may build points required for construction, build points for buildings will be added according to the Town Hall's level. The town hall in effect "Trains" buildings

Admin
Admin
Admin

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

https://spartanstudioforum.darkbb.com

Back to top Go down

Buildings Design Empty Re: Buildings Design

Post by Admin Mon Jul 27, 2009 11:49 am

48
Name Group Lvl Wood Stone Metal Gold Function Amount Build pts Requ
Stables 7 1 200 100 50 25 'T' +12 80 level 3 Town Hall, level 2 Barracks
Stables 7 1 240 18085 55 'T' +15 120



Territories will have to store the data of the buildings the have in them like this Howeer this could be a vector? as different maps will have a different amount of territories.

Code:
const int BUILDING_TOTAL = 20; // We have 20 different building groups.
const int NUMBER_OF_TERRITORIES =  12; //
// we'll probably read this into an array from an external file so we would not have to write
//data for all sectors even if they are not being used

Sector_Array[NUMBER_OF_TERRITORIES][BUILDINGS_TOTAL + 2] = {
// The 1st number is the sector_number, whilst the second number is the player who owns
// the land
1, 1
2, 1
3, 1
4, 1
5, 2
6, 2
7, 2
8, 2
9, 2
10, 3
11, 3
12, 3
 
say we wanted to know the level of our stables in sector one, as the stables is group 7 this would place the stables data in column 9 or;

Sector_array[0][8];

Admin
Admin
Admin

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

https://spartanstudioforum.darkbb.com

Back to top Go down

Buildings Design Empty Re: Buildings Design

Post by jsmoore82 Mon Jul 27, 2009 4:40 pm

Arrays would make things a lot easier, plus they are a lot faster then say linked lists as far as memory access anddata retrieval.

May I make the following suggestions on some "rules"

If each territory is allowed only one of each building type then we can just "turn on" the building when it comes into existance.

If instead of a 2-d array, for territory and building list, possibly using a 3-d array where the third dimension is the level data for the buildings
jsmoore82
jsmoore82
Regular
Regular

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

Back to top Go down

Buildings Design Empty Re: Buildings Design

Post by Admin Mon Jul 27, 2009 8:21 pm

thats what I initaly thought but if we put 0 as the level then it dosn't "exist" but to build it we just have to increase this number by 1 to bring it into existance. This means we can do it with a 2d array. rather than a 3d array which will save a hell of a lot of space

Not so sure about the vector idea was what someone else said. I myself think a 2d array would better

Admin
Admin
Admin

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

https://spartanstudioforum.darkbb.com

Back to top Go down

Buildings Design Empty Re: Buildings Design

Post by jsmoore82 Mon Jul 27, 2009 8:41 pm

That does simplify it, basically instead of keeping track of the building classes themselves we model it with int's and then just care about level. The territory itself does not care what the building does, that's the building's job, it just wants to keep track of the level.
jsmoore82
jsmoore82
Regular
Regular

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

Back to top Go down

Buildings Design Empty Re: Buildings Design

Post by Admin Tue Jul 28, 2009 12:02 am

Excelent. Then we should make a quick list of all the buildings we wish to include so we don't miss anything when making the classes/ functions etc.

Admin
Admin
Admin

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

https://spartanstudioforum.darkbb.com

Back to top Go down

Buildings Design Empty RE:

Post by Zeppo Marks Tue Jul 28, 2009 12:35 am

So when it comes to the buildings are we doing things like Warcraft and building on the battle field or building in the strategy map like Total War?

Zeppo Marks
Regular
Regular

Posts : 21
Points : 5428
Reputation : 4
Join date : 2009-07-26

Back to top Go down

Buildings Design Empty Re: Buildings Design

Post by Admin Tue Jul 28, 2009 12:47 am

building in the strategy map as in Total War

Admin
Admin
Admin

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

https://spartanstudioforum.darkbb.com

Back to top Go down

Buildings Design Empty Re: Buildings Design

Post by jsmoore82 Tue Jul 28, 2009 12:50 am

I am not sure, I am almost seeing it as a hybrid of the two where on the strategy map you see the troops and then once you actually look into the territory then you see the buildings.

I am thinking, however, that beside the base building class that I am working on, perhaps we should table coding until we actually get more of a design and "Game Rules" fleshed out so that every one is on the same page. We have something great here, don't want to kill it because we rushed in.

What's everyone's opinion on that ?
jsmoore82
jsmoore82
Regular
Regular

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

Back to top Go down

Buildings Design Empty Re: Buildings Design

Post by jsmoore82 Tue Jul 28, 2009 12:51 am

sorry posted at the same time as admin...guess the first part is answered.
jsmoore82
jsmoore82
Regular
Regular

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

Back to top Go down

Buildings Design Empty Re: Buildings Design

Post by Admin Tue Jul 28, 2009 7:26 am

I agree we need to do more planing still before be go in and start coding all guns blazing

Admin
Admin
Admin

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

https://spartanstudioforum.darkbb.com

Back to top Go down

Buildings Design Empty Re: Buildings Design

Post by jsmoore82 Tue Jul 28, 2009 9:38 pm

Buildings start at level 0: at which they don't physically exist

Buildings can only upgrade if the player
--has enough resources
--has the pre-required buildings

buildings are labled as groups
-i.e. all barracks fall under group 6
-- 3-0: base barracks
-- 3-1: Level one barrack
-- 3-2: Level two barrack
-- 3-n: Level N barrack

Building group 0 is town hall:
-all buildings need to have a town hall(implied)
-town halls "train" buildings
-town halls require no buildings to build, but do require resources.
-the first main territory is a "gimme" town hall (player starts the game with one built)
-town hall generates resources at a constant low rate (ie. 10wood, 10stone, 10metal, 10 gold/per turn)

Each territory is like its own city-state
-it can only have one of each building
-a -1 value at a buildings index means that territory cannot build that type of building

There are four types of resources
Group 1: Stone (Rock Quaries)
Group 2: Wood (saw mills)
Group 3: Metal (appropriate ore mine)
Group 4: Gold (Gold mine)

Each territory has a finite level of each raw resource, different buildings might generate resources as well.
jsmoore82
jsmoore82
Regular
Regular

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

Back to top Go down

Buildings Design Empty Re: Buildings Design

Post by Admin Tue Jul 28, 2009 9:44 pm

sweet!, keep going with that then from what you've done so far we could have this part covered pretty soon.

p.s Where you store the data for the buildings in each territory we'll also need who 'Currently' owns the territory, which we would also need an Id for. Doubt you've forgot but just a reminder

Admin
Admin
Admin

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

https://spartanstudioforum.darkbb.com

Back to top Go down

Buildings Design Empty Re: Buildings Design

Post by Zeppo Marks Fri Jul 31, 2009 3:18 am

Just a quick suggestion. I was thinking that we should change stone and metal to marble and bronze.

Zeppo Marks
Regular
Regular

Posts : 21
Points : 5428
Reputation : 4
Join date : 2009-07-26

Back to top Go down

Buildings Design Empty Re: Buildings Design

Post by Admin Fri Jul 31, 2009 3:32 am

stone to Marble
&
metal to bronze?

hum . . . . . good point yes this would reflect the period more I think, good suggestion.

Everyone take Note

Admin
Admin
Admin

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

https://spartanstudioforum.darkbb.com

Back to top Go down

Buildings Design Empty Re: Buildings Design

Post by jsmoore82 Fri Jul 31, 2009 7:28 am

updated the files with those small text changes, but not uploading until after next actual modification or request.
jsmoore82
jsmoore82
Regular
Regular

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

Back to top Go down

Buildings Design Empty Re: Buildings Design

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