User Tools

Site Tools


technical_faq

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
technical_faq [2023/07/05 16:26] – ↷ Page moved from utils:technical_faq to technical_faq Karsten75technical_faq [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Technical FAQ ====== ====== Technical FAQ ======
  
-  : Often technical questions regarding programming techniques, data structures, optimization and other questions that are not specifically game-related are asked of Knuckle Cracker. This is a collation of answers to those questions, in the event (hopefully) these answers are useful to others as well. \\ \\+Often technical questions regarding programming techniques, data structures, optimization and other questions that are not specifically game-related are asked of Knuckle Cracker. This is a collation of answers to those questions, in the event (hopefully) these answers are useful to others as well. 
  
-  ? What data structures and rendering methods are used for terrain rendering in CW4   +  ?  IXE: Why Pixel graphics? ((https://steamcommunity.com/app/2257010/discussions/0/3812908123792963375/?tscn=1688808966)) 
 +  : For IXE, I wanted to explore adding additional simulations to the game that would work in conjunction with the creeper, and I wanted the terrain to be simulated at the most basic unit. Work backwards from the computational capabilities of current home computers running multi-threaded SIMD compiled code, and you get a "pixel" scale that you see in IXE. I'm not just drawing pixelated terrain because I like the way it looks. It is pixilated because every pixel is being physics simulated 30 or more times per second, across the entire map. That is true for terrain, creeper, and even for ship movement when they are in flight. 
 + 
 +  :: Pixel graphics are not just an artistic choice for this game. They are a technical choice to get to the game play I want to explore. If computers were 16x faster, the pixels you see in IXE would be 1/4 their current size. 
 + 
 +  :: So nobody is required to like it, even if this is the reason. Folks like what they like and everybody wants from games something slightly, or majorly, different from others. I'm not trying to convince anybody to like these choices, and I respect everyone's opinions. I say all of this only so that anyone who wonders "why pixels when the last game was 3D", has an answer. 
 + 
 +  :: As a footnote, the creeper and terrain simulators in this game are the fastest, most advanced, most multithreaded, and most efficient... by a healthy margin, in any game I have made. It may look like the 1980s, but it's code, algorithms, and engine are definitely 2020s. 
 + 
 +  ? CW4: What data structures and rendering methods are used for terrain rendering? ((https://discord.com/channels/192420539204239361/800056943116025888/1126149960795177010))   
  
   : The terrain is held internally as a flattened 2D array (a single dimensional array treated as 2D data). Each position in the array represents a height, essentially creating a basic height map. The game dynamically generates a mesh for the terrain, where the points/vertices form a grid. Each set of 4 vertices is connected by a pair of triangles. The cutting direction of the triangles (top-left to bottom-right or bottom-left to top-right) is dynamically determined based on the shortest 3D distance. This is a common way to represent a 2D height map as a 3D mesh.   : The terrain is held internally as a flattened 2D array (a single dimensional array treated as 2D data). Each position in the array represents a height, essentially creating a basic height map. The game dynamically generates a mesh for the terrain, where the points/vertices form a grid. Each set of 4 vertices is connected by a pair of triangles. The cutting direction of the triangles (top-left to bottom-right or bottom-left to top-right) is dynamically determined based on the shortest 3D distance. This is a common way to represent a 2D height map as a 3D mesh.
technical_faq.1688574369.txt.gz · Last modified: 2025/02/14 14:56 (external edit)