What you need....
Run
bundle install
then
ruby run.rb
Thats it!
Thanks for taking a look at Startup Simulator and the Tiny Game Engine (TGE). Tiny Game Engine is a UI and game design system created to make building games in the command line easy!!! I encourage you to fork and use the Tiny Game Engine and try to build your own games!
Create by Andrew Richards - github: arichards4814
To play the game simply use 'ruby run.rb' and that's it!!!!
The object of the game is to raise money, build your business, hire employees, create products and so on. There are many things to worry about... to check them visit the view company panel. There you will see your average employee morale, product strength etc. Make sure to keep improving on these things.
BE CAREFUL! If you start building products that your team can't handle they will lose morale!
As you move through the game you will see menu items that are not unlocked yet shown as '[2] ??????????'. These are in the game! You just have to improve your companies recognition and the amount of employees you have to see these!
A few commands when you are in the menus: [back] - type back and press enter/return to return to the previous menu [help] - type back and press enter/return to view the help menu [quit] - type quit and press enter/return to quit the game completely
The Tiny Game Engine was created as a way for Ruby developers to build games in the command line and not have to worry too much about menus.
In order to use menus, follow these steps:
- Initialize a menu, usually I call my first menu 'main menu'. I'm so original.
- Set the menu items, has_border, border_type, and
- Set the parent_menu... this will be the menu that your player is brought to when he types 'back'
- important note! Your first menu should have itself as the parent menu... otherwise the game will break.
Take a look at my example here:
main_menu_ui = UI.new("main_menu_ui")
main_menu_ui.menu_items = ["[1] - Try to Raise Capital ", "[2] - Hire Employees ", "[3] - Build/Improve Products",
"[4] - View Company", "[5] - View Employees", "[6] - View Products"]
main_menu_ui.header = " MAIN MENU - Week: #{week}"
main_menu_ui.body = " #{our_startup.name}\n Funds: $#{our_startup.funds} Employees: #{our_startup.employees.count} Products: #{our_startup.products.count}"
main_menu_ui.has_border = true
main_menu_ui.border_type = "dash-lg"
main_menu_ui.has_divider = true
main_menu_ui.parent_menu = main_menu_ui
-
Once you initialize all of your menus, it's time to set your logic!!! To do so, in your file create a new area (after initializing all of your menus) to set all of your menu logic.
- use the .set_logic instance method to store the methods you want to run when that menu item is chosen. for example you would store 'main_menu.method(:prompt)' if you want that item to go back to the main menu. The .prompt method on a UI object will always prompt the menu and ask for input.
-
Once you have set up your logic, test your logic by calling main_menu.prompt and watch the magic happen!
I will be updating this section very soon! Keep your eye out!
Pass the current strings as a parameter in #border_type to create that border. #has_border must be set to true for border to show
- border types - dash-sm, dash-md, dash-lg, line-sm, line-md, line-lg, carrot-sm, carrot-md, carrot-lg, squiggles-sm, squiggles-md,squiggles-lg, equals-md
- UI.billboard(string)
- UI.announce(string)
- UI.ask_for_enter
- UI.simple_question(string)
- UI.blank_space(integer)
Generates a random tech name for your company
- main_menu
- raise_money
- hire_employees
- employee_choice
- build/improve products
- build
- improve
- company info
- employee info
Allows you to build out robust, styled menus.
- eventually want to be able to create logos with ASCII text
- GameEvent class that stores game events.
- Class method that puts out your game events on each turn.
Will allow you to build player characters, enemy characters.
Will allow you to build stories with decision making branches that effect the direction of the story.
- add help menu
- [] custom error handling
- ability to have an odd number of menu items
- [] ability to have up to 9 numbers of menu items
- additional borders included
- instructions in the readme
- [] metaprogram menu creator, making building menu trees easy.
- finish 4th menu - view company
- add improve employee function
- add improve product function
- add raise money from other investors functions
- [] code in employee personality bonuses

