tutorial documentation
This commit is contained in:
@@ -1,20 +1,29 @@
|
||||
# Getting Started
|
||||
# Preface: The Prosperon Manifesto
|
||||
|
||||
Prosperon is based around a Javascript-like language, named "dull", engineered to be the quickest way to make computer games.
|
||||
|
||||
## Installation
|
||||
## The Vision
|
||||
The less lines of code it takes to do something, the less your program does. The less your program does, the faster it is, and the fewer bugs it has.
|
||||
|
||||
## A quick example
|
||||
Prosperon is designed to achieve a minimal number of lines of code when creating a game. How does it do so?
|
||||
|
||||
## API usage
|
||||
A lot of the API usage is informed from 'duck typing'. If something "looks" like a camera - it can be used like one! If something "looks" like a sprite, it can be used like one! There are fast paths on nearly everything for well defined objects
|
||||
1. **Duck typing**
|
||||
A lot of the API usage is informed from 'duck typing'. If something "looks" like a camera - it can be used like one! If something "looks" like a sprite, it can be used like one! This means that if you create an enemy in the game, you may be able to pass it in to render, while in other more strict languages, you might need to create an intermediate "sprite" object.
|
||||
|
||||
2. **Gradual performance**
|
||||
However, there are fast paths on nearly everything for well defined objects. For most use cases, the flexible, duck typing works. But in specific circumstances, where speed is required, it's possible.
|
||||
|
||||
3. **Uniformity**
|
||||
Uniformity is prioritized. Javascript allows for a powerful abstraction - the object - which Prosperon makes much use of. It allows for another - the arraybuffer - which makes it simple to plug different parts of the engine into each other.
|
||||
|
||||
The object is the lingua franca of the API. For example, json.encode and json.decode converts objects to and fromt json strings; nota.encode and nota.decode converts objects to and from nota bytes, represented as a javascript arraybuffer. To convert a json string to a nota buffer, one would do:
|
||||
nota.encode(json.decode(str))
|
||||
|
||||
Most functions take objects just like this, increasing flexibility for what you can send into functions.
|
||||
!!! scholium
|
||||
The object is the lingua franca of the API. For example, json.encode and json.decode converts objects to and from json strings; nota.encode and nota.decode converts objects to and from nota bytes, represented as a javascript arraybuffer. To convert a json string to a nota buffer, one would do:
|
||||
```nota.encode(json.decode(str))```
|
||||
|
||||
# Gradual performance
|
||||
Prosperon makes it easy to make something quickly, and if it runs well, you're golden! But if it's slow, there are a plethora of options to make it faster. Plus, with native C plugins, there is nothing that can't be figured out.
|
||||
|
||||
4. **AI**
|
||||
Prosperon is packed with tools to make it easy to work with AI. AI is an incredible productivity boost for programming, but it has a difficult time dealing with game engines like Unity and Unreal. Prosperon can, for example, generate an overview of your game, which you can plug into an AI for context so it will have an easy time helping with what you're stuck on.
|
||||
|
||||
## Installation
|
||||
|
||||
Just grab the prosperon build for your platform, drop it in a folder, and run it. Prosperon is a tiny executable - usually less than 2MB - so it's recommended to version it with your project.
|
||||
|
||||
Reference in New Issue
Block a user