0x10c-inspired space game based on the DCPU-16
git clone git://squid-tech.com/lonestar.git
Log | Files | Refs | README

README.md (6224B)

      1 # LoneStar
      2 LoneStar is a work-in-progress space sandbox set in an alternate Space-Age 1988. Players will be able to use their DCPU-16 computer to drive their ship, fire their weapon systems, communicate with others, and more. This game is currently early in development; more information will be posted as more gameplay elements are added.
      4 [Find us on Reddit!](https://www.reddit.com/r/LoneStarGame/)
      6 ## Building/Running
      7 The latest binary can be downloaded [here](https://github.com/joshiemoore/LoneStar/releases/). Extract the archive, then run `LoneStar.exe`. Be sure to keep `rom.bin` in the same directory as the game binary.
      9 To build from source: Clone this repository, import src/LoneStar into Unity, then Build/Run.
     11 The game runs significantly faster if you run it as a standalone executable instead of running it directly from the Unity Editor. Just make sure you move `rom.bin` from `bin/` into your executable directory if you are building from source.
     13 ## Gameplay
     14 ***Note:*** This game is a work-in-progress, and it's currently little more than a tech demo. Expect the code, this README, and/or core gameplay to change significantly.
     16 [Click here for the initial tech demo - YouTube](https://www.youtube.com/watch?v=lZ2O6ata904)
     18 This game will be primarily focused on the [DCPU-16](https://github.com/lucaspiller/dcpu-specifications/blob/master/dcpu16.txt) and its interactions with external hardware devices. For example, you could program the DCPU to navigate your ship, transmit/receive data through communications modules, play games, and pretty much anything else you can think of! See section "Hardware" for more information.
     20 Click the red power button on the DCPU-16 to turn it on. When the CPU turns on, it will load whatever is in `rom.bin` to address 0x0000 and start executing it. The DCPU-16 will only load the first 0x10000 words into memory. If you are running the game from the Unity Editor, `rom.bin` will be located in the `bin/` folder. If you are running a standalone release of the game, `rom.bin` must be in the same directory as the game executable. Official releases of the game will always ship with a "stock" `rom.bin` that contains a basic kernel and drivers for officially-supported hardware.
     22 You can replace `rom.bin` with your own binaries. To do this, you will need an assembler. I recommend [DAS](https://github.com/jonpovey/das), because it is v1.7-compliant, and it's what I use for DASM development.
     24 To plug in a hardware device, click the device. When your crosshair gets slightly bigger, click one of the four hardware ports on the front of the DCPU. The device will be connected to the port you have selected, and the DCPU will be able to control the device via hardware interrupts. **Remember** that the DCPU-16 does not support hot-plugging/unplugging hardware, so you must power it off before plugging/unplugging any devices!
     26 LoneStar "supports" multiplayer, but it is currently buggy/broken. For now, just click "LAN Host" at the top left to start the game.
     28 ## Hardware
     29 The DCPU-16 is fully emulated in the game. The emulation in the game is compliant with spec v1.7. Please note that there are currently a few minor bugs and software interrupts aren't implemented yet - these will be fixed very soon.
     31 Keyboard input is sent to a 16-word circular buffer starting at address `0x9000`.
     33 The built-in screen is a very simple 320x200 monochrome bitmap starting at address `0x8000`. Each 16-bit word corresponds to a row of 16 pixels on the screen.
     35 Unity Developers: Any Unity `GameObject` that implements the hardware API can be a pluggable hardware device! All you need to do is extend the `DeviceScript` class, overriding the `HWI()` function to implement the behavior your device should exhibit when it is issued a hardware interrupt. Then just make sure your class is added as a component of your device's root `GameObject`. This really is very powerful and extensible, and I look forward to seeing what kind of devices the community comes up with! Please see the included devices in `src/LoneStar/Assets/Devices/` and the base DeviceScript in `src/LoneStar/Assets/Scripts/` for examples on how to make your own devices.
     37 ## ShipDraw
     38 Ships can be designed floor plan-style in ShipDraw, a small Python program being developed for LoneStar. This utility is currently very basic, and can only be used to draw a simple "ship hull" which can be loaded into the game. In the future, you will be able to add interior structures, decorations, and technical entities like the DCPU-16 and its hardware devices to your ship.
     40 To run ShipDraw, enter `python shipdraw.py <name>` from your command line. Your ship will be saved to `Ships/<name>.ship`
     42 To draw your ship, first click on the grid to lay out points for your hull. Your hull MUST be a closed polygon, so the last point must be at the same location as your first point. Once you place the last point in your hull, ShipDraw will exit Hull Mode.
     44 LoneStar currently loads the ship at `Ships/default.ship`, so you will need to replace this file with your own ship file if you want to create your own ship. In the future, there will be an in-game menu to select which ship you'd like to load.
     46 Keyboard Commands:
     47 * `s` - Save ship (after your hull is complete)
     48 * `g` - Toggle grid
     49 * `ESC` - Exit ShipDraw
     51 ![ShipDraw](https://raw.githubusercontent.com/joshiemoore/LoneStar/master/doc/shipdraw.png)
     53 ## Planned Features
     54 * Ship control module that can be plugged into the DCPU-16 and used to drive the ship
     55 * Packet radio module for inter-ship communications. This will be a 1200-baud Bell 202 modem that will be used for sending messages, data, etc. It will make modem noises. See [Packet radio - Wikipedia](https://en.wikipedia.org/wiki/Packet_radio) for more information on packet radio (it's cool)
     56 * Floppy drives for storing data larger than 0x10000 words
     57 * A procedurally generated solar system with planets that can be landed on
     58 * Performance improvements in processing and screen-rendering
     59 * Full multiplayer (sort of "Minecraft style", where someone hosts a server that players connect to)
     60 * VR support
     61 * ...and more!
     63 ## Contributing
     64 TODO: information for contributors - need to gauge interest/requirements