• Compete
  • Learn
  • Community
ico-magnifying_glass
    ico-arrow-big-left

    SunShot - MapMySolar- Unity3d Game Logic Part 2

    PRIZES

    1st

    $3,000

    2nd

    $1,000

    Register
    Submit
    The challenge is finished.
    Show Deadlinesicon-arrow-up

    Challenge Overview

    The goal of the challenge is to take an existing unity3d prototype game solution, implement the game logic and associated UI popups/buttons needed to trigger the logic.

    The outcome of the challenge is expected to be a working game in both iOS/Android.

    Challenge Requirements

    Game Engine Framework

    We will use Unity3D, use latest version (5.0+).

    Existing Game Prototype

    The source code is hosted in Gitlab (you can request access in challenge forums) :

    https://gitlab.com/tc-sunshot-r2/ss2-map-my-solar

    The existing prototype implemented the game landscapes, and all game objects with ability to place objects on game landscape. You can refer to the past challenge specs to understand what were prototyped.

    Screens UI Requirements

    • - Game screen icons :

      • - The icons highlighted in the screenshot represents the game functionality we are prototyping and implementing this challenge (more details to follow)

    • - Information Button : Out of Scope

    • - Hall of Fame Button : Out of scope.

    • - Friends Button : Out of scope.

    • - Fuel Shop Button :  (to be removed, instead a fuel shop popup opens for each powerplant when clicking on it and then click “Fuel” The fuel for each power plant is purchased and kept track of individually)

      • - This open Fuel Shop popup : 07-03C_Map_Buy Fuel.png

      • - Refer to Game Logic/Flow for information about each item.

    • - Shop Button :

      • - This opens shop popup : 05-02_Game_Shop.png screenshot

      • - You will implement all UI popups related to shopping flow :

        • - 05-07_Game_Shop_Coal.png

        • - 05-04_Game_Shop_Power Plant.png

        • - 05-05_Game_Shop_Coals.png

        • - 05-03_Game_Shop_Power Plant.png

        • - 05-08A_Game_Shop_Coal Info.png

        • - 05-06_Game_Shop_Coals.png

        • - 05-02_Game_Shop.png

        • - 05-08B_Game_Shop_Buy Coal Plant.png

        • - 06-02_Shop_City.png

        • - 06-03_Shop_City.png

        • - 06-05_Shop_City Detail.png

        • - 06-06_Shop_Tech.png

        • - 06-07_Shop_Tech.png

        • - 06-09_Shop_Carbon Info.png

        • - 06-08_Shop_Carbon.png

        • - 06-04_Shop_City.png

        • - 06-10_Shop_Donate.png

        • - 06-11_Shop_Donate.png

      • - In current prototype we have simple UI popup selecting an game object and placing it on the map is implemented. You will replace it with these popups design navigation and structure.

      • - The user current level # is calculated based on two numbers (x/y) :

        • - X represents total # of the levels of cities powered.

        • - Y represents the power output of all active powerplants.

      • - We have three levels in the game, the buildings/power plants are grouped by level as shown in screenshot : 14_Cities and Plants.png, buildings/plants at or below current user level can be accessible, higher level building/plant should be “Locked” as shown in the screenshots.

    • - Time :

      • - Represents the current day time in the gameplay.

      • - You will reuse day/night switcher configuration and logic to show the game time.

    • - Power Meter :

      • - Building icon represents total # of cities powered

      • - Battery icon represents the current available power output of all active powerplants.

      • - This should reflect the actual values in current game play in real time.

    • - Level Progress

      • - The progress bar represents the progress toward the next level, by default it is empty and it get filled as user progress in the current level, then it will be reset to empty when user advances to next level .. etc.

      • Logic :

        • - For a certain level the player has to have a certain number of powered cities corresponding to a position in the Fibonacci sequence from 1, 2, 3, 5, 8, 13, 21.... (e.g. 1 powered city = level 1, 5 powered cities = level 4 etc...) The filled ratio of the bar is proportional to the ratio of the # of powered cities in excess of the current level to the total # needed to reach the next level (e.g. between level 6 and 7, 8 powered cities are required.So if the player has 17 powered cities, half of the bar (17-13)/8 is filled

    • - Money

      • - This display current user money.

    • - Play/Pause button : Toggling the button will pause/play the game logic execution.

    Game Flow/Logic Requirements

    You will implement a game flow of the game, with following requirements :

    1. - When game starts the player select the landscape as done in current game and never changes afterwards.

    2. - Player will have by default $10,000 as credit at level 1 with empty progress bar.

    3. - To simplify game play concept :

      • - Purchasing items from shop will deduct money from player money pool.

      • - Cities consume power and generate money to be added to player money pool.

      • - Powered cities require power to operate and produce money.

      • - Power Plants consume fuel and produce power

      • - Fuel is purchased to supply power plants with fuel to operate.

      • - Player advances to next level once they have the required # of powered sites in a given level.

    4. - Note that we have objects for 3 levels in current design but the logic provided assume we can have more levels in future.

    5. - Here is the calculations for each unit type

      • - Given that Level n = 1, 2, 3, 4, …etc

      • - Transmission cost :

        • - A step represents a tile. (A= # of tiles between a city and a powerplant)

        • - X represents the power supplied

        • - The cost will be the X - A

        • - i.e. in level 5 a Coal supplied a city 2 tiles away, the transmission cost is 2 So the actual power supplied to that city is 3 (5 - 2),

      • - Powerplants

        • - When purchased and placed on tile, item will have Fuel unit = 0, and will not operate until it receives Fuel.

        • - Clicking on powerplant will show a popup with 1 option as shown in 07-02_Map_Building Info.png :

          • - Sell : Remove this option from popup.

          • - Upgrade : this will purchase the next powerplant in level hierarchy, deduct difference in money from pool.

          • - Scrape : this will free up the tile by removing the powerplant.

          • - Fuel :

            • - Will open Fuel Shop popup as in 07-03C_Map_Buy Fuel.png

            • - Each fuel item should display current # of units of the fuel, the current price/unit, and the "Buy 1 unit" button. Also the total money is shown at the bottom of the popup. By clicking on "Buy 1 unit" the price is deducted from the total money and the # of units increments. This can be repeated in this popup.

        • - Coal : used to supply power to cities

          • - Cost (one-time CapEx) = 200*n

          • - Power supplied/day = n

          • - Fuel units required/day = n

          • - Environmental penalty/day (deduct from money) = n*30

        • - Gas/Oil :  used to supply power to cities

          • - Cost (one-time CapEx) = 150*n

          • - Power supplied/day = n

          • - Fuel units required/day = n

          • - Environmental penalty/day = n*20

        • - Nuclear (used to supply power to cities but cannot be built right next to any city)

          • - Cost (one-time CapEx) = 1000*n

          • - Power supplied/day = 5*n

          • - Fuel units required/day = n

          • - Environmental penalty/day = n*10 (waste disposal)

        • - Hydro (used to supply power to cities, must be placed near water on map, at most one per water)

          • - Cost (one-time CapEx) = 1500*n

          • - Power supplied/day = 5*n

          • - Fuel units required/day = 0

          • - Environmental penalty/day = 0

        • - Solar (can be placed directly next to cities, no transmissions cost)

          • - Cost (one-time CapEx) = 800 + 200*n

          • - Power supplied/day = n

          • -  Fuel units required/day = 0

          • -  Environmental penalty/day = 0

        • - Wind (can be placed directly next to cities, no transmissions cost)

          • - Cost (one-time CapEx) = 200 + 300*n

          • - Power supplied/day = n

          • - Fuel units required/day = 0

          • - Environmental penalty/day = 0

      • - Cities

        • - When first purchased and placed in the tile, the cities will have Power = 0, so it will not operate until it receives power.

        • - Power required = n

        • - Money generated/day = n*100

        • - Clicking on city will show a popup with 1 option as shown in 07-02_Map_Building Info.png :

          • - Sell : Remove this option from popup.

          • - Upgrade : this will purchase the next cities in level hierarchy, deduct money from pool.

          • - Scrape : remove this option from popup.

        • if a city does not have sufficient power, its icon will be greyed out.

      • -  Technology

        • - Carbon Capture

          • - Cost (one-time) = n*1000, n = 1,2,3,...10

          • - Reduce TOTAL environmental penalty from coal/gas/oil by n*10%

        • - Energy Storage

          • - Cost (one-time) = n*500

          • - Increase each solar/wind output by n*10%

      • - Fuel

        • - All prices change over time based on the total fuel demand (D) the previous day :

          • - Coal: price/unit = 10 + D Powers coal plant.

          • - Gas: price/unit = 20 + D Powers gas plant.

          • - Oil: price/unit = 30 + D Powers gas plant.

          • - Uranium: price/unit = 10 + D Powers nuclear plant.

    6. - Active powerplant

      • - Active means the powerplant has enough of the right fuel to generate power. (e.g. coal) if it runs out of fuel the plant will be inactive and not supply energy to the city. It's icon/square on the map will be highlighted red, and the user has to go purchase more fuel.

    7. - Powering cities logic :

      • -  Depending on level, has a # for power required. The active powerplants (e.g. with sufficient fuel) can supply that # demanded by a city, as each powerplant has a capacity #. The powerplants supply power starting from the closest cities. Transmission loss deducts the supply of each powerplant to a city by the shortest distance (# of tiles) in between (e.g. for a powerplant built right next to a city the transmission cost is 0)

    Technology

    • - C#

    • - Unity3d



     

    Final Submission Guidelines

    Submission Deliverables

    Below is an overview of the deliverables:

    • - Working Unity3D 5.0+ app (including source code and configuration files) that covers all requirements.

    • - A complete and detailed deployment document explaining how to deploy and verify the game logic.

    Reliability Rating and Bonus

    For challenges that have a reliability bonus, the bonus depends on the reliability rating at the moment of registration for that project. A participant with no previous projects is considered to have no reliability rating, and therefore gets no bonus. Reliability bonus does not apply to Digital Run winnings. Since reliability rating is based on the past 15 projects, it can only have 15 discrete values.
    Read more.

    ELIGIBLE EVENTS:

    2016 TopCoder(R) Open

    REVIEW STYLE:

    Final Review:

    Community Review Board
    ?

    Approval:

    User Sign-Off
    ?

    CHALLENGE LINKS:

    Review Scorecard