Skip to content

Escape From Mr.Roboger's Neighborhood 2, team week project epicodus

Notifications You must be signed in to change notification settings

JLEWilson/EFMRN2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 

Repository files navigation


|| Escape from Mr. Robogers Neighborhood 2: Attack of the Clones and Map Maker ||

Created By: Skylar Brockbank, Jacob Wilson, Christina Welch, Zach Wilson, and Matt Luker


Skylar brockbank profile Matt Luker Profile Christina Welch Profile Zach Wilson Profile Jacob Wilson Profile

___________________________

Matt Luker's GitHub

Skylar Brockbank's GitHub

Christina Welch's GitHub

Zach Wilson's GitHub

Jacob Wilson's GitHub

Initiated January 24th, 2022.

Project Docs · Report Bug · Request Feature

___________________________

Table of Contents


About the Project

Escape From Mr. Rogers Neighborhood 2: Attack of the Clones Description

The eagerly awaited 2nd installment of the Escape from Mr. Robogers anthology produced by Celestial Dragons. In this multi-player edition we learn that Mr. Robogers is a creation from the garden of the real Mr. Rogers mind. Being cast away as a mistake, Mr. Robogers vowes revenge on his creater and takes over Mr. Rogers neighborhood. Mr. Rogers creates new clones of himself to traverse the dangers of his neighborhood and finally bring Mr. Robogers madness to an end. "EFMRN2: Attack of the Clones" is a multi-player game that utilizes a MySQL database to get and update player and tile information and mixes JavaScript, C#/.NET, CSS, and HTML to create a unique user environment for each player.

Map Maker Description

The map maker program is designed to create custom levels for "Escape from Mr. Roboger's Neighborhood 2: Attack of the clones" and output the code in an easy to copy and paste format. The Map maker lets you assign custom functionality to each map tile and with a little tinkering you can make any kind of game tile you would like. A user is asked to fill out forms that will populate the output string with the desired properties of the map being created.

Known Bugs

  • If you don't click on all tiles in the map maker to assign properties you will get an undefined value in the output string.

Built With


Getting Started

Prerequisites

Install .NET Core

  • On macOS Mojave or later
    • Click here to download the .NET Core SDK from Microsoft Corp for macOS.
  • On Windows 10 x64 or later
    • Click here to download the 64-bit .NET Core SDK from Microsoft Corp for Windows.

Install dotnet script

Enter the command dotnet tool install -g dotnet-script in Terminal for macOS or PowerShell for Windows.

Install MySQL Workbench

Download and install the appropriate version of MySQL Workbench.

Install Postman

(Optional) Download and install Postman.

Code Editor

To view or edit the code, you will need an code editor or text editor. I recommend VisualStudio Code.

  1. Code Editor Download:VisualStudio Code
  2. Click the download most applicable to your OS and system.
  3. Wait for download to complete, then install -- Windows will run the setup exe and macOS will drag and drop into applications.
  4. Optionally, create a GitHub Account
  5. You will need VisualStudio Live Server to play this game
  6. You will need VisualStudio Code Live Share Extension in order to play with multiple users

Setup and Use

Cloning

  1. Navigate to the EFMRN2 repository here.
  2. Click 'Clone or download' to reveal the HTTPS url ending with .git and the 'Download ZIP' option.
  3. Open up your system Terminal or GitBash, navigate to your desktop with the command: cd Desktop, or whichever location suits you best.
  4. Clone the repository to your desktop: $ git clone https://github.com/JLEWilson/EFMRN2
  5. Run the command cd EFMRN2 to enter into the project directory.
  6. View or Edit:
    • Code Editor - Run the command code . to open the project in VisualStudio Code for review and editing.
    • Text Editor - Open by double clicking on any of the files to open in a text editor.

Download

  1. Navigate to the EFMRN2 repository here.
  2. Click 'Clone or download' to reveal the HTTPS url ending with .git and the 'Download ZIP' option.
  3. Click 'Download ZIP' and unextract.
  4. Open by double clicking on any of the files to open in a text editor.

AppSettings

  1. Create a new file in the EFMRN2 directory named appsettings.json
  2. Add in the following code snippet to the new appsettings.json file:
{
"Logging": {
  "LogLevel": {
    "Default": "Information",
    "Microsoft": "Warning",
    "Microsoft.Hosting.Lifetime": "Information"
  }
},
"AllowedHosts": "*",
"ConnectionStrings": {
  "DefaultConnection": "Server=localhost;Port=3306;database=EFMRN2;uid=root;pwd=YourPassword;"
}
}
  1. Change the server, port, and user id as necessary. Replace 'YourPassword' with relevant MySQL password (set at installation of MySQL).

Database

  1. Navigate to EFMRN2 directory using the MacOS Terminal or Windows Powershell (e.g. cd Desktop/EFMRN2/EFMRN2).
  2. Run the command dotnet ef database update to generate the database through Entity Framework Core.
  3. (Optional) To update the database with any changes to the code, run the command dotnet ef migrations add <MigrationsName> which will use Entity Framework Core's code-first principle to generate a database update. After, run the previous command dotnet ef database update to update the database.

Launch the game

  1. Navigate to EFMRN2 directory using the MacOS Terminal or Windows Powershell (e.g. cd Desktop/EFMRN2/EFMRN2).
  2. Run the command dotnet run to have access to play the game.

Note: The server will not open automatically. The user will need to cmd+click on the live share link in terminal, or enter 'localhost:5000' URL into browser.

Play instructions

You can play with multiple players at once as long as those other players are You will need to register at least 3 new players before you can start the game. To register a player click the Register button and then enter an email and password. The password has no required parameters. After you have registered the players click on the Go To Game button

Note on CORS

CORS is a W3C standard that allows a server to relax the same-origin policy. It is not a security feature, CORS relaxes security. It allows a server to explicitly allow some cross-origin requests while rejecting others. An API is not safer by allowing CORS. For more information or to see how CORS functions, see the Microsoft documentation.


Map Maker Instructions

To use map maker use the steps above to navigate to the EFMRN2 project directory. Open the MapMaker directory within the EFMRN2 directory and open the index.html file with Live Server. There are detailed instructions about how to use this program when you first open the webpage. Choose the dimensions of the level you are creating with the x and y input fields and choose the level with the z value field. Then submit to build the grid. Then choose the Id modifier number by using the highest previous tileId in the database. If there are no tiles yet then your modifier will be 0. DO NOT CHANGE THE ID MODIFIER NUMBER DURING A LEVEL CREATION or you will get bad results. Next use the top dropdown menu to choose the type of tile you want to place along with the appropriate property values and then click on the grid where you want that tile type to be. YOU MUST CLICK ALL TILES OR YOU WILL GET UNDEFINED FOR ANY UNCLICKED TILES. You can do any configuration of different tiles you would like although you will want to have a perimeter of 3 non transparent tiles. After you have designated all tiles on the grid click the GO button and a code string will be generated for you. You can copy the entire string and paste it into the Desktop/EFMRN2/EFMRN2/Models/EFMRN2Context.cs file here:

protected override void OnModelCreating(ModelBuilder builder)
    {
      base.OnModelCreating(builder);
      builder.Entity<Tile>().HasData(
        // BELOW IS AN EXAMPLE OF WHERE YOU WILL PASTE YOUR CODE STRING FROM THE MAP MAKER

        new Tile { TileId = 1, X = 0, Y = 0, Z = 0, Transparent = false, Texture = "wall", Aux = "0", Method = 0 }, new Tile { TileId = 13, X = 1, Y = 0, Z = 0, Transparent = false, Texture = "wall", Aux = "0", Method = 0 }

        // ABOVE IS WHERE YOU WILL PASTE YOUR CODE STRING FROM THE MAP MAKER
      );
    }

Note: your map will most likely be much more code than the snippet above. Be sure to delete the final comma on the output string or you will get an error. After you have your map code in place you can enter the command dotnet ef migrations add MigrationNameOfYourChoosing followed by dotnet ef database update. Now you will have the map level that you built. Make sure that you build levels that connect to each other through doors or portals otherwise you will not be able to access them. If you are unsure of how to use the map maker the game comes pre loaded with several maps that will populate when you first update the database. You can delete the contents of your EFMRN2 database and start from scratch if you would like or make your own levels and replace the pre fabricated levels with your code before you first update the database.

License

MIT License

Copyright (c) 2021 Matt Luker, Skylar Brockbank, Christina Welch, Jacob Wilson, Zach Wilson.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

Escape From Mr.Roboger's Neighborhood 2, team week project epicodus

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •  

Languages