Fixed README: accidentally middle-clicked in some places
This commit is contained in:
parent
75274df376
commit
a28a13af5b
13
README.md
13
README.md
|
@ -2,7 +2,7 @@
|
||||||
## A text-based tabletop game engine written in C and scripted with Lua
|
## A text-based tabletop game engine written in C and scripted with Lua
|
||||||
|
|
||||||
### Motivation
|
### Motivation
|
||||||
I originally came up with this idea for the purpose of understanding the interaction between a rendering engine, game logic, and a scripting language along with learning how to use the C-Lua interface, learning the Unix sockets API, and experiencing firsthand manual memory management on a decently-sized project. Additionally, this project fills a gap I perceive in the open source gaming community; that is, a way to play tabletop games with friends on basically any *NIX system with a CPU. Indeed, this project runs only in the terminal; as of yet there are no graphical capabilities. It should be noted that the project has only been compiled on Linux, once the game is complete I will add in the necessary code for building on MacOS, OpenBSD, and FreeBSD. Earlier, when I ran OpenBSD on my laptop the game was maintaining compatibility with OpenBSD but I have since quit using that computer and OpenBSD compatibility has not been tested in a long time - it will almost certainly not build on Opepaddle_left = oct_tb_sprite_new();
|
I originally came up with this idea for the purpose of understanding the interaction between a rendering engine, game logic, and a scripting language along with learning how to use the C-Lua interface, learning the Unix sockets API, and experiencing firsthand manual memory management on a decently-sized project. Additionally, this project fills a gap I perceive in the open source gaming community; that is, a way to play tabletop games with friends on basically any *NIX system with a CPU. Indeed, this project runs only in the terminal; as of yet there are no graphical capabilities. It should be noted that the project has only been compiled on Linux, once the game is complete I will add in the necessary code for building on MacOS, OpenBSD, and FreeBSD. Earlier, when I ran OpenBSD on my laptop the game was maintaining compatibility with OpenBSD but I have since quit using that computer and OpenBSD compatibility has not been tested in a long time - it will almost certainly not build on OpenBSD.
|
||||||
### Targets
|
### Targets
|
||||||
Currently, the only target is Linux. After the game is finished, it will target Mac OSX, OpenBSD, and FreeBSD. Other targets may be added after that. Windows support is not planned, however it *may* be possible to run this in WSL, I have no idea how well WSL works with the Unix sockets API.
|
Currently, the only target is Linux. After the game is finished, it will target Mac OSX, OpenBSD, and FreeBSD. Other targets may be added after that. Windows support is not planned, however it *may* be possible to run this in WSL, I have no idea how well WSL works with the Unix sockets API.
|
||||||
|
|
||||||
|
@ -11,7 +11,14 @@ Currently, the only dependencies are [termbox2](https://github.com/termbox/termb
|
||||||
|
|
||||||
### License
|
### License
|
||||||
I have not chosen a license for this project yet. Will definitely have one by the time version 1.0 comes out.
|
I have not chosen a license for this project yet. Will definitely have one by the time version 1.0 comes out.
|
||||||
paddle_left = oct_tb_sprite_new();
|
|
||||||
|
### Usage
|
||||||
|
`open_card_table \[options\] LUA_FILE`
|
||||||
|
LUA_FILE is the file to run
|
||||||
|
Options may be
|
||||||
|
- `-p PORT`: Port to listen on for connections
|
||||||
|
- `-v`: Prints version
|
||||||
|
- `-h`: Prints help
|
||||||
- `-ll LOG_LEVEL`: Sets the log level for output: 0=error, 1=warning, 2=information, 3=debug
|
- `-ll LOG_LEVEL`: Sets the log level for output: 0=error, 1=warning, 2=information, 3=debug
|
||||||
- `-lf LOG_FILE`: Sets the output file for the log, `stderr` by default
|
- `-lf LOG_FILE`: Sets the output file for the log, `stderr` by default
|
||||||
|
|
||||||
|
@ -61,7 +68,7 @@ end
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Networking
|
#### Networking
|
||||||
Note that at this time, networking is incomplete and only basic functionality is working. Networking consists of the `oct_recv` and `oct_send` functions. Note that in order to use networking, `oct_init()` had to return `OCT_NEEDS_NETWORKING` as the first argument, or else nothing will happen. These usually are used in the `oct_loop` function. I still need to add in support for broadcasting, this will come in a while. **Important**: Message sending is *synchronous*, i.e. under the hood a message and destination are placed in buffers, and at the next invocation of the main loop the message is sent to the destination. I believe that tabletop games are simple enough that this is sufficient to express games even with real-time components as the main loop is executed at a high frequency. If this turns out not to be the case, I will look into adding asynchronous message sending.
|
**Note that at this time, networking is incomplete and only basic functionality is working.** Networking consists of the `oct_recv` and `oct_send` functions. Note that in order to use networking, `oct_init()` had to return `OCT_NEEDS_NETWORKING` as the first argument, or else nothing will happen. These usually are used in the `oct_loop` function. I still need to add in support for broadcasting, this will come in a while. **Important**: Message sending is *synchronous*, i.e. under the hood a message and destination are placed in buffers, and at the next invocation of the main loop the message is sent to the destination. I believe that tabletop games are simple enough that this is sufficient to express games even with real-time components as the main loop is executed at a high frequency. If this turns out not to be the case, I will look into adding asynchronous message sending.
|
||||||
##### Networking examples
|
##### Networking examples
|
||||||
Receiving a message: `msg,addr,port = oct_recv();`
|
Receiving a message: `msg,addr,port = oct_recv();`
|
||||||
Sending a message: `oct_send("MESSAGE", "IP_ADDRESS", "PORT")`;
|
Sending a message: `oct_send("MESSAGE", "IP_ADDRESS", "PORT")`;
|
||||||
|
|
Loading…
Reference in New Issue