Categories
Uncategorized

Create menu List in Unity

When the player enters the start interface of the game, the first thing the player sees is the game menu. The UI screen and location of the menu will change the player’s first impression of the game. A good game menu should be concise and clear and the appearance of the UI should match the background settings of the game. A simplest game start interface should have two options to start the game and exit the game. In Unity, the creation of game buttons is very simple, and Unity has its own prefab. Players can create a Canvas first, and then add buttons and Text to the canvas. Unity3D and 2D have the same method of creating canvases. The difference between them is that Unity3D can add 3D modules to the UI to make the screen richer. In this project I created a scene called Hometest and added some simple 2D buttons.

Panel_main(figure 1)

Although Unity has a large number of components and scripts that developers can use directly, these scripts are not enough to meet the expectations of developers. We can see in the picture that I created panel_main and panel_option. The screenshot of the first picture shows only the button of panel_main.

panel_option(figure)

We can see the panel_option screen from figure 2. My design is that when the user selects the start game in figure 1, the options in figure 2 will automatically pop up. Before the user chooses to start the game, these Music Menus will not be displayed. In order to achieve this, we need to write our own scripts. Keep panel_main in the player’s field of vision. When the player clicks on the start game, the player can get the hidden panel_option.

Menu Manager script->SetupPanels (figure 3)
panel_main inspector(figure 4)

The code of figure 3 is to let Unity know that the Current panel is the scene to be displayed in the initial screen. We only need to add the script to Canvas, and let the current panel selection include panel_main (figure 4).At this time, we need to write another script to let Canvas know which is the picture that needs to be displayed and which is not. When we are done, we can achieve the effect we want by adding a click script to the controller used by the user.

demo video
Categories
Uncategorized

Interview experience sharing

Autumn recruitment usually starts in March or April. As a senior, I should start preparing for the job fair for fresh graduates without considering the graduate entrance exam. As a programmer, most people choose to interview for technical positions. I think it is very important to carefully prepare your resume and interview, because there are really too many students who come to interview without preparation. We learned how to write a resume in CS461 in the fall. I think that the resume should be revised appropriately for different positions in different companies. I submitted a resume of a game planner in September last year. I successfully received an interview from Tencent. During the interview, the interviewer thought that my resume contained too much experience in technical positions. He believes that compared to game planners, participation in game design is more important than development. Although I still joined Tencent’s minigame development team, I was not accepted by Tencent during my summer internship. It is very important to identify the position you want to obtain and revise your resume.

This is a very simple index question that I encountered as an algorithm engineer. Given an integer array and a target number, return two index values. The sum of their corresponding array elements is equal to the target number. You can assume that there is only one answer and the same element cannot be used twice. This question seems to be able to get the answer using a simple order, but this is not an exam question encountered in school, and an interview question. The idea of ​​problem-solving is very important, we need to think about our own ideas to the interviewer. For some difficult questions, the interviewer does not expect you to be able to answer them correctly. They just want to know how you think about the difficult problem, so it is very important to explain your own ideas.
Community Verified icon

As an international student from China, if I want to get a non-technical job in China, my internship experience and the open source projects I participated in are very important. There are special graduation projects in our school that can help us gain a certain advantage on the resume, but just one project is not enough. I once wanted to submit a postgraduate student majoring in games at the University of Utah, but Utah requires students to have at least three complete projects to be eligible to submit an application. Before my senior year, I had almost zero internship and participation in projects, so I regretted that I missed the winter application.For seniors like us, there is not much time to prepare a resume and start applying.

Categories
Uncategorized

team work

In the last semester, we formulated a series of plans and project progress schedules for the VR music game project. However, in this semester we did not fully follow the plan, which resulted in our inability to complete the preliminary version of the project in time. Since the project requires three people to complete the project together, the division of code is very important. We should complete the division of code at the beginning of this semester.

The main three parts of VR rhythm game project creation

For a game team composed entirely of programmers. Game planners are particularly critical. We need to know what parts a good game consists of, and then the project manager assigns tasks. In this project, all our art materials and music can use Internet resources, so we only need to allocate different program functions.

However, our team did not do this, I think this is not a bad thing. Everyone needs to face difficulties and grow. After the last standup meeting, I think we can divide the project into three main parts. Because our team has only three people, when different people complete the project, we need to upload and download the project through merge branch. I think the main framework of the VR rhythm game project is the scene of the game, the rhythm of the music and the generation of the beat, and how the player operates to obtain the game experience. The game scene mainly requires the programmer to arrange the objects in the scene, the UI distribution, the area where the player operates, and so on. Music beats are mainly used to obtain the beats of the music through scripts and then use the beats to generate strike targets. The time and location of the strike target needs to be adjusted by the programmer. Game operation means that when the target is generated, the player gains a sense of strike through the strike operation. Players can also avoid targets by moving, depending on the core gameplay of the game. The three parts of the framework are completely different, so when the team completes their tasks, they can save a lot of time to merge projects and debug.

Categories
Uncategorized

Scene Transition function

This week, I updated the script of the VR music game project. I added a scene transition function and made several new scenes. The main purpose of the scene transition function is that when the player wants to switch levels or return to the operation interface, the script can help the player to interact by pressing buttons.
The main syntax of scene interaction can be completed by the built-in components in Unity. As shown in the figure, we only need to add the following code to the button key to realize the conversion of the specified scene or interface.

Change the scene

For unity scene conversion, we can also perform a scene conversion by looking up the scene index value through code.

Use the scene index to Change the scene

For the second method, we need to create a new scene and get the index value of this scene. We can find the Build Setting from the File option in Unity, and then we can see from the Build Setting that the scene is the index value. Creating a new scene is very simple, the programmer can directly create an empty scene in the Unity folder, or create a scene with a camera and basic light source in the function key.

We can see the numbers 0 and 1 after the file name, that is the index value of the scene, we only need to add the index value in the script to the place where we want to convert, then the script will switch the scene through the player’s interaction .

The realization of scene conversion can help developers better distribute work. Each person can change at will in the scene he is responsible for, and then associate through buttons or icons. This can avoid unnecessary errors when multi-person teams work at home and upload code. They can use git to load the same Unity file for work and upload at any time.