diff options
| author | realtradam <[email protected]> | 2022-10-30 15:59:18 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2022-10-30 15:59:18 -0400 |
| commit | 51643c9613027844f7e41cb57ce35e0254f0fd0d (patch) | |
| tree | 410705be8f2c06156b26c18206a297bc254a5960 /orbital_game_doc | |
| download | orbital_game-51643c9613027844f7e41cb57ce35e0254f0fd0d.tar.gz orbital_game-51643c9613027844f7e41cb57ce35e0254f0fd0d.zip | |
initial plan
Diffstat (limited to 'orbital_game_doc')
| -rw-r--r-- | orbital_game_doc/.obsidian/app.json | 1 | ||||
| -rw-r--r-- | orbital_game_doc/.obsidian/appearance.json | 3 | ||||
| -rw-r--r-- | orbital_game_doc/.obsidian/core-plugins.json | 19 | ||||
| -rw-r--r-- | orbital_game_doc/.obsidian/hotkeys.json | 1 | ||||
| -rw-r--r-- | orbital_game_doc/.obsidian/workspace.json | 157 | ||||
| -rw-r--r-- | orbital_game_doc/Design Doc.md | 84 | ||||
| -rw-r--r-- | orbital_game_doc/Example Doc.md | 621 |
7 files changed, 886 insertions, 0 deletions
diff --git a/orbital_game_doc/.obsidian/app.json b/orbital_game_doc/.obsidian/app.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/orbital_game_doc/.obsidian/app.json @@ -0,0 +1 @@ +{}
\ No newline at end of file diff --git a/orbital_game_doc/.obsidian/appearance.json b/orbital_game_doc/.obsidian/appearance.json new file mode 100644 index 0000000..c8c365d --- /dev/null +++ b/orbital_game_doc/.obsidian/appearance.json @@ -0,0 +1,3 @@ +{ + "accentColor": "" +}
\ No newline at end of file diff --git a/orbital_game_doc/.obsidian/core-plugins.json b/orbital_game_doc/.obsidian/core-plugins.json new file mode 100644 index 0000000..96869df --- /dev/null +++ b/orbital_game_doc/.obsidian/core-plugins.json @@ -0,0 +1,19 @@ +[ + "file-explorer", + "global-search", + "switcher", + "graph", + "backlink", + "outgoing-link", + "tag-pane", + "page-preview", + "daily-notes", + "templates", + "note-composer", + "command-palette", + "editor-status", + "starred", + "outline", + "word-count", + "file-recovery" +]
\ No newline at end of file diff --git a/orbital_game_doc/.obsidian/hotkeys.json b/orbital_game_doc/.obsidian/hotkeys.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/orbital_game_doc/.obsidian/hotkeys.json @@ -0,0 +1 @@ +{}
\ No newline at end of file diff --git a/orbital_game_doc/.obsidian/workspace.json b/orbital_game_doc/.obsidian/workspace.json new file mode 100644 index 0000000..f9a1b30 --- /dev/null +++ b/orbital_game_doc/.obsidian/workspace.json @@ -0,0 +1,157 @@ +{ + "main": { + "id": "f3b5859d58c8920b", + "type": "split", + "children": [ + { + "id": "90ffeb5ddfdf8402", + "type": "tabs", + "children": [ + { + "id": "8f209e3dd8895e41", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "Example Doc.md", + "mode": "source", + "source": false + } + } + }, + { + "id": "387ea3eb3fadc8cb", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "Design Doc.md", + "mode": "source", + "source": false + } + } + } + ], + "currentTab": 1 + } + ], + "direction": "vertical" + }, + "left": { + "id": "baaf171426526e8b", + "type": "split", + "children": [ + { + "id": "aee7d106467f97e7", + "type": "tabs", + "children": [ + { + "id": "5a480a8cd616d9c5", + "type": "leaf", + "state": { + "type": "file-explorer", + "state": { + "sortOrder": "alphabetical" + } + } + }, + { + "id": "0b7c439d3c3190b2", + "type": "leaf", + "state": { + "type": "search", + "state": { + "query": "", + "matchingCase": false, + "explainSearch": false, + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical" + } + } + }, + { + "id": "0dab2c8eb75c3d7b", + "type": "leaf", + "state": { + "type": "starred", + "state": {} + } + } + ] + } + ], + "direction": "horizontal", + "width": 300 + }, + "right": { + "id": "4eafccb3ae5c4cab", + "type": "split", + "children": [ + { + "id": "40872898b328addf", + "type": "tabs", + "children": [ + { + "id": "b6b8055a20b39d05", + "type": "leaf", + "state": { + "type": "backlink", + "state": { + "file": "Design Doc.md", + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical", + "showSearch": false, + "searchQuery": "", + "backlinkCollapsed": false, + "unlinkedCollapsed": true + } + } + }, + { + "id": "c6e87e1c9740856b", + "type": "leaf", + "state": { + "type": "outgoing-link", + "state": { + "file": "Design Doc.md", + "linksCollapsed": false, + "unlinkedCollapsed": true + } + } + }, + { + "id": "36ae40956164c782", + "type": "leaf", + "state": { + "type": "tag", + "state": { + "sortOrder": "frequency", + "useHierarchy": true + } + } + }, + { + "id": "21f5766399e478bc", + "type": "leaf", + "state": { + "type": "outline", + "state": { + "file": "Design Doc.md" + } + } + } + ] + } + ], + "direction": "horizontal", + "width": 300, + "collapsed": true + }, + "active": "387ea3eb3fadc8cb", + "lastOpenFiles": [ + "Example Doc.md", + "Design Doc.md" + ] +}
\ No newline at end of file diff --git a/orbital_game_doc/Design Doc.md b/orbital_game_doc/Design Doc.md new file mode 100644 index 0000000..8476152 --- /dev/null +++ b/orbital_game_doc/Design Doc.md @@ -0,0 +1,84 @@ +# Concept + +A single player 2D space exploration game with realistic orbital mechanics. Explore planets, moons, and asteroids which all have different levels of difficulty to reach and land on. + +## Inspiration + +- Famicom Art: + + +- Kerbal Space Program + +- Outer Wilds + +# Scope + +Goal is to practice C++, as well as practice using common complex elements in game development such as physics and vectors. Start out simple by just implementing orbital mechanics, then a ship where you can control it's thrust vectors, then a landing/physics component, and finally building multiple planets for exploration. + +# Requirements + +- Basic C++ + - No Templates + - Single Threaded +- Point Based Gravity(gravity pulls to specific points e.g planets) + - Drawing Orbital Paths +- Single Player +- Controllable ship + - Can use RCS to rotate + - Controlling strength of thrust +- Planets/Moons/Asteroids + - Limit to a single planet while testing/implementing physics + - Floor collisions +- Ship Resources + - Health(hitting planet too hard will explode) + - Fuel?(limited RCS and thruster fuel) + +# Gameplay + +## Basic UI + +Game will have a minimal UI showing both the map and the real view at the same time. When a player is far out in outer space then the game will have the map be in large view and the real view in ther corner. If the player is landing on a surface then the view will automatically switch to have the real view be primary and the map in the corner. + +If fuel will be implemeneted, a small guage in the corner for thruster and rcs fuel. + +Mockup: + + + + +- Animated Mockup: https://cdn.discordapp.com/attachments/196119285444116480/1034929320109555752/orbital2.gif + +## Controls + +- Desktop: + - Q/E to rotate + - WASD for RCS + - Shift/Ctrl for Thrust Control +- Mobile: + - Hold left/right side of screen to rotate + - Slide up/down in center for Thrust Control + - Toggle for RCS? + - Slide from center of screen in any direction to activate RCS for that direction. + +## Gameplay +Explore + +# Application Design + +Game app will be made of multiple source and header files split up according to the following: + +- Main(app entry point) +- Resources + - Loads textures and any other files into our game. They will be referenced by a special ID. +- Physics + - Does all orbital calculations and then eventually also will do collision resolution. +- State + - Holds the state of the game world such as: + - player position + - planets and their positions + - fuel + - etc +- Drawing + - Reads the state and then draws to the screen based on that +- Gameplay + - Takes input from player and applies it to the state
\ No newline at end of file diff --git a/orbital_game_doc/Example Doc.md b/orbital_game_doc/Example Doc.md new file mode 100644 index 0000000..e30d5b5 --- /dev/null +++ b/orbital_game_doc/Example Doc.md @@ -0,0 +1,621 @@ +** + +Raylib RPG Example + +# Concept + +A single player dungeon crawl type game intended to be a basic example of the genre to people who are less familiar with game programming and design. Will use raylib with simple 3d top down sprites and sprite sheets to create a graphical rogue-like display. + + + +Possible assets to use. + +# Scope + +The scope of this project must be very limited by it’s simple nature. The main goal is for easy to understand code, not efficiency. The project must be completable in roughly a week’s time. + + + +Things to avoid for the initial example. + + + +- Procedural Level Generation + +- Complex Character Creation + +- Complex Combat Systems + +- Multiplayer + +- Economy (vendors) + +- Character Stats + +- ECS + + +# Requirements + +- Basic C++ + + +- No Templates, simple containers (array, list, etc..) + +- Single Threaded + +- Use Tiled for maps if needed + + +- Wall collision + +- Doors + +- Triggers + + +- Use simple sprite sheets + +- Single player + + +- One base player type, equipment says what you can do + + +- Simple health system + +- Simple combat system + + +- Melee + +- Ranged + + +- No Ammo + + +- Scrolls + + +- Multiple monster types + + +- Different health and attacks + + +- Simple inventory + + +- Paperdoll for equipment + + +- Armor + +- Weapon + + +- Backpack slots + + +- Lootable items + + +- Containers (chest and barrels) + +- Monsters + +- Coin for score + + +- Activatable Items + + +- Heal (Potion) + +- Protection (Scroll) + +- Attack (Potion) + +- Direct Damage (Fireball Wand) + + +- Level Transitions + +- Win and Lose States + + +- Win when you loot final level chest + +- Loose when you die, YOLO + + +- Simple sound effects + + +# Open Questions + +None at this time. + +# GamePlay + +### Basic UI + +The basic UI will have the player in the level as the focus of the camera in the main content area of the window. A player health bar, gold(score), and action buttons are along the bottom. Menus are shown over the main view with a transparent background. Pressing I or the InventoryAction button on the UI will bring up the inventory window. + + + + + +#### Inventory Window  + +The Inventory window will have a grid of item slots (20), and two equippable slots for weapon and armor. The user can drag items from inventory into the equippable slots. Items dragged out of the window will be dropped. When selected or hovered a tooltip will show the item's name and bonuses. Any item can be put in any item slot. Only weapons can be put in the weapon slot, and only armor can be put in the armor slot. + + + +### Controls + +The player moves around the world by clicking on areas on the map (Click to move). Pressing the left mouse button activates an attack for the primary weapon. If the primary weapon is Melee it attacks all enemies in a radius around the player. If the primary weapon is ranged, the cursor will be an attack cursor when not over a UI element. When a ranged weapon is used then the enemy under the cursor will be attacked. Primary attacks have a cooldown based on a speed stored with the weapon. Changing weapons does not reset the cooldown time from a previous attack. The primary attack action button in the UI will gray out during the cooldown. + +### Movement  + +When the player moves around the map, they are constrained to an inset rectangle around the screen, similar to the “Player push camera on getting too close to screen edge” mode from the [core_2d_camera_platformer example](https://www.raylib.com/examples/core/loader.html?name=core_2d_camera_platformer). Some levels will be larger than the screen and will scroll using this method. + +### Gameplay + +The game starts with the player equipped with no armor and no weapon, in a simple room with a stairwell down. This first room has a lootable chest with a health potion in it and a sign saying how to loot it (click on it when near). While in this first room the UI will have tooltips showing what each button does. + + + +When the player enters the stairwell they go down a level to the combat training room. + +This room has a basic melee combat encounter against a simple enemy, like a rat. Their is a chest with a dagger in it at the start of the room, with a text that describes how to equip it. Opening the chest with the dagger triggers a door to open to the next room. The rat will begin attacking when the player enters that room. Killing the rat opens a door to a third room with a chest and basic armor and stairs down. + +Third room is similar to the second room but trains ranged combat with throwing daggers. This room has no chest at the end. + +The fourth through Nth room are gameplay rooms, with more monsters and loot. In the last room is a boss monster and a chest that ends the game. When the game is over you are shown a win screen and clicking will take you back to the main menu. + + + +If you die, you are shown a defeat screen and clicking will take you back to the menu. + +#### Combat  + +Combat is a simple process. The attack damage of the weapon + A random number from -3 to 6 is the attack roll. The target’s defense is subtracted from this. Any positive remainder is removed from the health of the target. When the target’s health is 0 it dies. Dead monsters leave a corpse behind that may have loot from a loot table. + +### Monsters  + +Monsters are given an attack skill using an internal weapon. This can be ranged or melee. Monster AI will be very simple, move toward the player when in view and attack when in range. When a monster is killed it may drop lootable items and/or coins near it. When dropped these items appear near the monster to be looted. + +### Items  + +Items are shown in the world as icons on the map. Items can be picked up by clicking on them. If the player has room in the inventory the item is put in the next available slot. If there is no room in the inventory the item is dropped. Dropped items are placed near the player within the map. Items can overlap. + + + +Some items are activatable, like a health potion, or protection scroll. When an activatable item is picked up, it’s icon is shown on the action bar on the hud. Clicking the icon in the hud will activate the item. Activated items are destroyed after a single use and are removed from inventory. + + +Coin “items” have a value and are added to the coin score when picked up. Coins do not go into inventory. + +# Application Design + +The game application will be made up of multiple source and header files that handle the following items. + +- Main (application startup) + +- Resources + +- Menus + +- Map + +- Player + +- Monster + +- Items + +- Gameplay + +- Drawing/UI + + +## Resource System + +A resource management system will handle loading and storing all used textures and sounds. Textures and sounds will be given an ID using an enumeration and code will request a reference to the resource by this ID. + +## Menu System + +A menu system will reference the current menu by an ID. The menu system will maintain a stack of menu IDs that can be pushed and popped as needed. + +## Map System + +The map system will handle loading the level from the resource system and providing storage for items and monsters that are created by the gameplay system. The map system will not draw the level or any of its contents, it is simply data and state storage. + +## Player, Monsters, and Items + +Players, Monsters and Items will be simple classes that define the data for each instance of the object. Functions will exist to create and fill out the data for each type of monster or item. These objects will then be stored by the map system for use by gameplay. + +## Gameplay System + +The Gameplay system will handle all game logic. It will take input from the player and apply it to the state stored in the map system. The gameplay system is responsible for all player actions, monster AI, and combat resolution. + +## Drawing/UI System + +The drawing/UI system is responsible for drawing the map and handling events from the HUD. It uses data from the map to draw and passes events into the gameplay system as needed. The UI system is responsible for handling events in the inventory window. + +# Content + +This section describes the specific content used in the game. + + + +## Menus + +The game will start on the main menu. During gameplay pressing escape will pause the game and show the main menu. + +### Main Menu + +The main menu has the following items. + +- Start Game + + +- Will change to Resume Game when invoked while the game is playing. + + +- Options + +- Quit + + +### Options Menu + +The options menu has three items. + +- Fullscreen + +- Volume + +- Back + + + + +Player Data  + +The player starts with 20 health and 0 defense. Items can increase these values. + +## Enemy Types + +Describes the types of enemies, stats + +### Rat  + +- 1 Health + +- 0 Defense + +- Claw Attack + + +- Melee + +- 1 Damage + +- 1 second cooldown + + +### Snek  + +- 3 Health + +- 10 Defense + +- Bite Attack + + +- Melee + +- 2 Damage + +- 1 second cooldown + + +### Ghust  + +- 2 Health + +- 15 Defense + +- Scare Attack + + +- Ranged + +- 10 Damage + +- 5 second cooldown + + +### Troll  + +- 30 Health + +- 10 Defense + +- Punch Attack + + +- Melee + +- 10 Damage + +- 1 second cooldown + + +### Tortile  + +- 5 Health + +- 18 Defense + +- Headbut Attack + + +- Melee + +- 1 Damage + +- 15 second cooldown + + +### Blorb  + +- 20 Health + +- 10 Defense + +- Eww Attack + + +- Melee + +- 15 Damage + +- 2 second cooldown + + +### +DudeBro  + +- 20 Health + +- 10 Defense + +- Rust Attack + + +- Melee + +- 20 Damage + +- 2 second cooldown + + +### Munk  + +- 15 Health + +- 14 Defense + +- Chant Attack + + +- Ranged + +- 25 Damage + +- 3 second cooldown + + +### Moderator  + +- Boss Mob + 50 Health + +- 10 Defense + +- Ray Attack + + +- Ranged + +- 25 Damage + +- 3 second cooldown + + +## Items + +These items can be picked up from monsters or chests. + +### WeaponsI + +Sword  + +A basic sword. + +- Melee + +- Attack Power 0 -2 + +- Speed 1s + + +Really Cool Sword  + +A fancy sword. + +- Melee + +- Attack Power 2 -4 + +- Speed 1s + + + + +Awesome Sword + +This is a good sword + +- Melee + +- Attack Power 4 -6 + +- Speed 1s + + + + +Axe  + +Better than a sword + +- Melee + +- Attack Power 1 -4 + +- Speed 1.5s + + + + +Mighty Axe  + +Better than an axe + +- Melee + +- Attack Power 2 -6 + +- Speed 1.5s + + + + +Battle Fork  + +Stabbing for Justice + +- Melee + +- Attack Power 0-2 + +- Speed 0.5s + + + + +Bow  + +Pew-Pew-Pew + +- Ranged + +- Attack Power 0-2 + +- Speed 0.25s + + + + +Bonkmaster 5000  + +Bonk + +- Melee + +- Attack Power 5-10 + +- Speed 3s + + +### Armor + +Pleather Armor  + +Better than nothing + +- 2 Defense + + + + +Chain Shirt  + +Jingle Nangle + +- 4 Defense + + + + +Full Plate  + +You are the tank + +- 10 Defense + + +### Activatable Items + +Fud  + +A snack + +- + 5Health + + +Potion  + +Smells funny, but works + +- + 20 health + + + + +Shield  + +- + 10 defense for 30 seconds + + + + +Fireballs  + +Boom + +- 10 damage to nearest enemy + + + + +### Other Lootables + +Monies  + +A bag of coins + +- 1-10 coins + + +## Levels + +### Level 1 + + +**
\ No newline at end of file |
