Arcmage Online is a browser-based Collectible Card Game (CCG) that includes a deck-builder and card database. It is part of the Arcmage project.
- Play Arcmage on a virtual one-versus-one tabletop without rule enforcement, plugins, or player registration.
- Create new cards and decks on a card generation website.
The game has no artificial intelligence, nor are there any plans to implement game rules.
This respository contains the card database, card generation website, and online game.
- Arcmage.Model : The public model for cards, decks, games, etc.
- Arcmage.Client : A custom strongly-typed C# http client for easy access to the Arcmage API.
- Arcmage.Configuration : A small settings library to load some settings from json
- Arcmage.DAL : The database ORM layer for use with Entity Framework Core
- Arcmage.Seed : A database seeder to populate an empty database with some basic data (Sets, Factions, etc.)
- Arcmage.InputConvertor : A library to convert our card layout XML field to markdown or vice versa
- Arcmage.Server.Api : The REST API for Authentication, Card Creation, Deck Creation, Card Searching, etc.
- Arcmage.Web : Holds the Angular web app for card and deck creation, and the Vue app for the online game
- Arcmage.Game.Api : The SignalR hub backend for the browser-to-browser communication
- ApiExamples : A small demo on how to use the Arcmage.Client to interact with the Arcmage API
- DeckAutoCompleter : A tool that extracts and updates the card's 'RuleText' and 'FlavourText' fields from the 'LayoutText' markup field for a given deck.
- DeckTranslator : A tool that copies cards from one language to a new language for a given deck. It marks the cards as work in progress and copies the artwork, fills in the cards' translated Subtype, Info, etc.
- ProductGenerator : A tool that exports cards/decks in a woocommerce-compliant file so that it can be imported in our webshop
- .NET 5
- ef core tools 3.1
- Visual Studio 2019 Community Edition (or above)
- Visual Studio Code
- nodejs
- inkscape 0.91 or above, see https://inkscape.org/
- SQL Server Express (or any database with support for entity framework core, e.g. MySQL)
Although the development stack is Windows-based, it should be possible to build on Linux as well by running dotnet build
. Also it should be possible to configure the Arcmage.DAL project and ef core to use the MySQL provider or any other provider listed here: https://docs.microsoft.com/en-us/ef/core/providers/?tabs=dotnet-core-cli.
- Install inkscape.
- Add it to your system variables!
Tip: Check if you can run 'inkscape' in a command prompt.
Tip: If you need to run the inkscape export process with elevated permissions or as a certain system user:
- Edit Arcmage.Server.Api\appsettings.json and enable ForceInkscapeUserImpersonate and fill in InkscapeUser and InkscapePassword
- Clone the repository and open the Arcmage.sln solution in Visual Studio.
- Edit both the Acrmage.Game.Api\appsettings.json and Arcmage.Server.Api\appsettings.json files.
- Update the HangFire and Arcmage connection strings to point to your database provider.
- Update the TokenEncryptionKey with your own custom generated 20 char key.
- Build the solution.
- The first-time build fetches all the required nuget packages.
- Open a command line at the Arcmage.DAL folder and run
dotnet ef database update
- This creates an empty database with the correct tables.
- Set Arcmage.Server.Api as the startup project and run (use the project launch, not IIS Express).
- Edit Acrmage.Seed\appsettings.cs and update the ServiceUser fields with your user name, email and password.
- This will be the default admin user.
- Start Arcmage.Seed using one of the following methods:
- In Visual Studio, right-click Arcmage.Seed > Debug > Start New Instance.
- Run
dotnet run
If you'd like to contribute the code base, but keep your settings from being committed, use alternative 'appsettings_development.json' files instead. (You can still leave the appsettings.json files as is)
- Open the Arcmage.Web folder in Visual Studio Code.
- Open a new terminal.
- Run
npm install
- This will fetch all required npm packages
- Run
npm run build
- This will build the Angular app (and game Vue js app) and output it in the './dist' folder
- A post-build script will copy the './dist' contents to Arcmage.Server.Api/wwwroot (this is done so we can host the web apps and the server API in a single Kestrel web server)
- While the Arcmage.Server.API is active, browse to http://localhost:5000.
The game API is a standalone dotnet core app using signalR hubs for the browser-to-browser communication.
While the Arcmage.Server.Api is running, start the Arcmage.Game.Api using either of the following methods:
- In Visual Studio, right-click Arcmage.Game.Api > Debug > Start New Instance.
- Run
dotnet run
You'll notice that http://localhost:5000 doesn't show any cards/decks. This software stack comes with no cards or artwork. However you can create your own cards/decks once logged in. Cards generate into the following path: Server.Arcmage.Api\wwwwroot\arcmage\Cards
Feel free to use our great CC-BY-SA4 artwork repository!
Find card templates in the following path: Server.Arcmage.Api\wwwroot\arcmage\CardTemplates
Templates are organized by Faction and Type. Each template contains several files:
- (template).svg : the real full blown template, used to generate the cards in high resolution png and pdf files
- (template).png : used as background while editing the card on the website
- (template) overlay plain.svg : used as overlay while editing the card on the website
- (template) overlay.svg : used for changing the template in inkscape (before saving it as overlay plain)
The border.svg and border.png files are used to create a 2mm bleed around the cards when generating the png and pdf print-ready files.
If you want to know more about the project please visit the following links: