TW202318221A - Platform to automate creation of serialised data objects for import into a game engine - Google Patents
Platform to automate creation of serialised data objects for import into a game engine Download PDFInfo
- Publication number
- TW202318221A TW202318221A TW111124610A TW111124610A TW202318221A TW 202318221 A TW202318221 A TW 202318221A TW 111124610 A TW111124610 A TW 111124610A TW 111124610 A TW111124610 A TW 111124610A TW 202318221 A TW202318221 A TW 202318221A
- Authority
- TW
- Taiwan
- Prior art keywords
- data
- platform
- serialized
- code
- data object
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
Description
本揭示係關於一種平台,其接收儲存於表中之外部資料,且產生程式碼,以提取外部資料以用於匯入至遊戲引擎環境中。This disclosure relates to a platform that receives external data stored in tables and generates code to extract the external data for import into a game engine environment.
儘管軟體遊戲引擎經由對遊戲開發工具之存取來促進遊戲開發,但開發者仍具有根據遊戲要求訂製這些工具之繁瑣工作。此訂製之部分為這些工具提供資料參數,該資料參數由所開發之遊戲使用。Although software game engines facilitate game development through access to game development tools, developers still have the tedious task of customizing these tools according to game requirements. Part of this customization provides data parameters for these tools that are used by the game being developed.
直接方式為在遊戲開發環境內訂製這些開發工具,其中開發者個別地在軟體遊戲引擎自身內手動地改變所有資料值。直接方式為繁瑣且耗時的。The direct way is to customize these development tools within the game development environment, where the developer manually changes all data values individually within the software game engine itself. The direct approach is tedious and time-consuming.
第二方法為經由匯入含有供遊戲開發工具使用之資料參數之表進行分批修改。一或多個試算表(例如,呈Excel®或GoogleSheets®格式(format))用以呈表狀格式編輯及儲存外部資料。為了在遊戲引擎環境中讀取外部資料,以下程序通常遵循:(1)撰寫關於資料之特定內容之程式碼,以讀取外部資料以用於轉換為遊戲中資料物件;(2)使用工具以將外部資料轉換為易讀取資料格式(諸如CSV),且接著撰寫程式碼以將資料物件讀取至遊戲引擎環境中。程式設計師可需要針對各新表重新撰寫程式碼。The second method is batch modification by importing a table containing data parameters for use by the game development tools. One or more spreadsheets (eg, in Excel® or Google Sheets® format) for editing and storing external data in a tabular format. In order to read external data in a game engine environment, the following procedure is generally followed: (1) write code specific to the data to read the external data for conversion into an in-game data object; (2) use tools to Convert external data into an easily readable data format (such as CSV), and then write code to read the data objects into the game engine environment. Programmers may need to rewrite the code for each new table.
以上過程需要設計者與程式設計師之間的協作,此導致在維護用於含有外部資料之試算表之資料結構中時間成本及低效。一旦資料結構改變,程式設計師需要相應地調適其已撰寫程式碼,否則當創造資料物件在遊戲中讀取時將存在錯誤。The above process requires collaboration between designers and programmers, which results in time costs and inefficiencies in maintaining data structures for spreadsheets containing external data. Once the data structure changes, programmers need to adapt their written code accordingly, otherwise there will be errors when creating data objects that are read in-game.
本發明之一個目的為提供一種解決以上缺點之解決方案。An object of the present invention is to provide a solution to the above disadvantages.
根據本發明之第一態樣,提供一種用於自外部資料創造序列化資料物件之平台,該平台經組態以產生程式碼,該程式碼分析包含組織於單元中之外部資料的表,以識別儲存於各單元中之資料的類型;判定經識別資料類型是否為可剖析的;回應於經識別資料類型為可剖析的而產生另一程式碼,該另一程式碼在經編譯時輸出至少一個序列化資料物件,其中儲存於表之各單元中之資料指派給序列化資料物件的屬性;及擷取序列化資料物件之匯出格式,其中平台進一步經組態以編譯所產生之另一程式碼,以呈經擷取匯出格式輸出序列化資料物件。According to a first aspect of the invention, there is provided a platform for creating serialized data objects from external data, the platform being configured to generate code that parses a table containing external data organized in cells to identifying the type of data stored in each cell; determining whether the identified data type is parsable; responsive to the identified data type being parsable, generating another code that when compiled outputs at least a serialized data object in which the data stored in each cell of the table is assigned to a property of the serialized data object; and an export format for retrieving the serialized data object in which the platform is further configured to compile another resulting Code to output serialized data objects in the extracted export format.
根據本發明之第二態樣,提供一種用於自外部資料創造序列化資料物件之方法,該方法包含以下步驟:產生程式碼以分析包含組織於單元中之外部資料的表,以識別儲存各單元中之資料的類型,以判定經識別資料類型是否為可剖析的;回應於經識別資料類型為可剖析的而產生另一程式碼,該另一程式碼在經編譯時輸出至少一個序列化資料物件,其中儲存於表之各單元中的資料指派給序列化資料物件之屬性;擷取序列化資料物件之匯出格式;及編譯所產生之另一程式碼,以呈經擷取匯出格式輸出序列化資料物件。According to a second aspect of the present invention, there is provided a method for creating serialized data objects from external data, the method comprising the steps of: generating code to analyze a table containing external data organized in cells to identify the the type of data in the unit to determine whether the identified data type is parseable; in response to the identified data type being parseable, another code is generated that when compiled outputs at least one serialized A data object in which the data stored in each cell of the table is assigned to a property of the serialized data object; retrieves the export format of the serialized data object; and compiles another code generated to present the retrieved export format to output serialized data objects.
在以下描述中,參考圖式描述各種具體實例,其中在整個不同視圖中,相同參考標號通常指相同部件。In the following description, various specific examples are described with reference to the drawings, wherein like reference numerals generally refer to like parts throughout the different views.
本申請案落入使用遊戲引擎之遊戲開發之領域內。遊戲引擎提供遊戲開發者需要建立遊戲之一可再用軟體組件的套件,諸如圖形、聲音、物理學及人工智慧(artificial-intelligence;AI)功能。此軟體套件允許遊戲開發者創造遊戲物件,其為經設計用於遊戲之元素的表示,諸如角色、武器及環境物件。改變遊戲物件之屬性允許各元素經訂製以符合遊戲之需要。This application falls within the field of game development using game engines. A game engine provides a suite of reusable software components that game developers need to create games, such as graphics, sound, physics, and artificial-intelligence (AI) functions. This software suite allows game developers to create game objects, which are representations of elements designed for use in the game, such as characters, weapons, and environmental objects. Changing the properties of game objects allows each element to be customized to meet the needs of the game.
用於這些遊戲中物件之資料(用以修改其屬性)可儲存於外部檔案中,諸如由如Excel®及GoogleSheets®之圖表軟體創造的試算表。使用試算表,此係由於其允許外部資料組織於表中。然而,此類試算表不可直接匯入至遊戲引擎環境中。特定程式碼必須被撰寫以剖析該表,以按由遊戲引擎辨別之格式創造資料物件,其中資料物件中之各者含有意欲用於遊戲物件之相關外部資料。資料物件隨後可匯入至遊戲引擎中,從而符合將外部資料匯入至遊戲引擎中以用於轉換為遊戲物件的目標。Data for these in-game objects (to modify their properties) can be stored in external files, such as spreadsheets created with diagramming software such as Excel® and Google Sheets®. Use a spreadsheet because it allows external data to be organized in a table. However, such spreadsheets cannot be imported directly into the game engine environment. Specific code must be written to parse this table to create data objects in a format recognized by the game engine, where each of the data objects contains relevant external data intended for the game object. The data objects can then be imported into the game engine, meeting the goal of importing external data into the game engine for conversion into game objects.
並非必須手動地重新撰寫程式碼以剖析用以儲存外部資料之各表,本申請案試圖實施自動化匯入儲存於外部表中之資料的程序之工作流程。本申請案經由代管程式之平台達成此實施,該程式在偵測出匯入至遊戲引擎中之外部資料被含於表中後,則創造由遊戲引擎辨別之表的程式碼。Rather than having to manually re-code to parse the tables used to store external data, this application attempts to implement a workflow that automates the process of importing data stored in external tables. This application achieves this implementation via a platform that hosts a program that, after detecting that external data imported into the game engine is contained in a table, then creates the code for the table recognized by the game engine.
更詳細地,程式產生程式碼,該程式碼可存取儲存於單元中之表中、組織為列及行的外部資料。所產生之程式碼經組態以識別儲存於各單元中之資料的類型,且輸出迎合那資料之類型之可執行陳述。舉例而言,若單元經識別為含有整數(integer),則所產生之程式碼將輸出可執行陳述以迎合整數類型之資料。在一個實施中,所產生之程式碼自伴隨該表之索引識別或學習儲存於表之單元中之各者中之資料的類型,該索引經由陳述所儲存資料之一或多個性質定義儲存於表中之單元中之各者中的資料。舉例而言,索引可定義儲存於特定單元中之資料應為整數,且意欲僅用於用戶端處。In more detail, the program generates code that can access external data stored in tables in cells, organized as columns and rows. The generated code is configured to identify the type of data stored in each cell, and to output executable statements catering to that type of data. For example, if a cell is identified as containing an integer, the generated code will output executable statements to cater for integer-type data. In one implementation, the generated code identifies or learns the type of data stored in each of the cells of the table from an index accompanying the table that defines the type of data stored in each of the cells of the table by stating one or more properties of the stored data Data in each of the cells in the table. For example, an index may define that the data stored in a particular cell should be an integer and intended only at the client.
在判定跨外部資料存在之經識別資料類型為可剖析的後,平台產生另一程式碼,以輸出迎合經識別資料類型中之各者之可執行陳述,以序列化儲存於表之單元中的外部資料。此序列化創造一或多個串列化資料物件,其為各自具有唯一識別符且用以組合不同資料類型(例如,字串(string)、浮點(float)、陣列(array))之資料物件。各資料類型由其名稱識別,且不同資料類型亦稱作各資料物件之屬性。所產生之另一程式碼輸出可執行陳述,該些可執行陳述將該表之各單元中之資料映射至序列化資料物件的屬性,使得當編譯所產生之另一程式碼時,儲存於表之各單元中之資料被指派給序列化資料物件的屬性,使得序列化資料物件具有名稱及資料對之集合。序列化資料物件之各屬性的名稱係自為那屬性提供資料之單元的欄位名稱獲得。所產生之程式碼亦以規定匯出格式匯出一或多個序列化資料物件,以容納不同遊戲引擎具有之各種可接受輸入格式。遊戲引擎隨後能夠載入一或多個序列化資料物件以用於與遊戲中資料物件匹配使用,由此各序列化資料物件之屬性中之資料被複製至遊戲物件之對應屬性,其中預期序列化資料物件。以此方式,程式化遊戲中資料物件之屬性可由試算表中之外部資料修改。After determining that the identified data types that exist across external data are parseable, the platform generates another code to output executable statements catering to each of the identified data types to serialize the data stored in the cells of the table external information. This serialization creates one or more serialized data objects, which are data that each have a unique identifier and are used to combine different data types (eg, string, float, array) object. Each data type is identified by its name, and different data types are also called attributes of each data object. The generated further code outputs executable statements that map the data in the cells of the table to attributes of serialized data objects such that when the generated further code is compiled, the values stored in the table The data in each unit of is assigned to properties of the serialized data object such that the serialized data object has a collection of name and data pairs. The name of each property of a serialized data object is obtained from the field name of the unit providing data for that property. The generated code also exports one or more serialized data objects in a specified export format to accommodate the various acceptable input formats that different game engines have. The game engine can then load one or more serialized data objects for matching use with in-game data objects, whereby the data in the properties of each serialized data object is copied to the corresponding properties of the game object, where the serialized data object. In this way, the properties of data objects in the stylized game can be modified by external data in the spreadsheet.
有利的是,一或多個序列化資料物件之所有程式碼產生及輸出為自動的,而無需由遊戲開發者撰寫之程式碼,從而減小工作負載以手動地創造程式碼,該程式碼可在遊戲開發階段期間匯出儲存於試算表文檔中之外部資料。Advantageously, all code generation and output of one or more serialized data objects is automatic without requiring code written by the game developer, thereby reducing the workload to manually create code that can Export external data stored in spreadsheet files during the game development phase.
以下結合圖1至圖8更詳細地描述於用以輸出序列化資料物件之自動程式碼產生器。The automatic code generator for outputting serialized data objects is described in more detail below with reference to FIGS. 1-8 .
圖1展示將外部資料匯入至軟體遊戲引擎中之工作流程100,該軟體遊戲引擎諸如但不限於Unity®。步驟102及104針對用以含有外部資料之試算表之設計。根據本發明之具體實例,步驟106、108、110、112及114由代管自動程式碼產生器之平台執行,以自含於步驟102及104的試算表中之外部資料而創造序列化資料物件。步驟116及118由軟體遊戲引擎執行,該軟體遊戲引擎匯入步驟114中創造之序列化資料物件。FIG. 1 shows a
在步驟102及104中,採納一種方法論,其中定義試算表之資料結構,且外部資料經配置以跟隨資料結構。此方法論例如預定義外部資料如何組織至特定資料類型之行中,標準化將允許平台之所產生之程式碼與試算表一起工作的試算表之創造。In
圖2A展示根據此方法論之一個可能實施組態之試算表200(歸因於空間限制被展示為兩半)。試算表200具有一表202,該表202包含組織於單元206中之外部資料。試算表200亦含有隨附該表202之索引204。Figure 2A shows a spreadsheet 200 (shown in two halves due to space constraints) of one possible implementation configuration according to this methodology.
索引204經由陳述所儲存資料之一或多個性質208,定義儲存於表202中之單元206中之各者中的資料。索引204被參考,以判定一或多個性質208中之哪者影響用以創造序列化資料物件之在步驟106、108、110、112中發生的程式碼產生。一或多個性質指定但不限於以下中之一或多者:用於單元206中之各者的欄位名稱、儲存於單元206中之資料的類型,及單元206中之資料是用於用戶端上還是伺服器上。舉例而言,行「Example_Float」下方之單元具有四個性質:序列化資料物件的唯一識別符的規格(「ID」),其是單元中之資料所屬於的;儲存於單元中之資料之名稱的規格(「Example_Float」),其亦提供向其指派單元中之資料之序列化資料物件的屬性之名稱(參見圖5中之508、圖6中之608及圖7中之708);儲存於單元中之資料之類型之規格(「float」),其在此情況下是浮點資料類型;及儲存於單元中之資料之範圍之規格(「兩者」),其在此情況下指示其用於伺服器或用戶端。類似地,行「Example_Vector2」下方之所有單元具有五個性質:序列化資料物件之唯一識別符的規格(「ID」),其是單元中之資料所屬於的;儲存於單元中之資料之名稱的規格(「Example_Vector2」),其亦提供向其指派單元中之資料之序列化資料物件之屬性的名稱(參見圖5中之510、圖6中之610);儲存於單元中之資料的類型之規格(「Vector2」),其在此是二維陣列;儲存於單元中之資料之範圍的規格(「用戶端」),其在此情況下是指示其僅用於用戶端;及無效檢查是否經執行以判定單元是否需要儲存資料的規格(「IsNullOrEmpty」),其在此情況下是針對落入列「Example_Vector2」下方之單元執行。
表202中之外部資料在根據由索引204界定之結構組織外部資料時被認為是有效地配置。對於圖2A之試算表200,結構如下。第一列指定在其行下方之單元中之資料的欄位名稱。第二列指定儲存於其行下方之單元中之資料的類型。第三列指定儲存於其行下方之單元中之資料的範圍,此係由於一些欄位名稱僅供用戶端使用,而其他僅供伺服器使用以用於記憶體最佳化。第四列提供一種手段,其指定可施加測試條件,以檢查儲存於其行下方之單元中之資料是否有效地組態。試算表200中所說明之測試條件為無效檢查(「IsNullOrEmpty」)。然而,其他測試條件(未展示)可指定諸如但不限於:相對於單元206定義之資料類型是否在單元206中存在資料類型匹配(例如,若第二列指定資料類型為整數,則檢驗單元206中之資料實際上為整數類型,且並非浮點類型或字串類型),以及相關單元206中之一或多者中之資料之間是否存在一致性,當這些一或多個相關單元需要定義遊戲物件之屬性時可適用(例如,若一個單元206中之資料指示玩家角色之性別為女性,則隨後測試一或多個相關單元206中之資料是否亦含有支援指示性別之資料,諸如女性名稱)。The external data in table 202 are considered valid configurations when the external data are organized according to the structure defined by
應瞭解,取決於索引204之內容,其他結構為可能的。圖2B展示另一試算表250(歸因於空間限制被展示為兩半)。如圖2A之試算表250,試算表250具有一表252,其包含組織於單元256中之外部資料。試算表250亦含有隨附表252之一索引254。索引254經由陳述所儲存資料之一或多個性質258,定義儲存於表252中之單元256中之各者中的資料。索引254因此界定試算表250之資料結構,由此外部資料經配置以在試算表250之組態期間跟隨資料結構。It should be appreciated that other structures are possible depending on the content of the
試算表250之索引254與試算表250之索引250共用相似定義,諸如定義腳本(script)特定陣列(key enum Color)、整數、字串、布林(Boolean)及浮點資料類型的存在。然而,試算表250之索引254亦定義具有多個資料集之一陣列(針對特別地識別為「2」之條目參見260A及260B)。當在106步驟中剖析試算表250時,由平台產生之程式碼經由參考索引254辨別行「Example_Class_Array」下方之各單元為具有多個資料集260A及260B之一陣列,且提取所有資料集。相反,現有方法僅提取第一資料集,但並非兩者。平台隨後標記各經提取資料集260A及260B,以用於分配為最終輸出之序列化資料物件之屬性。以此方式,行「Example_Class_Array」下方之各單元可產生序列化資料物件之多於一個屬性。
返回至圖1,執行步驟106、108、110、112及114之平台可為單一電腦伺服器或若干電腦伺服器,其具有至少一個記憶體以儲存影響程式碼之產生的指令,該程式碼自含於試算表中之外部資料創造序列化資料物件;以及具有執行指令之一或多個處理器。Returning to Fig. 1, the platform for performing
在步驟106中,平台產生用以剖析試算表200之程式碼300,圖3中所示。片段302為C#索引器,其用以使用其各別欄位名稱識別單元206。片段304在運行時間中創造映射以加速識別單元206。所產生之程式碼300分析表202以識別儲存於單元206中之各者中之資料的類型,以判定經識別資料類型是否為可剖析的。存在於表202中不同資料類型經由參考隨附表202之索引204識別。所產生之程式碼300經組態以區分提供資料定義之索引204與包含外部資料之表202。舉例而言,可存在可執行陳述,其闡明索引204之位置及試算表200中之表202之位置。如先前所提及,索引204經由陳述所儲存資料之一或多個性質208,定義儲存於表202中之單元206中之各者中的資料。參考索引204之第二列,此係由於其指定儲存於單元206中之不同資料類型。In
在圖2A中所展示之方法,所產生之程式碼300支援基本資料類型,諸如整數(int)、字串(string)、浮點(float)及布林(bool)。亦支援通常用於軟體遊戲引擎中之訂製資料類型,諸如「vector2」(二維陣列)、「Vector3」(三維陣列)及腳本特定陣列(例如,「enum Gender」、「class User」及「repeated int」)。儲存於單元中之各者中之資料的資料類型亦反映於資料單元中之各者所選擇之欄位名稱中,其中欄位名稱在序列化資料物件創造(稍後在步驟106中論述)期間調用,或在外部資料匯入期間由遊戲中資料物件調用。In the method shown in FIG. 2A , the generated
除判定表202中之經識別資料類型是否為可剖析的之外,結合索引204對表202內容執行之另一分析如以下。各單元206中之資料可相對於發現於索引204中之其各別一或多個性質208而被分析有效性。舉例而言,若性質208中之一者指定單元206中之資料為陣列資料類型,則隨後儲存不同資料類型(例如,整數)之單元206具有無效資料。可對儲存資料所需之單元206執行無效檢查,用於偵測空白(亦即,單元206是否實際上儲存資料)。亦可存在檢查重複欄位名稱。可回應於這些分析返回的非順應性之結果中之任一者而輸出錯誤訊息,諸如在無效檢查期間偵測空白單元206,或經識別資料類型判定為不可剖析的。在一個實施中,這些分析中之任何一或多者之非順應性之結果的返回可防止試算表200在步驟106中被剖析。替代地,這些分析可在工作流程100之後部分處完成,諸如在步驟118中。In addition to determining whether an identified data type in table 202 is parseable, another analysis performed on the contents of table 202 in conjunction with
若試算表200可在步驟106中剖析,則平台在步驟108中產生圖4中所展示之另一程式碼400。在步驟110中編譯另一程式碼400引起步驟112中之資料序列化。這些步驟108、110及112如以下更詳細地描述。另一程式碼400將不同資料類型402組合為序列化資料物件,從而提供序列化資料物件其屬性,且提供序列化資料物件之唯一識別符404。另一程式碼400藉由調用其各別欄位名稱406、408、410、412、414、416、418及420組合不同資料類型402。應注意儘管「string」、「int」、「bool」、「float」、「Vector2」、「Vector3」、「enum Gender」、「class User」及「repeated int」為圖2A中所展示之不同資料類型,圖4之另一程式碼400用於創造具有這些不同資料類型之子集的序列化資料物件,即「string」、「int」、「float」、「Vector2」、「Vector3」、「enum Gender」、「class User」及「repeated int」。在產生另一程式碼400期間,分析索引204以判定用作序列化資料物件之屬性之不同資料類型的組合。If the
此另一程式碼400在經編譯時隨後輸出此類序列化資料物件(參見圖5中之522及524;參見圖6中之622及624;及圖7中之722及724)中之至少一或多者,其中儲存於表202之各單元206中之資料被指派給序列化資料物件(522、524;622、624;及722、724)之屬性(參見圖5中之508、510、512、514、515及518;圖6中之608、610、612、614、616及618;及圖7中之708、714、716及718)。序列化資料物件之屬性中之各者的名稱,係自為那屬性提供資料之單元206的欄位名稱獲得。This
編譯另一程式碼400在步驟114中導致以匯出格式(諸如但不限於,JSON、可編寫腳本的物件或CSV)輸出序列化資料物件。舉例而言,自組態檔案擷取匯出格式。在一個實施中,組態檔案可置放於儲存試算表200之同一資料夾中。Compiling the
作為實例,組態檔案具有以下行:
SERVER_LANGUAGE=GO
CLIENT_LANGUAGE=C#
FORMAT=ScriptableObject
SERVER_FORMAT=CSV
CLIENT_FORMAT=ScriptableObject
自讀取組態檔案,告知平台GO程式碼將用於伺服器,且C#程式碼將用於用戶端。以此方式,由平台產生之程式碼可調適用於伺服器或用戶端之輸出序列化資料物件。此組態檔案亦告知平台序列化資料物件將以可編寫腳本的物件格式匯出。其他所要匯出格式(諸如JSON或CSV)藉由相應地改變FORMAT行且重新載入試算表200來獲得。以所有所要匯出格式創造序列化資料物件之一種方法為具有多個試算表200及組態檔案對,其中組態檔案中之各者指示FORMAT行之所要匯出格式中之一者。應瞭解,組態檔案可具有列出其他可能程式語言匯出格式之額外行。
As an example, the configuration file has the following lines:
SERVER_LANGUAGE=GO
CLIENT_LANGUAGE=C#
FORMAT=ScriptableObject
SERVER_FORMAT=CSV
CLIENT_FORMAT=ScriptableObject
Self-read the configuration file, tell the platform that the GO code will be used for the server, and the C# code will be used for the client. In this way, the code generated by the platform can be adapted to output serialized data objects on the server or client side. This configuration file also tells the platform that serialized data objects will be exported in a scriptable object format. Other desired export formats, such as JSON or CSV, are obtained by changing the FORMAT line accordingly and reloading the
在步驟114中輸出序列化資料物件之後,可在步驟116中對序列化資料物件中之資料執行一或多個有效性檢查。舉例而言,序列化資料物件可經檢查以判定其屬性中之一或多者是否為空,例如,「實例_字串」欄位是否為空;或是否存在不匹配資料,諸如「實例_類別」欄位之資料類型是否校正。另外,替代地更早描述之將在步驟106中完成之分析中之一或多者可替代地在步驟116中完成。這些包括無效檢查及重複欄位名稱檢查。在步驟116中執行這些檢查有利於允許在將序列化資料物件匯入至步驟118中之軟體遊戲引擎中之前,修復缺陷以減小故障處理。After outputting the serialized data object in
在步驟118中,將來自步驟114之序列化資料物件匯入至軟體遊戲引擎中。軟體遊戲引擎在運行遊戲時用所產生之程式碼反序列化遊戲中之這些序列化資料物件。In
圖8展示管理試算表之擷取之平台所產生之程式碼。所產生之程式碼允許接收包含表202之名稱的搜尋字串,該搜尋字串用以自保存於一或多個文件夾中之複數個表定位表202。以此方式,遊戲開發者可輕易地定位含有表202之試算表200。Figure 8 shows the code generated by the platform that manages the retrieval of spreadsheets. The generated code allows receiving a search string including the name of the table 202 for locating the table 202 from a plurality of tables stored in one or more folders. In this way, a game developer can easily locate the
返回至圖1,平台經由步驟106、108、110、112及114執行用於自外部資料創造序列化資料物件之方法。方法查看產生程式碼300之平台,以分析包含組織於單元206中之外部資料的表202,以識別儲存於各單元206中之資料的類型,以判定經識別資料類型是否為可剖析的。平台隨後回應於經識別資料類型為可剖析的而產生另一程式碼400,該另一程式碼400在經編譯時輸出至少一個序列化資料物件(522、524;622、624;及722、724),其中儲存於表之各單元中之資料被指派給序列化資料物件(522、524;622、624;及722、724)的屬性。最後,平台擷取序列化資料物件(522、524;622、624;及722、724)之匯出格式,且編譯所產生之另一程式碼400以呈經擷取匯出格式輸出序列化資料物件(522、524;622、624;及722、724)。Returning to FIG. 1 , the platform executes the method for creating serialized data objects from external data via
步驟102及104亦可為執行以自外部資料創造序列化資料物件的平台之方法的部分。亦即,該方法進一步包含組態試算表200,即根據隨附表202之索引204將外部資料組織至單元206中,該索引204經由陳述所儲存資料之一或多個性質定義儲存於表202中之單元206中之各者中的資料。一或多個性質而指定但不限於以下中之一或多者:用於單元206中之各者的欄位名稱、儲存於單元206中之資料的類型,及單元206中之資料是用於用戶端上還是伺服器上。所產生之程式碼300經組態以區分提供資料定義之索引204與包含外部資料之表202。
由平台執行以自外部資料創造序列化資料物件之方法亦可執行以下動作中之一或多者。Methods implemented by the platform to create serialized data objects from external data may also perform one or more of the following actions.
當產生用以創造序列化資料物件(522、524;622、624;及722、724)的該另一程式碼400時分析索引204,以判定用作序列化資料物件之屬性的不同資料類型之一組合。When generating the
當分析表202以判定經識別資料類型是否為可剖析時,執行以下各者中之一或多者:判定各單元206中之資料相對於定義於隨附表202之索引204中之其各別一或多個性質的有效性;儲存資料所需之單元206的無效檢查,和回應於偵測空白而產生錯誤訊息;及重複欄位名稱之檢查。可回應於經識別資料類型被判定為不可剖析的而產生錯誤訊息。When analyzing table 202 to determine whether an identified data type is parsable, one or more of the following is performed: determining the data in each
當處理含有多個資料集之表202中之一單元206時,將其中之各者指派給序列化資料物件(522、524;622、624;及722、724)的屬性。When processing a
當定位表202以用於自多個表分析時,接收包含表之名稱的搜尋字串。When locating table 202 for analysis from multiple tables, a search string is received that includes the name of the table.
調適用於伺服器或用戶端之輸出序列化資料物件(522、524;622、624;及722、724)。Adapted to output serialized data objects on the server or client side (522, 524; 622, 624; and 722, 724).
序列化資料物件(522、524;622、624;及722、724)之屬性中之各者的名稱係自為那屬性提供資料之單元206之欄位名稱獲得。屬性包括序列化資料物件之唯一識別符。匯出格式可為但不限於JSON、可編寫腳本的物件、CSV中之一者。The name of each of the attributes of the serialized data object (522, 524; 622, 624; and 722, 724) is obtained from the field name of the
所產生之程式碼300經設計以剖析之資料類型包含基本資料類型及供軟體遊戲引擎使用之訂製資料類型。基本資料類型包括整數、字串、浮點及布林中之任何一或多者。訂製資料類型包括以下中之任何一或多者:二維及三維向量且為腳本特定的。The data types that the generated
以上因此揭示一平台,其有利地自動化將被外部資料轉換為遊戲中資料物件,減少人類工作負載及誤差,及改良工作效率。支援各種外部資料格式、供軟體遊戲引擎使用之資料物件的串行化方法、及所產生之程式碼之語言類型。The above thus reveals a platform that advantageously automates the conversion of external data into in-game data objects, reducing human workload and errors, and improving work efficiency. Supports various external data formats, serialization methods for data objects used by software game engines, and language types of generated code.
在本申請案中,除非另外規定,否則術語「包含(comprising)」、「包含(comprise)」及其文法變體意欲表示「開放」或「包括性」語言,使得其包括列舉之元素但亦准許包括額外,非明確列舉之元素。In this application, unless otherwise specified, the terms "comprising," "comprise," and grammatical variants thereof are intended to mean "open" or "inclusive" language such that it includes the listed elements but also Permitted to include additional, not expressly listed elements.
雖然已參考例示性具體實例描述本發明,但所屬領域中具通常知識者將理解,在不脫離本發明之範疇的情況下,可作出各種改變,且均等物可取代其元素。另外,在不脫離本發明之基本範疇之情況下,可進行許多修改以使本發明之教示適應特定情形。因此,本發明不限於揭示於本說明書中之特定實例,而涵蓋落入所附申請專利範圍之範疇內的所有具體實例。While the invention has been described with reference to illustrative specific examples, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the invention. In addition, many modifications may be made to adapt the teachings of the invention to a particular situation without departing from the essential scope of the invention. Therefore, the present invention is not limited to the specific examples disclosed in this specification, but covers all the specific examples falling within the scope of the attached claims.
100:工作流程
102:步驟
104:步驟
106:步驟
108:步驟
110:步驟
112:步驟
114:步驟
116:步驟
118:步驟
200:試算表
202:表
204:索引
206:單元
208:一或多個性質
250:試算表
252:表
254:索引
256:單元
258:一或多個性質
260A:資料集
260B:資料集
300:程式碼
302:片段
304:片段
400:程式碼
402:資料類型
404:識別符
406:欄位名稱
408:欄位名稱
410:欄位名稱
412:欄位名稱
414:欄位名稱
416:欄位名稱
418:欄位名稱
420:欄位名稱
508:屬性
510:屬性
512:屬性
514:屬性
515:屬性
518:屬性
522:序列化資料物件
524:序列化資料物件
608:屬性
610:屬性
612:屬性
614:屬性
616:屬性
618:屬性
622:序列化資料物件
624:序列化資料物件
708:屬性
714:屬性
716:屬性
718:屬性
722:序列化資料物件
724:序列化資料物件
100: Workflow
102: Step
104: Step
106: Step
108: Step
110: Steps
112: Step
114: Step
116: Step
118: Step
200: Spreadsheet
202: table
204: index
206: unit
208: One or more properties
250: Spreadsheet
252: table
254: index
256: unit
258: One or
本文參考隨附圖式僅作為實例來描述本發明之代表性具體實例,其中:Representative embodiments of the invention are described herein, by way of example only, with reference to the accompanying drawings, in which:
[圖1]展示將外部資料匯入至軟體遊戲引擎中之工作流程。[Figure 1] shows the workflow of importing external data into the software game engine.
[圖2A]展示在圖1之工作流程期間剖析的試算表。[ FIG. 2A ] Shows the spreadsheet parsed during the workflow of FIG. 1 .
[圖2B]展示亦可使用圖1之工作流程剖析之另一試算表。[FIG. 2B] Another spreadsheet showing that the workflow analysis of FIG. 1 can also be used.
[圖3]展示在圖1之工作流程期間產生之用以剖析圖2A之試算表的程式碼。[FIG. 3] Shows the code generated during the workflow of FIG. 1 to parse the spreadsheet of FIG. 2A.
[圖4]展示在圖1之工作流程期間產生之用以輸出序列化資料物件之程式碼。[FIG. 4] Shows the code generated during the workflow of FIG. 1 to output serialized data objects.
[圖5]展示由圖4之所產生之程式碼輸出之呈可編寫腳本的物件(scriptable object)格式的序列化資料物件。[FIG. 5] shows serialized data objects in scriptable object format output by the generated code of FIG. 4.
[圖6]展示由圖4之所產生之程式碼輸出之呈JSON格式的序列化資料物件。[FIG. 6] shows serialized data objects in JSON format output by the generated code of FIG. 4.
[圖7]展示由圖4之所產生之程式碼輸出之呈CSV格式的序列化資料物件。[FIG. 7] shows serialized data objects in CSV format output by the generated code of FIG. 4.
[圖8]展示管理用以含有外部資料之試算表之擷取的平台所產生之程式碼。[FIG. 8] Shows the code generated by the platform that manages the retrieval of spreadsheets containing external data.
100:工作流程 100: Workflow
102:步驟 102: Step
104:步驟 104: Step
106:步驟 106: Step
108:步驟 108: Step
110:步驟 110: Steps
112:步驟 112: Step
114:步驟 114: Step
116:步驟 116: Step
118:步驟 118: Step
Claims (20)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SG10202107261Q | 2021-07-01 | ||
SG10202107261Q | 2021-07-01 |
Publications (1)
Publication Number | Publication Date |
---|---|
TW202318221A true TW202318221A (en) | 2023-05-01 |
Family
ID=84706493
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW111124610A TW202318221A (en) | 2021-07-01 | 2022-06-30 | Platform to automate creation of serialised data objects for import into a game engine |
Country Status (2)
Country | Link |
---|---|
TW (1) | TW202318221A (en) |
WO (1) | WO2023277821A1 (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110119423A (en) * | 2019-05-17 | 2019-08-13 | 厦门商集网络科技有限责任公司 | A kind of data analysis method and computer readable storage medium of configurableization |
US20210149553A1 (en) * | 2019-11-18 | 2021-05-20 | Monday.Com | Digital processing systems and methods for real-time resource and capacity allocation in collaborative work systems |
CN111209736A (en) * | 2020-01-03 | 2020-05-29 | 恩亿科(北京)数据科技有限公司 | Text file analysis method and device, computer equipment and storage medium |
CN112579679B (en) * | 2020-12-15 | 2024-05-28 | 北京动力机械研究所 | Method and device for designing heterogeneous data model mapping strategy and automatic conversion |
-
2022
- 2022-06-30 WO PCT/SG2022/050459 patent/WO2023277821A1/en active Application Filing
- 2022-06-30 TW TW111124610A patent/TW202318221A/en unknown
Also Published As
Publication number | Publication date |
---|---|
WO2023277821A1 (en) | 2023-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Gil et al. | Micro patterns in Java code | |
Nentwich et al. | Flexible consistency checking | |
US9965259B2 (en) | System for translating diverse programming languages | |
US8332828B2 (en) | System for translating diverse programming languages | |
US9086931B2 (en) | System for translating diverse programming languages | |
US7634515B2 (en) | Data model and schema evolution | |
US7318215B1 (en) | Stored procedure interface language and tools | |
US8656372B2 (en) | System for translating diverse programming languages | |
Sneed | Migrating from COBOL to Java | |
GB2359157A (en) | Extensible Markup Language (XML) server pages having custom Document Object Model (DOM) tags | |
Chillón et al. | A model-driven approach to generate schemas for object-document mappers | |
US7752212B2 (en) | Orthogonal Integration of de-serialization into an interpretive validating XML parser | |
US20090182689A1 (en) | Rule-based dynamic operation evaluation | |
US20110197178A1 (en) | Architecture, system, and method for providing hover help support for c++ application source code | |
US8091069B2 (en) | Module specification language and meta-module | |
Steel et al. | Model-based test driven development of the tefkat model-transformation engine | |
Bossung et al. | Automated data mapping specification via schema heuristics and user interaction | |
Fritzson et al. | Meta-programming and language modeling with MetaModelica 1.0 | |
Findler et al. | Lazy contract checking for immutable data structures | |
TW202318221A (en) | Platform to automate creation of serialised data objects for import into a game engine | |
Simic et al. | Prospects of encoding Java source code in XML | |
Späth | Learn Kotlin for Android Development | |
Lopez-Rojas | OMCCp: A MetaModelica Based Parser Generator Applied to Modelica | |
Cepa | Product-line development for mobile device applications with attribute supported containers | |
Ornaghi et al. | A constructive object oriented modeling language for information systems |