Saturday, August 12, 2023

Standard Map Script

 One of the main thing missing in game development is a standard map design language. like CSS have done to web page development. We missing one for game development.

Lets look at it to analise rationaly:

Game development start around 1970 so we have what? Like 50 years of game development. If we have start to desing the maps in a standard language or script. Your game done in 70's could be working today width minimal efford. The engine it self does not matter because you can translate the map script to any language. Is a script that works outside of the language. So from the 70s up today how many engines have come out and languages many?  We have several examples of old languages like C and Assembly and more recent examples like Rust and Python:

  • -Python
  • -C++
  • -C
  • -C#
  • Java
  • Assembly
  • Rust
  • etc... 

 All this languages can communicate width a map scripting language. what this allow :

  • You can keep developing your game even if a new engine come out.
  • Can design width out the need to program.
  • If your computer is broken often this engines are large and consume a lot of resurces. You can go to a public computer or a friend house to keep development width out installing any thing. 
  • Only a friend have a paid license of the softwarea and it cost a lot.
  • Need to change the programing language.
  • You can design just width a map editor width out the need of the game engine.
These reasons are more then enought to consider using a standard map scripting.

We have many generic rules but some rules that i created are done to resume or remove redudancy out of the code like clone and object. This ensure that the amount of text is small. We have also basic ations like position and size.

A simplified list:

  • Clone -
  • Object -
  • position - 0.100.0
  • extension - fbx
  • size - 200.20
  • direction - north
  • Type - texture
  • property - hidden

Generic map settings  examples :

  • Extension - fbx

Generic atributes can be inherit. Like if you declare a extension at general settings it assume all files are fbx unless it is redeclared again like CSS. Files structures to include to all of your map files. like :  creatures, weapons, items,.Since all maps use creatures weapons and items. Theres no need to repeat the calling of these items in all map files.

  • Folder - data
  • size - 200\20
  • group - base 1
  • width - 400
  • height - 400
  • deep - 2000
  • background - black
  • sky - clouds
  • terrain - heigh map
  • gravity - yes
  • include - creatures, weapons, items,
  • Version - 1.0
  • type - 3d


If we define things like background color inside the script it make it easy to convert this things later in programming.
  • background - black

Atribute Examples :

Object   :  If a object is designed to a 3d model is treated like a identity. Which we can spwan in several diferent locations. In this case we created 4 objects. width 4 diferent locations we could also add difernt sizes but since they are the same only need to declare once.

name - tower
position - 0.100.0 , 0.100.0 , 0.100.0 , 0.100.0 ,
size - 100.20
objects - 4

Clone  :  Allow to repeat the same model to creat other effects. like a several layer building.

name - 3 level building 
position - 0.100.0
size - 100
clone - 3
direction - up

Object + Clone  :  Clone the 3 layers and repeated the building in 2 diferent locations


name -3 levels building 
position - 0.100.0,  0.400.0 ,
size - 100
clone - 3
direction - up
objects - 2

And more complex things still analizing like we could add curves and random

hi

Rules

Rules, Steps & methods This is the current way to implement and be implemented but there could be more things to add : Root or loader  (...