This is a series of premade scripts intended for kit bashing of quick game development experiments for the Licenciatura em Videojogos da Universidade Lusófona de Humanidades e Tecnologias in Lisbon.
It's currently still under development, and eventually will be commented properly, and have a manual.
You can simply create a fork of this repository or download it and start working!
Use the Unity Package Manager to install the OkapiKit:
- Open the Unity Package Manager
- Select "Add package from git URL"
-
First install Naughty Attributes, by pasting the URL "https://github.com/dbrizov/NaughtyAttributes.git#upm"
-
You can now install the OkapiKit, selecting again "Add package from git URL", and pasting the URL "https://github.com/VideojogosLusofona/OkapiKit.git#upm"
-
If you want to install the samples as well, select again "Add package from git URL", and pasting the URL "https://github.com/VideojogosLusofona/OkapiKit.git#samples"
-
With this option, everytime you want to update the package, you will have to remove it and re-add it (the Update option doesn't work properly in this context)
It currently has seven sample 'games' (each a Scene under the Samples directory), accessible through a menu (Samples scene, also in the Samples directory). There are also some code snippets demonstrating some of the features, but devoid of any meaningful context. The Snippets menu can be accessed through the Samples scene.
Due to the way packages work in Unity, you can't open the sample scenes from the package. To sidestep this issue, you have to follow some steps:
-
Go to the Packages/OkapiKitSamples folder in your project view
-
Copy all the scenes that you want to explore to your own project
- The relevant scenes are Samples and Snippets for the base menus, the individual scenes for each of the sample games (inside the folder) and the scenes inside the Snippets directory.
- Add all scenes to the build menu (or else they links between scenes won't work)
- Probe:
- probe usage
- StoppingDistance
- how to use the stopping distance property on the Follow movement
- SingletonSoundManagerA/B
- how to use the singleton system in the OkapiKit
- how to keep a song playing throughout the game, even if it has multiple scenes
- how to use a button to change the music playing
- FuzzyAim:
- Demonstrate how to make a system for mouse aiming which is more precise the more time you press the fire button
- Uses paths in a creating way
- Alternate World:
- Demonstrates how to create an alternative world system, in which the player can't cross over if there will be a collision
- Grid system:
- Demonstrates most of the grid-based systems. By default, it has a crate that can be pushed into the water, which makes that part of the water disappear.
- It also allows you to place a bomb by pressing z, which will explode destroying the solid walls in a one tile radius
- You can also approach the trees, and press X to harvest them. A indicator will appear for you to know you can harvest them.
- You can also activate some other objects, like enemies, to test the different types of Movement Grid systems.
For now, there's no documentation yet, but everything has custom editors, which display information on what each thing is doing (dynamically, depending on options selected):
In this image, we can see a bit of the inspector of a normal object (the player object in the asteroids sample). There's the normal Unity components (Sprite Renderer, Rigidbody, Collider), and then we have several Okapi Kit components (identifiable by the large title). We have a movement script (rotation movement), an hypertag (allows to define what this object is, usefull to identify objects in collisions or as targets for operations), we have a collision Trigger (with the text that explains when it triggers, and what happens), and finally we have several Action scripts (used by the Triggers), that also explain what they're doing.
There's also some icons on the Hierarchy view, indicating which type of Okapi object that objects has:
Placing the mouse cursor on top of any of the icons will display additional information. For example, here we placed the cursor on top of the Trigger icon (blue dot) on the Player object and we can see all the triggers that it has.
- All source code by Diogo Andrade is licensed under the MIT license.
- Font "Karmatic Arcade" by Vic Fieger
- Breakout paddle by Zealex, licensed under CC-BY 3.0
- Breakout bricks by Pavel Kutejnikov, licensed under CC0
- Space Invaders enemies and player by Clear_code, licensed under CC-BY 4.0
- Tiles for space shooter by mieki256, licensed under CC0
- Space ships for space shooter by SCaydi, licensed under CC-BY 4.0
- Explosion by Joshua Robertson, licensed under CC-BY 3.0
- Top down ships by Master484, licensed under CC0
- Asteroid by Warspawn, licensed under CC0
- Nebula background by [leyren], licensed under CC0
- Desert texture by pansapiens, licensed under CC0
- Survivor top down sprites by rileygombart, licensed under CC-BY 3.0
- Top-down buildings by chabull, licensed under CC-BY 3.0
- Platformer sprites by IMakeGames, licensed under CC-BY 3.0
- 1-Bit Pack by [KenneyNL], licensed under CC0
- Gems by Winternaut, licensed under CC0
- Simple Knight sprites by Calciumtrice, licensed through CC-BY 3.0
- NES Shooter Music by SketchyLogic, licensed under CC0
- Editor icons from FlatIcon
- Title imagem from Midjourney
- NaughtyAttributes by Denis Rizov, available through the MIT license.
- Autor: Diogo Andrade