Category:Game
-
Unity realizes a * routing algorithm learning 2.0
Binary tree storage path node Although the routing algorithm is implemented in 1.0, the performance of using list < > to save nodes is not strong enough Pathfinding algorithm learning 1.0 here:https://www.cnblogs.com/AlphaIcarus/p/16185843.html A better approach is to use a heap (or tree) instead of a list storage nodeNote: Here we use arrays to implement the […]
-
[unity] UI panel: countdown timer
1、 Add text (UI – > text) 2、 Create script (countdowntimer) The first method: 1. First declare two variables outside the method private Text txtTimer; // Variables for storing components public int second = 120; // The countdown time is 120 seconds 2. Get the text component in the start method (you need to introduce […]
-
[unity] opencv plus unity obtain the camera in unity and call OpenCV to grayscale the instance
preface There are few tutorials related to opencv plus unity. There are many of OpenCV, but there are few relevant tutorials applied on unity. For example, there are few paid opencv for unity. At present, the economy is limited, so we can only choose a smaller number of OpenCV plus unity. There are even no […]
-
[unity] opencv plus unity Hoff circle detection example code – tank car (record)
As follows: using UnityEngine; using UnityEngine.UI; using OpenCvSharp; public class Circle_Text : MonoBehaviour { //このScriptはMainCameraにアタッチしてください public RenderTexture renderTexture; //mainCameraにつけるRendertexture(アタッチしてね) Texture2D kakunin, dstTexture; Camera mainCamera; Mat mats; Vector3 Circle; void Start() { //mainCamera = GetComponent(); //kakunin = CreateTexture2D(renderTexture); //Tex2D_to_Mat_show(kakunin); } private void Update() { mainCamera = GetComponent(); kakunin = CreateTexture2D(renderTexture); mats = Tex2D_to_Mat(kakunin); HoughCircles(mats); } ///Click […]
-
Text component of ugui learning notes
Text Text content Character Font: font Font style: font style Normal: normal Bold: Bold Italic: italic Bold and italic: bold and italic Font size: font size Line spacing: line spacing Rich text: enable or notRich text function Paragraph Alignment: horizontal and vertical alignment Align By Geometry: Guess (not guaranteed to be […]
-
Ugui learning notes rich text
Official documents:Rich Text 1、 What is rich text Rich text allows text to contain a variety of font styles and font sizes. In addition to being used in the UI, it can also be used in debug Log function is used to help check errors. (Text) (Debug.log) 2、 How to use Through HTML like […]
-
Using SQLite to save configuration table data in unity (for Lua)
Use in lusqlite Lua version SQLite document:http://lua.sqlite.org/index.cgi/doc/tip/doc/lsqlite3.wiki SQLite official website:https://www.sqlite.org/index.html purpose Store the configuration table data in the game in SQLite Store chat records in the game Advantages of SQLite Improve the startup speed of the game. When the game is started, you do not need to load the configuration file, but read it from […]
-
Recent status of Ho engine 20210124
The update was delayed until the 24th, not because I forgot, but because I was too busy to have time On the 1st, I got the new three dragon rising and flying actions of light, medium and heavy, but I haven’t had time to adjust the attack judgment and other data The company’s projects are […]
-
What is the job of a game programmer? Why do you choose a game development engineer!
Question: 1. Is it the same way to make those games with dozens of G’s now as to make DOS games before? Is the principle different or the principle the same, but the amount of work becomes larger? 2. What are the most appropriate majors in higher education? (for example, which major is the game […]
-
Lua programming
I Lua environment installation 1. Scite installation package GitHub download address: https://github.com/rjpcomputing/luaforwindows/releases 2. Luadist (officially recommended, but not very easy to use) http://luadist.org/ II Comments in Lua 1. Single line notes– –Here is a single line comment 2. Multiline comments –[[ Here are multiline comments ]]– Tip: in multiline comments, — [[add a dash to […]
-
Unity is a super simple UI framework for novices
preface Reminder: in order to learn the knowledge points more thoroughly and remember them more firmly, I will write down the knowledge through teaching explanation, because in the process, people will change from students to teachers. This process will excavate new knowledge and views. It is a process of deep excavation and improvement of knowledge […]
-
[unity3d] the font size is adjusted to the maximum value, which is still very small / the canvas aspect ratio is very large
Problem descriptionThe subject originally intended to add subtitles, which will be displayed at the bottom of the screen after triggering. However, when adjusting the canvas size, it is found that no matter how to adjust its aspect ratio with rect tool, its size changes from the world perspective, but the actual size does not change. […]