Check patentability & draft patents in minutes with Patsnap Eureka AI!

3D scene and role driving method and terminal based on xLua

A driving method and role technology, applied in the field of graphical programming, can solve problems such as inability to execute directly, poor performance, poor rendering performance, etc., and achieve a more optimized 3D rendering effect

Pending Publication Date: 2021-12-07
FUJIAN TIANQUAN EDUCATION TECH LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] 1. Poor rendering performance: scratch uses the WebGL rendering solution to process UI and scene logic, and its performance in 3D rendering is relatively poor;
[0005] 2. Generate pseudocode: When scratch generates building block code, it generates pseudocode, which can only describe the logic of building blocks and cannot be directly executed

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • 3D scene and role driving method and terminal based on xLua
  • 3D scene and role driving method and terminal based on xLua

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0071] Please refer to figure 1 , Embodiment 1 of the present invention is:

[0072] A driving method for 3D scenes and characters based on xLua, including steps:

[0073] S1. Create a building block in Unity, and configure the logic semantics used in programming for the building block.

[0074] In this embodiment, step S1 specifically includes the following steps:

[0075] S11. Using the FGUI editor in Unity to create building blocks of different shapes or colors, which are used to distinguish the types of building blocks.

[0076] In this embodiment, the building block generation process is as follows: the FGUI editor decomposes the basic blocks in Unity into multiple horizontal rows or vertical columns of spaces, and mounts various basic controls for the spaces, such as text, input boxes, The drop-down box, operator button, judgment box, and splicing container boxes of various shapes, etc., and then use the GLoader (loader) control of the FGUI editor to load image resour...

Embodiment 2

[0092] A 3D scene and character driving method based on xLua, on the basis of the first embodiment above, in this embodiment, step S3 specifically includes the following steps:

[0093] S31. Start Unity, load preset 3D scenes and characters, and add C# control scripts for the 3D scenes and characters.

[0094] Among them, the C# control script includes 3D scene loading, switching and unloading control scripts and character action play, display, hide and character speech bubble control scripts.

[0095] That is, by binding some scripts that control 3D scenes and characters, such as 3D scene switching, loading, etc., and character actions, speaking, etc. Among them, the loading, switching and unloading control scripts of 3D scenes can be packaged as scene control, and can also include camera control, scene role control, etc. By encapsulating pathfinding with a navigation mesh, the character can move freely in the scene. The overall realization of realistic and diverse scenes a...

Embodiment 3

[0099] Please refer to figure 2 , Embodiment three of the present invention is:

[0100] A 3D scene and role-driven terminal 1 based on xLua, including a memory 2, a processor 3, and a computer program stored on the memory 2 and operable on the processor 3, the processor 3 implements the above-mentioned embodiments when executing the computer program Steps of a 3D scene and character driving method based on xLua in the first or second embodiment.

[0101] To sum up, the present invention provides a xLua-based 3D scene and character driving method and terminal, by developing building blocks with logical semantics in the Unity engine, and converting the logical semantics corresponding to the built building blocks into The executable Lua script code executes the Lua code through the xLua virtual machine to drive 3D scenes and characters to display the output results of the code, which has the following beneficial effects:

[0102] 1. Use the Unity engine to develop building bl...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a 3D scene and role driving method and terminal based on xLua, and the method comprises the steps: creating building blocks in Unity, and configuring logic semantics for programming for the building blocks; obtaining logic semantics corresponding to the built building blocks and converting the logic semantics into executable Lua script codes; loading a preset 3D scene and role, creating an xLua virtual machine, serializing and binding control scripts of the 3D scene and role to a stack of the xLua virtual machine, and starting the xLua virtual machine to execute executable codes. According to the method, the building blocks with the logic semantics are developed in the Unity engine, graphical programming is achieved while it is guaranteed that the 3D rendering effect is more optimized, the logic semantics corresponding to the built building blocks are converted into executable Lua script codes, the Lua codes are executed through the xLua virtual machine to drive 3D scenes and roles to display the output result of the codes, so the building block programming result is more vivid, and the generated executable code is clearer and easier to understand.

Description

technical field [0001] The invention relates to the technical field of graphical programming, in particular to an xLua-based 3D scene and role driving method and terminal. Background technique [0002] As an indispensable tool for children's programming education, building block programming requires the ability to build building blocks, generate building block codes, and execute codes. To build building blocks, a building block library containing various logics is required to organize these building blocks into a logically large set of building blocks in any order; to generate building block codes, to generate a code for the completed set of building blocks in accordance with the sequence and logic of building blocks (you can It can be pseudocode or real code); execute the code, that is, display and express the corresponding logical effect in the scene (which can be a 2D or 3D scene) according to the logic of the generated code. [0003] In the prior art, scratch (a global ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/34G06F8/30G06F9/455
CPCG06F8/34G06F8/313G06F9/45558G06F2009/45562
Inventor 刘德建彭谦罗弘罗迪刘伟李路陈宏
Owner FUJIAN TIANQUAN EDUCATION TECH LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More