Map Element Adding Method Using Prefab System
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The development of maps in games is labor-intensive due to complex code requirements and low development efficiency, resulting in high complexity and low productivity.
Innovation Solution
A method and apparatus for adding map elements using a map layer manager module and base map view module, which encapsulates classes for implementing maps, allowing map elements to be created based on existing classes, reducing development complexity and improving efficiency by using a prefab system, texture cropping, and optimized display updates.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If complex code writing is used to implement display settings of each map element, then the map function can be provided, but development efficiency decreases and development complexity increases
Solution Approach 1:
The map system is segmented into independent modules: base map view module, map layer manager module, and map element modules. Each module has specific responsibilities (display management, layer coordination, element rendering), allowing parallel development and reducing complexity while maintaining full map functionality
Solution Approach 2:
The base map view module and map layer manager module serve as universal foundations that support multiple types of map elements (characters, items, monsters, etc.). These modules provide common functionalities like display state management, coordinate conversion, and rendering that work across all map element types, eliminating the need to rewrite code for each new element
2Reliability
If complex code writing is used to implement display logic of map elements, then the map function can be provided, but development complexity increases
Solution Approach 1:
Display logic is segmented and encapsulated within individual map element classes rather than being scattered throughout the codebase. Each element type has its own rendering logic, making the system easier to understand, modify, and extend without increasing overall complexity
Solution Approach 2:
The map layer manager module acts as an intermediary between the base map view module and various map element modules. It handles coordinate conversions, manages display states, and coordinates rendering operations, thereby simplifying the interface between components and reducing the complexity of direct interactions
3Reliability
If traditional map implementation methods are used, then map elements can be displayed, but development time increases due to labor-intensive work
Solution Approach 1:
The base map view module and map layer manager module are prepared in advance with all necessary display management functionalities, coordinate systems, and rendering pipelines. This preliminary setup eliminates the need to implement these foundational components repeatedly when adding new map elements, significantly reducing development time
Solution Approach 2:
Map elements are implemented as reusable classes that can be instantiated multiple times with different parameters. Once a map element class is created, it can be copied and customized for different elements (e.g., different character types, item categories) without rewriting the core display logic, thereby accelerating development
Data Source
Figure 1~2
Figure 3~4
Figure 5~6
AI summary
A map element adding method, a device, a terminal, and a storage medium, related to the technical field of computers. The method provides a novel open framework, and by packaging in advance some types required for map implementation into corresponding modules, facilitates creation on the basis of the types in the existing modules when adding a map element, thus increasing development efficiency, and reducing the complexity of development.