The front-end engineering

Game engine: Cocos Creator V2.0.1

Game main domain: Big_brother –>> Engine package generation –>> wechatGame

Open data domain: Big_brother_wx_open_data –>> Engine package generation –>> wechatGame – subContext

Game test run environment: use the engine to package the primary domain and open data domain respectively, put wechatGame-SubContext into wechatGame, and use the wechat developer tools to open wechatGame.

Mobile wechat experience: Upload the RES folder in wechatGame to the developer, delete the RES folder in the local packaging directory, connect the mobile phone to the agent, and point to the developer where the RES is located. (Preview requires the project package to be smaller than 4m, so res resources are removed from the package and put into remote)

The game logic

Start scene main

Business functions

  • Background music, mute by music switch
  • Start game Jump to game scene
  • Achievements view
  • Leaderboard viewing
  • Obtain basic user information
  • Page dynamic effect

Game Scene game

Business functions

The whole game scene is mainly the process of sliding cards to answer questions, in which novice guidance, debt, regret and other guidance cards show the same as the question card, but there is no answer to slide away.

  • Number of gold COINS
  • Collapse value
  • Power value
  • The problem card
  • The answer card
  • Achievement layer
  • Share life
  • Newbie guide

Result Scenario result

Business functions

  • A successful outcome
  • Failure result (showing the highest percentage of power in the bureau)
  • Check the leaderboard
  • Share with friends (different results and different pictures)
  • Restart the game
  • Back to start

Achievement Scene Reward

Business functions

  • Display achievement list
    • Achievements not obtained: gray display, copy “not obtained”, click no effect
    • Achievements achieved: Light up the display, copy to get the time, such as “September 9, 2018.”, click the display achievements big picture pop-up layer
  • Click achievement
    • Pop up the achievement map layer, pause the background music and play the achievements sound. After the achievements sound is finished, continue playing the background music
    • Save the picture to the system album
    • Share friends: Share to a group
  • Back button
    • Click to return to “Start page”

Scene rank

Business functions

  • Top list
    • Display logic: top 16 at most, in ascending order according to the number of years, that is, the less the number of years when successful, the higher the ranking; Those with the same number of years and the earliest update rank first
    • Update logic: When the game ends, win the game && years < the number of years currently stored, then update
    • My Ranking: If you have the current player’s ranking information, the “my Ranking” will be displayed below, including avatar, nickname, ranking
    • Dynamic effect: 16 people in the list of head disco dynamic effect
  • A long list of
    • Display logic: top 100 at most, in descending order by years, that is, the longer the years, the higher the ranking; Those with the same number of years and the earliest update rank first
    • Update logic: Update when the game ends and the number of years > the number of years currently stored
    • My Ranking: If you have the current player’s ranking information, the “my Ranking” is displayed below, including the rank, profile picture, nickname, and years
  • List of achievements
    • Display logic: top 100 at most, descending according to the number of achievements, that is, the more achievements, the higher rank; With the same number of updates, the ones with earlier updates rank first
    • Update logic: obtain the new achievement | | at the end of the game, achievements number > currently stored number of updates
    • My Ranking: If you have the current player’s ranking information, the “my Ranking” is displayed below, including the rank, avatar, nickname, number of achievements
  • Back button
    • Click to return to “Start page”

conclusion

The code logic will gradually be added later.

You are welcome to identify the following picture link in the small program code, experience the game, looking forward to your valuable comments.

👉👉👉 👉👉