Tell me, please, is there a subject in nature? Interested in languages ​​for describing (perhaps virtual) reality, as versatile and compact as possible, allowing to describe objects, phenomena, concepts, etc. Roughly speaking, they allow stuffing a little world / map / location with mobs-rivers-trees into the database and so on, sufficient for its construction by the game engine, subject to the availability of appropriate methods in it.

If there are none, any research experiments on this topic will do.

UPDATE

Since they don’t understand me, I’m clarifying that the label is here because people from this sphere were most likely interested in this, I don’t need a subject for developing a game (for now at least). A very formal analogue of Wikipedia would be quite cool. Condition: text, human-readable format.

You don’t need dimensions / object models (because to some two-dimensional engine a la supermario these are your tri-de, gradients and alpha channels by the side). Just common properties:

  • distortion / coordinates / color for the landscape;

  • size / hit points / max. speed / behavior model ("calm" / "aggressive" / "corpse" type) `for mobs;

  • some characteristics of the player (s).

  • It seems that by "universal" the author means "natural", i.e. human language. Universal can be called any turing-complete and with the search for such problems usually do not. - Nick Volynkin
  • @NickVolynkin doubt it. It reminds me more of logic programming , ideological. The properties of the result are set, and the system displays it, guided by the described rules. - D-side
  • @ D-side yes, very similar. - Nick Volynkin


4 answers 4

There are a lot of them. each system has its own, but there is no “universal” yet. But there is a lot of editors of maps and locations)

Google "game engines" and see gamedev.ru

A programming language for game development.

  • one
    I put a plus sign, but: programming languages ​​do not interest me in this case, I need something more abstract. As I imagine (perhaps incorrectly) - a class tree with links to definitions for a la wikipedia. Clarify: the difficulty is to write in the database abstract information about the location, not focusing on the game engine , but sufficient to recreate the location with two different game engines (for example, the fallout and Q3 engines). - Sh4dow
  • > not focusing on the game engine, but enough to recreate the location with two different game engines I think that in general it is impossible. There is gravity in one game, not in another. In one, some properties of objects are measured in some units, in another - in other units. Moreover, the same property in one game can break up into several different properties in another ... Well, or take the same types of mobs and gear. Imagine Diablo II or III. Mobs and things are generated every time with a new set of properties, but their number is limited. - gecube pm
  • @gecube, this is about one game and different engines) You can transfer the unreal tournament to the Spectrum (yes, it will be scary with wild restrictions and squares, but a fact), you can gash the same supermario into the atmosphere of Q3. That's actually looking for a language that will allow it. PS: automatic parsing with compilation of text-> the game was not meant, by the way. Parse the text (with eyes) -> make models / skins / animation -> create the necessary classes / methods in the desired language -> feed the engine. - Sh4dow
  • Do not confuse warm with soft. UT on the Spectrum can theoretically be transferred one-to-one, the graph will be poor, it will slow down ... But it will work. This is porting. Given the limitations and / or capabilities of the platform. But to translate the supermario to the Q3 engine in general, basically go. The engines are different. Physics. Well, you draw a model of Mario heroes in Q3 and then what? My offer remains valid. A set of XML files with selected parameters (tags) of objects. - gecube
  • PS if it is necessary for a person, and not for a computer, what prevents it from writing as text in natural language? Like any specification, TK. - gecube pm

The task, if I understood correctly, degenerates into a simple format search for storing the scene. Since what you define as "the world" - in the simplest case, it is a collection of such scenes, the concepts of "location" and "map" are quite self-assembled by the term "scene".

It is clear that this is so if we take the scripting, the behavior of objects, their Interaction and AI, beyond the boundaries of the question.


And then the task is to simply pick up and choose a convenient format for storing this scene. Personally, I like, for example, the Maya format. Many engines in order to keep the development pipeline as simple and transparent as possible simply contain converters from this format to some kind of internal format that may be more optimal in terms of load time and compression.

You can also look towards Collada and generally similar formats.

It is also clear that inventing a one-to-one mapping for an arbitrary taken scene format on a certain database is also not the most difficult (although, probably, not very trivial) task.


  • Again, not quite that - see the update. I repeat: the text, the same suitability for 2D and 3D, a tree structure. Something like this. - Sh4dow
  • @ Sh4dow, what's the goal? If the goal is to make for the future some kind of base for your projects, where everything will be described, then you need to choose the format yourself and what is the necessary information. I would personally use text-based XML files located in a directory tree. - gecube pm

Judging by the text of the question, the question is rather from the field of expert systems and knowledge bases, so it is worth looking in the direction of the knowledge representation / language structures:

  1. mainstream OOP, built into your working compiler - it's strange why it doesn't work. If you want to download from a human-readable text format ( DSL language ) in runtime, use a parser for flex / bison or ANTLR, which forms in your case a description of the world or area of ​​knowledge, or, for example, the initial state of the game. The syntax is arbitrary, whatever you want. The parser during operation ( syntactically controlled translation ) pulls constructors that add objects to the scene. As you try out a method, you will most likely add activity to objects — for example, event handlers that are defined as a list of calls to built-in functions. Advantage of the approach: the engine is decoupled from a specific implementation of the game (you can even drag HTTP from the game server as a stream .txt.gz), the description syntax is arbitrary, and nothing slows down, because after loading and creating all the objects, their behavior is processed by the engine in machine code.
  2. ontologies and semantic networks , in particular, the Semantic web and RDF / OWL languages, will most likely need to be expanded with their types and libraries must be selected to process these descriptions. Descriptions are specified in the XML markup, a parser and editor are included in the libraries. Difficult in understanding (conceptually), XML syntax is difficult for manual editing, it is not applicable in runtime for games and real-time applications - only code generation in compiled languages, or other slow processing.
  3. Minsky frames - have an internal active nature, look for implementations of interpreters (output machines), ideally build a system that will generate static code in your working programming language from an abstract description, with the generation itself described by a separate set of frames. If you add a car to Minsky in a game engine, you can also implement AI on it. Then, instead of broadcasting, you will need to render certain frames via DirectX / OpenGL and input events from game controllers. The parser is probably yours. The approach and toolkit are little known, when used in runtime games and real-time AI can be unacceptably inhibitory. It is dangerous - instead of a game, you can accidentally write an expert system.
  4. Try to describe the class tree in Python, and implement a translator to your language, Python (or Java) supports reflection, so you can programmatically process descriptions of classes, methods, and generate code in the desired language. If Python doesn't like syntactically, you can use PLY . It is possible not only code generation, but also dynamic creation of classes, objects, methods and data structures.
  5. in the worst case, you will have to write your own dimeric DSL language that allows you to describe classes of objects and their relationships, generating code offline in the working language (java / C ++ / ..) or working entirely in runtime inside the (game) engine. There are no special limitations on speed if you apply dynamic bytecode generation (JVM) and / or JIT compilation (LLVM). Very dangerous - you can accidentally become a compiler programmer, or make Skynet blind

    how can ... describe objects, phenomena, concepts, etc. ... in the database

    In my opinion, Graph databases are ideal for this. The graph has nodes (vertices), edges and properties . Three of these entities allow you to formally describe any objects, their relationships and characteristics.

    For example, there are objects Player , Mob , NPC and others. The links between them can be as follows:

    Mob (node) attacks (edge) on the Player (node) in sight. The mob has 500 points of health (property), the type of attack is near (property), the impact force is 50 (property), it sees by 50 meters (property), etc.

    The player can attack (edge) on Moba . The player can communicate (edge) with the NPC . The player has 300 health points. The player can learn (edge) spells (node). The player has 10 gold units (property).

    NPC gives tasks (edge) to the player . NPC is invulnerable (property). The player can perform (edge) tasks (node).