▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▐░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░▌ ▀▀▀▀█░█▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▀▀▀▀█░█▀▀▀▀ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀█░█▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▄▄▄▄█░█▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░▌ ▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀
A virtual reality battleship game. Download v1.0.0 Here
Derelict is an MIT licensed Battleship game developed for virtual reality using Unity and SteamVR. It has been tested to work on both the Oculus Rift and HTC Vive. Full gameplay has been tested to work, but no releases have been added to the git repository. If any bugs are found, please make an issue.
- Unity supported IDE (VS 2017 works, but GitHub Atom is superior)
- Oculus Rift or HTC Vive (Cross Compatible)
- Computer capable of handling VR and graphics rendering
- SteamVR (and Oculus software if applicable)
- 5ft x 5ft empty room
- Oculus Rift or HTC Vive
- Computer capable of handling VR
- 5ft x 5ft empty room
- Install the following:
- Setup HTC Vive or Oculus Rift if you haven’t already
- Clone the repository
- Load the scene located at: Derelict/Assets/WaterFront/WaterFront.unity
- Launch SteamVR (ensure all VR components and green and functional)
- Press the ‘play’ button in the upper center of Unity’s interface
- Pick up an object with the index trigger
- Spawn an object using the grip button on the left controller
- Done! Edit scripts and add things to your heart’s desire!
- Install SteamVR
- Run the setup software for the HTC Vive or Oculus Rift
- Download Derelict v1.0.0
- Launch Derelict and select graphics settings
- Hit play and enjoy!
Currently, testing is constrained to three scenes. The “board” scene serves as a testing environment for the master board class. The “ships” scene works to test the ship controller placement in a scaled down environment. Finally, the “waterfront” scene currently acts as an interactive testing environment for full game play. In the sense of a more traditional coding project, the board and ships scenes could serve as units tests and the waterfront scene could be likened to integration testing.
The board scene allows for quick object snapping tests, grabbing/placement, and piece testing. Many features involving node interaction with users and internal backend features are modified and accessed via the various board object scripting mechanics. The primary structural breakdown of the board consists of its rectangular base, circular nodes, and specially marked interactable objects (like battleship pieces or shot markers).
The ships scene makes it easy to test out new ship models by dynamically spawning ships to the board. Furthermore, this is the fastest way to test out features of the Ship Controller class that automatically snaps the ships to a dynamic “grid”.
The waterfront scene is a cumulative interactive test. This scene is most akin to real gameplay and allows for quick interaction with the board, actual environment, and the ships. If this scene compiles, ships can be placed on the board, and can live update ship position on the water, then no changes broke the code base.
Individual tests: Board, Ships, and Terrain Scenes
Collective test: Test Scene (A.K.A Waterfront)
Running the Test
Unlike traditional languages and projects that support test driven development, C# and Unity offer no obvious frameworks to fulfil those needs. In place of this, we use the Waterfront Scene as our “test environment” and run a series of requirements to ensure changes we make in scripts do not change the expected output. Our development phase is greatly centered on pair programming. Fundamental aspects of the game were planned out, as a group, in blocks before development began. These blocks are terrain, testing, board, ship spawning, and web/multiplayer. Each main topic is separated into its own scene, for example, the board has its own scene where changes are made to scripts and visual appearance, while the ship spawning topic has a completely different scene, independant of the board. The testing scene (now named Waterfront) combines all the individual scenes together and serves as a testing environment purposed with ensuring everything works together as a unit; further independent testing is done within the individual scenes. By using prefabs, changes made to individual scenes are automatically updated in the testing scene, meaning if a feature is added to an individual scene that brakes the interactions with the other scenes, we know about it and can fix it. Such a testing scheme is not ideal, however, it is current the best means for testing VR since there is no VR simulator that can test applications without a VR headset and controllers.
Interior Class Linking from Board to Main Scene
As of current, there are no precompiled versions of Derelict in the repository. In order to run Derelict on your virtual reality system, you must have Unity set up and configured to the repository as a working directory. Once this is done, you can go to File->Build & Run to make a Developer release. In the future, releases will be shipped in a separate folder in the repository for mainstream game play.
After reading How to Write a Git Commit Message by Chris Beams, we adopted a title-subject commit message scheme. While most of what was stated in that article is extremely useful, it will take time to get used to, especially using the imperative tense.
Commit messages of this style were implemented starting on 02/18/18
This project is licensed under the MIT License - see the LICENSE file for details. Note: All non-simplistic 3d models and sound effects are not our property and we do not claim any ownership of them. Per request of the author, any of these assets of which were made freely available online can be removed if it is so desired.
- PurpleBooth for README template
- Chris Beams for commit message styling
- Bicameral Studios for island terrain inspiration
- LemonSpawn for fog shader
- Bertrum for Landing Craft 3d model
- gofree33 for Nautilus Submarine 3d model
- jhthomas512 for the American Warship 3d model
- Ben Throop for the Unity Detonator Explosions asset.
- Chris Hartman for teaching us (the developers) best code practices and the Agile design methodology.
- Glenn Chappell for making Figlet, which was used to generate the ASCII text at the top of the readme.