Code Monkey home page Code Monkey logo

arcomage / arcomage-hd Goto Github PK

View Code? Open in Web Editor NEW
114.0 114.0 27.0 50.74 MB

Web-based, free and open source, remastered 3D clone of 3DO/NWC's 2000 card game Arcomage. 13 languages. Desktop or mobile Android iOS. Online or offline PWA. Against AI or Multiplayer (w/o server). πŸ§πŸ‘ΎπŸƒ (ts+react+redux+rxjs, CSS-based anim, WebRTC)

Home Page: https://arcomage.github.io

License: MIT License

JavaScript 1.05% Shell 0.03% TypeScript 97.48% SCSS 0.88% EJS 0.30% HTML 0.20% Batchfile 0.06%
3do arcomage card-game game game-clone might-and-magic minigame multiplayer nwc pwa react react-game redux redux-observable remaster rxjs tower-defense typescript typescript-game webrtc

arcomage-hd's People

Contributors

mateuscv avatar tombofvarn avatar tomchen avatar troyane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

arcomage-hd's Issues

Get MM8 tavern pre-settings

I'll fetch the data from MM8

If multiple taverns have same presettings, the game will only include one of them

Font option

  • Add bold card desc option (#72)
  • Add more font set to choose:

Existing font sets:
Normal, Erathian

To add:

Pixel font set (#44):

And more maybe

Then move Erathian option from language window to visual preference window.

Add desktop versions For Win/MacOS/Linux with Electron

The web app works fine in modern browsers. But add desktop versions just for the sake of completeness.

The game runs very well in Google Chrome (and browsers with Chrome's engine), a bit slow in Firefox & Safari (depends on the machine though), and doesn't work in legacy browsers. An Electron app can help non Chrome users.

See electron branch

  • Windows
  • MacOS
  • Linux

Add surrender feature

Theoretically but extremely rarely, player may be unable to use or discard ANY of your cards. So the surrender feature is essential. Maybe player shouldn't be able to choose to surrender, but the game detects the uncontinuable situation and automatically make you or compter surrender.

Improve AI

To improve the AI, actually I think the AI is OK now, at least it's better than the original game's that's sometimes suicidal. However, there are indeed something to do, including:

  • It should be able to see how to win within 2-4 steps and do it (more strategical)
  • If it's about to win. It should chase the win. Especially resources, if res is about to reach the winning cond, it shouldn't spend it
  • If it's about to lose (player's tower or res is too high), it should priorize attacking cards (even if the card damages the AI itself, or benefits the player in terms of non-tower elements)
  • If it's about to lose (its tower is too low), it should priorize tower-adding cards (even if the card benefits the player, or damages the AI itself in terms of non-tower elements)
  • It should loop through all cards and see if a winning card exists, then use a tie card (it shouldn't see a tie card and use it immediately without seeing all cards)

See also #45 (Add AI level settings)

Add pixelated mode

Add an option to switch to pixelated mode.

Use canvas to directly pixelate the normal mode images (raster and svg) without switching to another set of images

  • Pixelation for raster images
  • Pixelation level option

See also: 2015 Game MSX Arcomage (not sure if they were somehow affiliated with 3DO)

Notes:

  • Pixelation for SVGs: will not do, because most SVGs in the game are animated, it's hard to convert them to canvas
  • Pixel fonts: see #46

Add more taverns

  • Add all Arcomage-playable taverns from mm7 (Antagarich), mm8 (Jadame)
  • Add 6 castles in mm6 (Enroth)
  • Adjust presettings of each tavern/castle, any two taverns/castles shouldn't have a same set of presettings
  • Regroup taverns in the <select> form element in the preference window
  • I18n for all these

Range type input should not use 'slider-vertical'

For input[type='range'] in volume and visual settings:

  • In the console, it shows a warning The keyword 'slider-vertical' specified to an 'appearance' property is not standardized. It will be removed in the future.
  • In Firefox, the widget is not vertical

Campaign Mode Button & Window

  • Add Campaign button between Preferences and Languages
  • Add world map showing all taverns (incl. castles) (#52) in Campaign window
  • Each tavern can show its name, brief info (starting condition, etc.), win/lose/draw counts which serve as or link to the leaderboard (#11)
  • When any of the three campaigns (Antagarich, Jadame, Enroth) is complete, and when all of them are complete, show a downloadable game completion certificate similar to mm6/7/8's
  • Write a short story for the campaign and show it in the Campaign window
  • I18n

Minimum generator (production) is 1, not 0?

The game does not allow for you to knock the enemy Resource to a zero level?
Quarry, Magic, Dungeon.

Was this done on purpose? I have not played a version, were this was the case.
Am i doing something wrong?

No work on Linux (White screen)

Hello
ArcoMage HD Setup 1.0.0.exe wont run on Linux.

I dont like compiling, just want to play without browser.
Using Linux Mint 19.3 kernel 5.12
Using Videocard Radeon Vega 8 (Ryzen 3200G cpu) (has a problems with Vulkan rendering)
Alternative game tribute has 25mb version without sources but works perfect
Why your version shows White screen?

Zrzut ekranu z 2021-05-28 17-02-25

Minor problems & potential enhancements related to menu buttons & windows

  • Menu buttons should be clickable with middle and right mouse buttons.
  • Click a menu button, it shows a preference window, click the same menu button, it should close the window, not close and quickly show it again.
  • When a preference window is open, Esc is supposed to close the window, but in fullscreen mode, Esc will exit the fullscreen mode and not close the window.
  • Menu buttons shouldn't have context menu

Linting

Update Prettier & ESLint, check / lint everything

[META] I18N (Translation / Localization)

Existing language versions

  • English (en)
  • French (fr)
  • German (de)
  • Simplified Chinese (zh-Hans)
  • Traditional Chinese (zh-Hant)
  • Russian (ru)
  • Spanish (es)
  • Italian (it)
  • Czech (cs)
  • Polish (pl)
  • Brazilian Portuguese (pt-BR)
  • Japanese (ja)
  • Ukrainian (uk)

All complete. Listed in order of translation completion time (in the game they are listed in alphabetical order of the language code)

For translation credits, see: README Β§ Translation Credits


Add new language, or fix existing language

Feel free to open a new issue if you want to add a new language version, or correct something in an existing language version.

Instruction on how to add a new language version:

Duplicate files

Git clone (or download) the repo.

Duplicate (Ctrl+C copy then Ctrl+V paste) these files in their own, respective folders:

And rename them to <LANGCODE>.ts, where <LANGCODE> is your language tag (e.g. en, fr-CA, zh-Hans).

Translate

a. Translate src/i18n/main/<LANGCODE>.ts file, by changing the string on the right. For example, change 'Your Name': 'Your Name', to 'Your Name': 'Votre nom'

b. Translate src/i18n/cards/<LANGCODE>.ts file:

name: '<Translated card name>',
desc: '<Translated card desciption>',

You can also refer to:

c. Translate src/i18n/taverns/<LANGCODE>.ts file:

name: '<Translated tavern name>',
location: '<Translated location name>',

Commented-out text (text after //) are optional, you can translate them or ignore them.

langs.ts file

In src/i18n/langs.ts file, add a new line for your language in the format of <LANGCODE>: { local: '<LANGUAGE NAME IN THAT LANGUAGE>', en: '<LANGUAGE NAME IN ENGLISH>', isLatinScript: <IS IT A LATIN LETTER BASED LANGUAGE, true OR false> }, (example: fr: { local: 'Français', en: 'French', isLatinScript: true },), into langInfo object.

If you don't know how to do it, just send me "main" "cards" "taverns" translation, I'll modify src/i18n/langs.ts file.

Send me the translation

Create a pull request.

If you don't know how to create a pull request, just submit a comment with your translated text below, or on celestialheavens forum, or send me everything via email, etc.

Card could be mistakenly drawn to the opponent and stop the multiplayer game

In high latency connection, if multiple actions are pulled and executed together (because early instruction arrives late), the said problem could sometimes happen.

Maybe not related to #27, but to be investigated.

Samples:

// pulled (executed):
[
  {
    kind: "INST",
    data: { type: "DRAW_CARD_TO_QUEUE", n: 47 },
    seq: 47,
    gameNumber: 1619018788722,
  },
  {
    kind: "INST",
    data: {
      type: "PLAY_CARD_TO_QUEUE",
      payload: {
        type: "USE_CARD_CORE",
        n: 4,
        index: 3,
        position: 3,
        owner: "opponent",
      },
    },
    seq: 48,
    gameNumber: 1619018788722,
  },
  {
    kind: "INST",
    data: { type: "DRAW_CARD_TO_QUEUE", n: 62 },
    seq: 49,
    gameNumber: 1619018788722,
  },
];
// pulled (executed):
[
  {
    kind: "INST",
    data: {
      type: "PLAY_CARD_TO_QUEUE",
      payload: {
        type: "DISCARD_CARD_CORE",
        index: 16,
        position: 3,
        owner: "opponent",
      },
    },
    seq: 119,
    gameNumber: 1619026552609,
  },
  {
    kind: "INST",
    data: { type: "DRAW_CARD_TO_QUEUE", n: 41 },
    seq: 120,
    gameNumber: 1619026552609,
  },
];

Add multiplayer mode

Online multiplayer mode with WebRTC & light relay server maybe.

(Yes, this way it'll have no strict way to prevent cheat, but it stays a game at home or between friends, I have no intention to use servers for the logic of the game)

Improve Google Lighthouse score

Will do / have done:

  • Serve images in next-gen formats (.webp)
  • Buttons do not have an accessible name
  • [user-scalable="no"] is used in the element or the [maximum-scale] attribute is less than 5
  • Ensure text remains visible during webfont load (by using font-display: swap;)

Won't/can't do:

  • Serve static assets with an efficient cache policy (long cache lifetime) [idem]
  • Avoid enormous network payloads [already minified]
  • Some elements have a [tabindex] value greater than 0 [by design]

Periodically check if opponent is online

The game now shows an alert when opponent disconnects (#23)

However, if opponent's browser / OS / computer crashes, (s)he has no way to send disconnect request.

So it might be good to periodically check if opponent is online

Make a world map

Make a world map for taverns and Campaign Mode.

The planet will be called "the Planet", instead of confusing name "Enroth" or unofficial name "C.O.L.O.N.Y."

Multiple issues related to new game transition (after finishing previous one) in high latency connection

Problems

Problematic behaviours include:

  • Card could be mistakenly drawn to the opponent and stop the game
  • ABORT_ALL fires late and mistakenly abort actions in a new game

Problematic behaviours that may (or may not) have been solved:

  • Host may send one or multiple winning hand instruction and it could become messy and crash / freeze the game or misplace the cards
  • Guest could send instruction which arrives late but host has already started a new game so it becomes an instruction during the new game
  • If a new multi game has started, then host's previous end game screen should not fire init action

Solutions

To solve the issues, the multiplayer mode needs some major update:

  • Not only queue PLAY_CARD and DRAW_CARD actions like what we do now, but also queue INIT actions (for natural init. i.e. new game after end screen)
    • All instructions (host sent actions) must be executed passively and only when guest asks, except for TempSettings-related, and host's red button initiated, forced UpdateSettings & Init actions
  • Properly abort actions (and clear queue if necessary) of the previous game but not of the new game (for host's red button initiated, forced init)

The "Apprentice" card does not do damage to the tower.

As said in the title: the text on the "Apprentice" card says that it does two damage to the enemy tower, but in fact it just does two damage (so if the opponent has a wall, it is reduced first).

This bug could be easily fixed by replacing the line 807 of the file src/data/cards.ts with change(o, 'tower', -2).

Speed setting

As of now the animations are way slower than in the original. An option to increase speed (or faster default) would be pretty important.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.