mirror of
https://github.com/sam-astro/Z-Sharp.git
synced 2025-12-11 16:22:12 +00:00
Update README.md
This commit is contained in:
parent
1bd56409be
commit
eb9f7be21e
35
README.md
35
README.md
@ -1,7 +1,40 @@
|
||||
<img src="https://raw.githubusercontent.com/sam-astro/Z-Sharp/master/ExtraResources/ZS-Logo.png"/>
|
||||
|
||||
# Z#, Z-Sharp
|
||||
Z-Sharp is a custom programming language I made because I don't like c++ very much (Z-Sharp's interpreter is written in c++ though). It used to be called Slang, standing for "Stupid Lang", but another programming language called Slang already exists :(. Z-Sharp scripts have the file extension .zs. The base syntax and formatting I would say is quite similar to C#, but differs as task complexity increases. It has support for graphics using SDL2, and by default is not enabled. Here is some example code.
|
||||
## Introduction
|
||||
Z-Sharp is a custom programming language I made because I don't like c++ very much (Z-Sharp's interpreter is written in c++ though). It used to be called Slang, standing for "Stupid Lang", but another programming language called Slang already exists :(. Z-Sharp scripts have the file extension .zs. The base syntax and formatting I would say is quite similar to C#, but differs as task complexity increases. It has support for graphics using SDL2, and by default is not enabled.
|
||||
|
||||
## Installation
|
||||
Downloading or installing is very simple. I recommend the regular version if you are just exploring, and not the installer, because then you don't need to find the executable in your program files. If you plan on developing for a long time though, then you should use the installer and I'll guide you through that after.
|
||||
### ZSharp Windows x64
|
||||
1. Navigate to [the most recent release](https://github.com/sam-astro/Z-Sharp/releases) and download `ZSharp-Win-x64.zip`.
|
||||
2. Unzip `ZSharp-Win-x64.zip` and open the unzipped folder.
|
||||
3. You will see many files. The Z# interpreter is `ZSharp.exe` and has a Z# icon. Any time you want to execute a script, this is the program that will be used. There are a few ways to use it:
|
||||
* Drag and drop any .ZS script directly onto the executable.
|
||||
* Use command line, providing path to executable and then to script like so:
|
||||
`> ./ZSharp.exe ./Pong-Example-Project/script.zs`
|
||||
* Right-click on your .ZS script file, then select `'Open with...'`. Click `'More Apps'`, scroll down, and select `'Look for another app on this PC'`. Navigate to the `ZSharp.exe` executable and select it. Now whenever you double-click any .ZS file, it will automatically open with the interpreter.
|
||||
4. Feel free to use and edit the included `Pong-Example-Project`. It is a single script called `script.zs`, and you can open it with any of the methods above.
|
||||
### ZSharp Linux
|
||||
1. Navigate to [the most recent release](https://github.com/sam-astro/Z-Sharp/releases) and download `ZSharp-Linux.zip`.
|
||||
2. Unzip `ZSharp-Linux.zip` and open the unzipped folder.
|
||||
3. You will see some files. The Z# interpreter is `ZSharp`. Any time you want to execute a script, this is the program that will be used. You can use it like so:
|
||||
* Use terminal, providing path to executable and then to script like so:
|
||||
`$ ./ZSharp ./Pong-Example-Project/script.zs`
|
||||
4. Feel free to use and edit the included `Pong-Example-Project`. It is a single script called `script.zs`, and you can open it with any of the methods above.
|
||||
### ZSharp Installer Windows x64
|
||||
1. Navigate to [the most recent release](https://github.com/sam-astro/Z-Sharp/releases) and download `ZSharp-Installer-Win-x64.zip`.
|
||||
2. Unzip `ZSharp-Installer-Win-x64.zip` and open the unzipped folder.
|
||||
3. You will see some files. Both the .EXE and the .MSI both do exactly the same thing, so you may execute either to begin the installation. Follow the steps in the wizard as it guides you through the install process. Make sure to remember the directory where you install it (the default one is `C:\Program Files\ZSharp`).
|
||||
3. Navigate to the directory you installed Z-Sharp (the default one is `C:\Program Files\ZSharp`).
|
||||
4. You will see many files. The Z# interpreter is `ZSharp.exe` and has a Z# icon. Any time you want to execute a script, this is the program that will be used. There are a few ways to use it:
|
||||
* Drag and drop any .ZS script directly onto the executable.
|
||||
* Use command line, providing path to executable and then to script like so:
|
||||
`> ./ZSharp.exe ./Pong-Example-Project/script.zs`
|
||||
* Right-click on your .ZS script file, then select `'Open with...'`. Click `'More Apps'`, scroll down, and select `'Look for another app on this PC'`. Navigate to the `ZSharp.exe` executable and select it. Now whenever you double-click any .ZS file, it will automatically open with the interpreter.
|
||||
5. Feel free to use and edit the included `Pong-Example-Project`. It is a single script called `script.zs`, and you can open it with any of the methods above.
|
||||
|
||||
## Here is some example code:
|
||||
```c#
|
||||
// Comments are indicated by two forward slashes
|
||||
// They can only be on their own line
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user