 |
|  |
 |
|
Inverse Icarus
|
 |
flying too low to the ground
May 2001 time: 00:33
|
|
Current Developers:
Uber KruX
Aeson
Esoteric
This is early discussion because, well, I am not exactly sure how the entire feudal system is, and to be honest, I don't think anyone but Farb knows that (or if he even does).
Farb has given each of the three original developers seperate directories on his website, www.ghengisfarb.com. I would propose we use his webspace for the project, since we all have accounts and he seems willing to allow us to mess around and get it all up and running.
I would, however, request that we all have access to a shared directory, so that we could work on the same scripts (not at the same time, of course). If we are going to work collectively on this project, we will need to be able to access eachother's files. I would suggest a "feudal" directory be made on the website, and access be given to the developers (ie, www.ghengisfarb.com/feudal).
Now, down to business.
We need to enumerate pretty much everything that makes up the $mini-demogame, so that rules can be coded. As stated many times, I do not know everything about the game, and would need to fully understand it before I could design an appropiate system for it.
The basics are easy. I would first propose that we build the system around a forum (IPB, PHPBB, whatever). We're probably going to want our own forums for each city / guilds / whatever in the near future, so why not just create it on GF's site, and then have our scripts link to the forum's user data etc?
Tile ownership could easily be transferred to a MySQL database, and could be done in two ways, brute force or careful planning. Brute force would basically have a person enter the values for each tile, and when they changed, an admin would have to update them and type in the new values. I do not like this idea, because I am a man of automation. Simple things like building a mine, changing governments, etc, can impact tiles every round, and people may miss changes or enter data incorrectly.
I would propose that we hard-code the base values for each terrain, and then have the tile table only store several small values: terrain, roaded, irrigated, mined and city. In this system, an admin would only have to update the status of the improvements on a tile, which could be easily done through a control panel.
In fact, I believe it would be extremely easy to make a script to ask you for a city name, and then create a graphical representation of the city and it's 20 workable tiles, and allow the admin to easily click buttons to road, mine, or irrigate the tiles to match the in-game tiles. In fact, maybe we could pass this job down to Town Elders, to split the work into small chunks.
Some sort of tile numbering system would be needed for my plan, but if I'm not mistaken Aeson has already found our coordinates from the minimap. It shouldn't be that hard to devise a system based on that.
It's late, so I'll leave it like this for now. Fellow developers, feel free to post in this thread with your ideas / suggestions. And Aeson, please inform me of the coordinates of our start 
edit: We would need a forum system where people could join groups, much like poly's "civgroups", sometimes only when invited in. Also, I'd like some of them to have icons, but not all of them (ie, secret guilds do not need icons to broadcast their intentions).
Last edited by Inverse Icarus on 11-07-2004 at 13:57
|
|
|  |
 |
|
Aeson
|
 |
orangesoda
Nov 2001 time: 22:33
|
|
Attached is the structure to the database I had put together. I'll go over some of the details for some of the tables. More if the sun doesn't come out today.. (marine layer looks thick! )
Basically I went with more of the "careful planning" approach. The tiles held values that were pointers to tile types.
code: CREATE TABLE feudemo_tile (
id smallint(5) unsigned NOT NULL auto_increment,
name varchar(64) NOT NULL default '',
owner tinyint(3) unsigned NOT NULL default '0',
x tinyint(3) unsigned NOT NULL default '0',
y tinyint(3) unsigned NOT NULL default '0',
type tinyint(3) unsigned NOT NULL default '0',
resource tinyint(3) unsigned NOT NULL default '0',
improvements int(10) unsigned NOT NULL default '0',
escrow tinyint(3) unsigned NOT NULL default '0',
visible tinyint(3) unsigned NOT NULL default '0',
UNIQUE KEY id (id)
id is of course a given for any table. There would be an entry for each tile on the map. I could even work out a script so the file (non-compressed) is uploaded and all tiles are updated automatically if we want. AlanH over at the GOTM is working on getting the compression fast enough to work, so maybe even that would be doable.
name is for a user defined name for their tile.
owner is a pointer to the id of the feudemo_player entry for the player. The first player would need to be an admin account.
x and y are the coordinates for the tile. I've already determined the bic coords for our start, and recommend we use them.
type is a pointer to the id of the feudemo_tile_types entry for the type of tile.
resource is a pointer to the id of the feudemo_resource entry for the resource (if any) present on the tile.
improvements is a bitmask with on/off in position relative to the feudemo_improvement entry for the improvements (if any) present on the tile.
escrow is a bool (I'm not sure how to represent bools in MySQL so just used a tiny int) used to keep track of whether a tile is up for auction or not. (I'm not a real estate agent, so if escrow isn't the right term I apollogize).
visible is a bool used to keep track of whether the tile is uncovered or not. This would be for if we go with automation, as the tile details could be hidden (or not even entered at all) until it is actually uncovered.
Attachment: database.zip
This has been downloaded 1 time(s).
|
|
|  |
 |
|
Aeson
|
 |
orangesoda
Nov 2001 time: 22:33
|
|
code: CREATE TABLE feudemo_tile_types (
id tinyint(3) unsigned NOT NULL auto_increment,
name varchar(64) NOT NULL default '',
food tinyint(3) unsigned NOT NULL default '0',
production tinyint(3) unsigned NOT NULL default '0',
commerce tinyint(3) unsigned NOT NULL default '0',
ibonus tinyint(3) unsigned NOT NULL default '0',
mbonus tinyint(3) unsigned NOT NULL default '0',
rbonus tinyint(3) unsigned NOT NULL default '0',
UNIQUE KEY id (id)
) ENGINE=MyISAM;
This would just hold bic info for the tile types. I'm not sure if it's best to have the i,m,r (irrigate, mine, road.. should be rr too of course) bonuses represented here or in the fuedemo_improvement table.
code: CREATE TABLE feudemo_improvements (
id tinyint(3) unsigned NOT NULL auto_increment,
name varchar(32) NOT NULL default '',
UNIQUE KEY id (id)
) TYPE=MyISAM;
Same deal. Thinking about it now, it would be best to have the i,m,r,rr bonuses here.
code: CREATE TABLE feudemo_map (
id tinyint(3) unsigned NOT NULL auto_increment,
name varchar(32) NOT NULL default '',
tiles int(10) unsigned NOT NULL default '0',
width smallint(5) unsigned NOT NULL default '0',
height smallint(5) unsigned NOT NULL default '0',
UNIQUE KEY id (id)
) TYPE=MyISAM;
This was just for future portability of the code. Map size data from the bic, so you could quickly create all the tiles on the map by choosing a mapsize.
code: CREATE TABLE feudemo_player (
id tinyint(3) unsigned NOT NULL auto_increment,
name varchar(32) NOT NULL default '',
password varchar(32) NOT NULL default '',
email varchar(64) NOT NULL default '',
title tinyint(3) unsigned NOT NULL default '0',
UNIQUE KEY id (id)
) TYPE=MyISAM;
I was handling login and registration through the player table. We'd be doing that through the forum, so could get rid of password and email.
code: CREATE TABLE feudemo_stock (
id tinyint(3) unsigned NOT NULL auto_increment,
name varchar(32) NOT NULL default '',
UNIQUE KEY id (id)
) TYPE=MyISAM;
Should be renamed feudemo_stock_types as that's what I was using it for. Just would hold the values like Food, Commerce, Production, along with special types like Gems, Coconuts, ect. Probably should store the bonus to F/C/P for special types here too.
code: CREATE TABLE feudemo_stockpile (
id tinyint(3) unsigned NOT NULL auto_increment,
food smallint(5) unsigned NOT NULL default '0',
production smallint(5) unsigned NOT NULL default '0',
commerce smallint(5) unsigned NOT NULL default '0',
labor smallint(5) unsigned NOT NULL default '0',
tobacco smallint(5) unsigned NOT NULL default '0',
fruit smallint(5) unsigned NOT NULL default '0',
sugar smallint(5) unsigned NOT NULL default '0',
grain smallint(5) unsigned NOT NULL default '0',
beef smallint(5) unsigned NOT NULL default '0',
fish smallint(5) unsigned NOT NULL default '0',
venison smallint(5) unsigned NOT NULL default '0',
whale smallint(5) unsigned NOT NULL default '0',
iron smallint(5) unsigned NOT NULL default '0',
coal smallint(5) unsigned NOT NULL default '0',
crude_oil smallint(5) unsigned NOT NULL default '0',
aluminum smallint(5) unsigned NOT NULL default '0',
uranium smallint(5) unsigned NOT NULL default '0',
horses smallint(5) unsigned NOT NULL default '0',
saltpeter smallint(5) unsigned NOT NULL default '0',
petroleum smallint(5) unsigned NOT NULL default '0',
fuel_coal smallint(5) unsigned NOT NULL default '0',
rubber smallint(5) unsigned NOT NULL default '0',
fuel_cell_uranium smallint(5) unsigned NOT NULL default '0',
dye smallint(5) unsigned NOT NULL default '0',
incense smallint(5) unsigned NOT NULL default '0',
spice smallint(5) unsigned NOT NULL default '0',
ivory smallint(5) unsigned NOT NULL default '0',
gems smallint(5) unsigned NOT NULL default '0',
gold smallint(5) unsigned NOT NULL default '0',
wine smallint(5) unsigned NOT NULL default '0',
rum smallint(5) unsigned NOT NULL default '0',
beer smallint(5) unsigned NOT NULL default '0',
ale smallint(5) unsigned NOT NULL default '0',
flour smallint(5) unsigned NOT NULL default '0',
snacks smallint(5) unsigned NOT NULL default '0',
pastries smallint(5) unsigned NOT NULL default '0',
paper smallint(5) unsigned NOT NULL default '0',
books smallint(5) unsigned NOT NULL default '0',
pamphlets smallint(5) unsigned NOT NULL default '0',
UNIQUE KEY id (id)
) TYPE=MyISAM;
This would be a 'warehouse' for the player where they could store their stocks. Needs a size defined too, either here or in feudemo_player. This is one part I'm not enthusiastic about at all! I know there has to be a better way than this massive table.
|
|
|  |
 |
|
Aeson
|
 |
orangesoda
Nov 2001 time: 22:33
|
|
code: CREATE TABLE feudemo_unit (
id smallint(5) unsigned NOT NULL auto_increment,
tile smallint(5) unsigned NOT NULL default '0',
owner double NOT NULL default '0',
type smallint(5) unsigned NOT NULL default '0',
name varchar(64) NOT NULL default '',
hp tinyint(3) unsigned NOT NULL default '0',
escrow tinyint(3) unsigned NOT NULL default '0',
alive tinyint(3) unsigned NOT NULL default '1',
UNIQUE KEY id (id)
) ENGINE=MyISAM;
Pretty much just like the tiles. References feudemo_unit_types for all the bic info.
code: CREATE TABLE feudemo_unit_types (
id tinyint(3) unsigned NOT NULL auto_increment,
name varchar(32) NOT NULL default '',
a tinyint(3) unsigned NOT NULL default '0',
d tinyint(3) unsigned NOT NULL default '0',
m tinyint(3) unsigned NOT NULL default '0',
UNIQUE KEY id (id)
) TYPE=MyISAM;
bic info for units.
code: CREATE TABLE feudemo_auction (
id tinyint(3) unsigned NOT NULL auto_increment,
seller tinyint(3) unsigned NOT NULL default '0',
title varchar(128) NOT NULL default '',
item_type set('Tile','Unit','Building') NOT NULL default '',
item_id smallint(5) unsigned NOT NULL default '0',
bidding_opens date NOT NULL default '0000-00-00',
bidding_closes date NOT NULL default '0000-00-00',
minimum_bid smallint(5) unsigned NOT NULL default '0',
current_bid smallint(5) unsigned NOT NULL default '0',
UNIQUE KEY id (id)
) TYPE=MyISAM;
This was to hold the auction data. Pretty straightforward I think.
code: CREATE TABLE feudemo_bid (
id smallint(5) unsigned NOT NULL auto_increment,
player tinyint(3) unsigned NOT NULL default '0',
amount smallint(5) unsigned NOT NULL default '0',
auction smallint(5) unsigned NOT NULL default '0',
UNIQUE KEY id (id)
) TYPE=MyISAM;
These would hold all the bids made by any player on any auction. References the id of feudemo_auction for auction and the id of feudemo_player for player.
code: CREATE TABLE feudemo_building (
id smallint(5) unsigned NOT NULL auto_increment,
tile smallint(5) unsigned NOT NULL default '0',
owner tinyint(3) unsigned NOT NULL default '0',
type tinyint(3) unsigned NOT NULL default '0',
specialty tinyint(3) unsigned NOT NULL default '0',
name varchar(64) NOT NULL default '',
escrow tinyint(3) unsigned NOT NULL default '0',
UNIQUE KEY id (id)
) TYPE=MyISAM;
This references feudemo_business for the type of business. Should be named feudemo_business and feudemo_business_types to be consistant.
code: CREATE TABLE feudemo_business (
id tinyint(3) unsigned NOT NULL auto_increment,
name varchar(64) NOT NULL default '',
requirements int(11) NOT NULL default '0',
cost tinyint(3) unsigned NOT NULL default '0',
upgrade tinyint(3) unsigned NOT NULL default '0',
upgrade_cost tinyint(3) unsigned NOT NULL default '0',
labor_required tinyint(3) unsigned NOT NULL default '0',
labor_max tinyint(3) unsigned NOT NULL default '0',
consumed_stock tinyint(3) unsigned NOT NULL default '0',
consumed_rate tinyint(3) unsigned NOT NULL default '0',
output_stock tinyint(3) unsigned NOT NULL default '0',
output_rate tinyint(3) unsigned NOT NULL default '0',
bonus_stock tinyint(3) unsigned NOT NULL default '0',
bonus_rate tinyint(3) unsigned NOT NULL default '0',
UNIQUE KEY id (id)
) TYPE=MyISAM;
Holds all the "bic" data for the business types.
code: CREATE TABLE feudemo_title (
id tinyint(3) unsigned NOT NULL auto_increment,
name varchar(32) NOT NULL default '',
tilerequirement tinyint(3) unsigned NOT NULL default '0',
unitrequirement tinyint(3) unsigned NOT NULL default '0',
connectionrequirement tinyint(3) unsigned NOT NULL default '0',
titlesrequirement tinyint(3) unsigned NOT NULL default '0',
cost smallint(5) unsigned NOT NULL default '0',
bonus tinyint(3) unsigned NOT NULL default '0',
commandleader tinyint(3) unsigned NOT NULL default '0',
UNIQUE KEY id (id)
) TYPE=MyISAM;
Holds the "bic" data for titles as described.
|
|
|  |
 |
|
Aeson
|
 |
orangesoda
Nov 2001 time: 22:33
|
|
Stuff that comes to mind as needed:
feudemo_city - holds population, income splits (F/P/C) for the session, road connection status, ect.
_government and _technology. Somewhere to hold data about our tech level, government level, ect. As that will affect tile production, resources viewable, market connections, businesses available, ect.
Admin pages to start and end a trading session, create city polls, fight inter-civ 'battles' or player tournaments of some sort.
|
|
|  |
 |
|
GhengisFarb
|
 |
I want my HAMBURGERS!!
May 2002 time: 23:33
|
|
I hadn't thought about forums. My new host gives me unmetered bandwidth as long as I obey specific rules (such as no mass distribution of software, etc.). If we have someone willing to set up and run the forums I see no problem with it.
Can anyone recommend some websites with good php/mysql tutorials/lessons?
Last edited by GhengisFarb on 13-07-2004 at 18:59
|
|
|  |
All times are GMT. The time now is 05:33. Apolyton Time is 00:33. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|