Announcement

Collapse
No announcement yet.

How about a $MiniGame Democracy Game.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    we should really discuss how we are going to represent the data though. are we going to represent the actual tile data in the database? or are we just going to have to manually edit it when we buy 3 tiles that are connected?
    "I've lived too long with pain. I won't know who I am without it. We have to leave this place, I am almost happy here."
    - Ender, from Ender's Game by Orson Scott Card

    Comment


    • #47
      Using our current system of tile numbering, it's impossible for an automated system to know that tiles are connected. Either we make up some new tile ID's, figure out how to find game coords, or do it manually.

      Edit: A player could select three tiles and ask for it to be considered a .. whatever its called I forgot. Then on the admin screens (haven't said anything about that yet) it would appear for approval.

      Comment


      • #48
        I was thinking about that. Could we use the coordinates that Civ3 assigns to each tile to keep track of them?

        The time consuming stuff that would be nice to have automated:
        1) Tile Production - Food, Shields, Commerce (could add a fourth for Special Resource Flags that tell the system to consider certain production as special production)
        2) Tile Ownership - The player who owns the tile, thus it could list the Player's production from all their tiles.
        3) Markets - If the system would automatically compute the markets once all the transactions had been inputted.
        4) A way to tell what improvements were in each tile or city, and in the case of cities who owned what. The cities could be complicated as different players could own taverns in one city.



        The map stuff could be handled by hand. No need to tell if tiles are adjacent, etc. We can easily look at the deed map and tell if three tiles are connected. I actually enjoy making the maps and borders. Its all the number crunching that took all of my time and concentration. Baronies and the like don't have any impact on the trading system except the rank grants the player bonuses and allows them to own more land.

        If we had a block for each player that tracked their rank we could change it as their rank was changed. The system would just use to compute bonuses and # of tiles they were allowed to own.

        Comment


        • #49
          It should be able to keep track of everything you just said. I assume what we'll have is a table of cities with sizes, and check boxes for important improvements. A table for buildings as well. We need things so that any person or city can have any number of some thing by any person or city (however likely restricting each person to one of a kind of building per city).

          Comment


          • #50
            The supply/demand system is going to have problems (as it did last time, IIRC). There simply isn't enough demand.

            Comment


            • #51
              my origial idea, that i thought would be cool, but hard to design / code efficiently was to have a matrix of tiles. if we decided on a map size, we would know the dimensions. is there a way to get coordiates in game? if so we could start out with all "black" tiles, and as we discover them, we (an admin) input their data, and they'd go up for sale.

              otherwise, provide me with an efficient naming system. if you have a coder's mind, and know how the basics of how a database functions, you'd be more helpful
              "I've lived too long with pain. I won't know who I am without it. We have to leave this place, I am almost happy here."
              - Ender, from Ender's Game by Orson Scott Card

              Comment


              • #52
                Originally posted by Uber KruX
                my origial idea, that i thought would be cool, but hard to design / code efficiently was to have a matrix of tiles. if we decided on a map size, we would know the dimensions. is there a way to get coordiates in game? if so we could start out with all "black" tiles, and as we discover them, we (an admin) input their data, and they'd go up for sale.

                otherwise, provide me with an efficient naming system. if you have a coder's mind, and know how the basics of how a database functions, you'd be more helpful
                I think I know the basics of a database, I'm just not familiar with the language and codes your using. I don't know of a way to get the coordinates in game, but if someone was to generate a map and set it up for us they could open it in the map editor and and tell us what some of the tiles coordinates were.

                We could be able to compute the other coordinates from that info.

                Comment


                • #53
                  Originally posted by GhengisFarb

                  I think I know the basics of a database, I'm just not familiar with the language and codes your using. I don't know of a way to get the coordinates in game, but if someone was to generate a map and set it up for us they could open it in the map editor and and tell us what some of the tiles coordinates were.

                  We could be able to compute the other coordinates from that info.
                  epi told me that too. if we knew the coord ranges, we could make a matrix and be given our start coord as a basis, yada yada yada.

                  but is this the best way to organize the info? what else can you come up with?

                  PHP is very similar to C, and you use mysql queries in PHP to use the DB. heres an example from my news script:

                  PHP Code:

                  $db 
                  mysql_connect("localhost"$dbu$dbp);
                  mysql_select_db("krux",$db);

                  $max=(mysql_num_rows(mysql_query("SELECT * from news"))) - 1;

                  if ( !isset( 
                  $low ) )
                  {
                      if (
                  $max >=10)
                      {
                          
                  $low $max-10;
                      }
                      else 
                      {
                          
                  $low 0;
                      }
                  }


                  for( 
                  $id=$max$id>$low$id-- )
                  {
                      
                  $query mysql_query"SELECT * FROM news WHERE id=$id"$db );
                      
                  $arr mysql_fetch_array$query );

                      
                  $username = ($arr["username"]);
                      
                  $title      = ($arr["title"]);
                      
                  $news      = ($arr["news"]);
                      
                  $date      = ($arr["date"]); 
                  basically, you just code html, and open up tags where you need them.
                  "I've lived too long with pain. I won't know who I am without it. We have to leave this place, I am almost happy here."
                  - Ender, from Ender's Game by Orson Scott Card

                  Comment


                  • #54
                    I wouldn't think a grid system would be the best way to organize the info, but that's just me. The last game we just assigned them a number as they became available and used a directional description as their title.

                    Could we give each tile a cell for its location description?

                    Say Tile A101's description is typed in as "Uberlund wnw" so its the tile west-northwest of the city of Uberlund.

                    Then if we could generate a list by Player Name say something like:

                    Code:
                    Player Name
                    1) First tile owned by Player Name - stats of tile/buildings, etc.
                    2) Second tile owned by Player Name - stats of tile/buildings, etc.
                    3) Third tile owned by Player Name - stats of tile/buildings, etc.
                    And so on.......
                    It would be cool to have the database and inquiries be able to generate a map for us, but that is the easiest area to do by hand. I will be ecstatic if we simply have a system to track the tiles productions who owns them, and handles the buying/selling and market prices.

                    Comment


                    • #55
                      we could easily develop several "tables" int the database.

                      one could be a "user" database, that has username, password, etc etc, and then a list of tiles (s)he owns. my only problem is how would the script "know" the tiles are connected?

                      firstly, we have to develop a way of naming the tiles that doesnt require renaming, and this is the major problem.

                      if we know our start location is 100, 47, this would be workable. we could just label them like that.

                      two things come to my mind about how to tell if they're connected.

                      the first way (more automated, but makes for more coding work) would to have the script go through the list of tiles for a user, and check the x and y coords for a "differ by one" relation.

                      another way would be to input it in a different way. instead of having a list of tiles, we could do something like: Barony([12,3][12,4][12,5]), Kigdom([47,22]...

                      in that instance, we could then explode that into a series of arrays for the script, and we'd essentially end up with a matrix, something like:

                      $player_id[$lands][0] would point to the aforementioned barrony
                      $player_id[$lands][1] would point to his kingdom
                      etc, etc.

                      IN FACT, we could make the SUBMISSION SCRIPT do the "contigous" checking, and then make group the tiles as i mentioned above, and then it put in to the DB already sorted like that.

                      we'd have to be very careful about the buying / selling features and their effects on lands, but it's workable.

                      now, GF, i need to learn how a minigame works

                      i read something about taverns and whatnot and my mind went numb for a second.
                      "I've lived too long with pain. I won't know who I am without it. We have to leave this place, I am almost happy here."
                      - Ender, from Ender's Game by Orson Scott Card

                      Comment


                      • #56
                        Basically there are three products we produce and sell:
                        Food, Shields, and Commerce.

                        There is a market for each and the final price at the close of the market is what all goods are transacted at unless two players have negotiated a set price between them.

                        The final price is Demand/Supply * $100.

                        While those sources vary, the universal description would be something like
                        Code:
                        (Special + Total number sold)/(Special + Total number bought)
                        It would be nice to have the database allow players to log in and then list their holdings, stockpiles, and production.

                        The player would then input how many they wanted to sell/or buy and at end of the turn the system would update everyones stockpiles, etc.

                        Knowing which tiles connect to which ones has absolutely nothing to do with the game. It is only used to set up Baronies and other territories. We can make maps and check that by hand.

                        Some actions do require knowing what city radii a tile lies in though.

                        Comment


                        • #57
                          ok, i have an idea now. we'd create several tables for information:

                          USER TABLE
                          id
                          username
                          password
                          land_ids

                          ... the land_ids field will be a list of id's, pointing to the land table. this will allow a complex land "class" to be linked to from the user's "class"

                          LAND TABLE
                          id
                          owner
                          type (barron, county, dutchy, kingdom, scattered tiles...)
                          tiles (a list of the coords of all the tiles)
                          improvements

                          the "tiles" field would link to the "tile" table.

                          TILE TABLE
                          id
                          base_prod
                          ...

                          GF, if you could fill these in with all the required information for datakeeping (ie, what i need to keep track of in a tile, in a "region", etc), that would be f*cking great man.
                          "I've lived too long with pain. I won't know who I am without it. We have to leave this place, I am almost happy here."
                          - Ender, from Ender's Game by Orson Scott Card

                          Comment


                          • #58
                            Originally posted by Uber KruX
                            GF, if you could fill these in with all the required information for datakeeping (ie, what i need to keep track of in a tile, in a "region", etc), that would be f*cking great man.
                            That will not be a problem. I need to go over some stuff and make sure I get everything so I may not post the complete list until tomorrow sometime.

                            Comment


                            • #59
                              Originally posted by GhengisFarb

                              That will not be a problem. I need to go over some stuff and make sure I get everything so I may not post the complete list until tomorrow sometime.
                              not a problem. when we have all the data, we can start making scripts
                              "I've lived too long with pain. I won't know who I am without it. We have to leave this place, I am almost happy here."
                              - Ender, from Ender's Game by Orson Scott Card

                              Comment


                              • #60
                                Originally posted by Uber KruX


                                not a problem. when we have all the data, we can start making scripts
                                The first obvious three pieces of info are
                                Code:
                                Food
                                Shields
                                Commerce
                                If we add a fourth one to denote that the tile has a special resource (such as wheat) can we have the database check for the existence of a value in that cell and based on that value read the Food, Shields, and/or Commerce cells as the alternate commodity.

                                Example:
                                Tile name, Food Output, Shield Output, Commerce Output, Resource Tag

                                Resource tag 0 means no special resource, tag 3 means cattle.

                                Tile 1: 3, 1, 2, 0 would be computed as 3 food, 1 shield, and 2 commerce.

                                Tile 2: 3, 1, 2, 3 would be computed as 3 beef, 1 leather, and 2 commerce.

                                Comment

                                Working...
                                X