Giter Site home page Giter Site logo

oestrich / ex_venture Goto Github PK

View Code? Open in Web Editor NEW
657.0 25.0 74.0 23.67 MB

Text based MMORPG engine written in Elixir

Home Page: https://exventure.org

License: MIT License

Elixir 62.22% Shell 0.42% JavaScript 24.04% HTML 11.08% Dockerfile 0.21% SCSS 2.04%
mud elixir text-based phoenix

ex_venture's People

Contributors

dependabot[bot] avatar oestrich 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ex_venture's Issues

can't seem to compile dependency: kalevala

Hi there, excited to try this out but I keep running into this error:

``== Compilation error in file lib/kalevala/output/tables.ex ==
** (UndefinedFunctionError) function :elixir_interpolation.unescape_chars/1 is undefined or private. Did you mean:

  * unescape_map/1
  * unescape_string/2
  * unescape_string/1
  * unescape_tokens/1

(elixir 1.13.2) :elixir_interpolation.unescape_chars("+")
(elixir 1.13.2) lib/enum.ex:1593: Enum."-map/2-lists^map/1-0-"/2
expanding macro: Kalevala.Character.View.Macro.sigil_i/2
lib/kalevala/output/tables.ex:263: Kalevala.Output.Tables.display_rows/1

could not compile dependency :kalevala, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile kalevala", update it with "mix deps.update kalevala" or clean it with "mix deps.clean kalevala"``

Private Dep

It looks like the qrcode dep is hosted in a private gitlab repo. I'm unable to complete mix dep.get because of this.

Can't run `mix ecto.reset`

I get the following error; I have no modified the README.

01:02:36.292 [error] GenServer #PID<0.2905.0> terminating
** (RuntimeError) connect raised KeyError exception: key :password not found. The exception details are hidden, as they may contain sensitive data such as database credentials. You may set :show_sensitive_data_on_connection_error to true when starting your connection if you wish to see all of the details
    (elixir) lib/keyword.ex:393: Keyword.fetch!/2
    (postgrex) lib/postgrex/protocol.ex:722: Postgrex.Protocol.auth_md5/4
    (postgrex) lib/postgrex/protocol.ex:579: Postgrex.Protocol.handshake/2
    (db_connection) lib/db_connection/connection.ex:69: DBConnection.Connection.connect/2
    (connection) lib/connection.ex:622: Connection.enter_connect/5
    (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: nil
** (Mix) The database for Data.Repo couldn't be dropped: killed

Seeds Broken

Getting a lot of 'changeset is invalid' around effects being defined on importing the seeds.

I fixed inelegantly by simply removing effects from bandit, the sword, and magic_missile which seemed to allow things to import.

Seed file seems to be broken

When running

mix run priv/repo/seeds.exs
** (KeyError) key :item_ids not found in: %Data.Save{channels: ["global", "newbie"], currency: nil, experience_points: 0, items: nil, level: 1, room_id: {{:., [line: 292], [{:entrance, [line: 292], nil}, :id]}, [line: 292], []}, stats: nil, version: nil, wearing: nil, wielding: nil}
    (stdlib) :maps.update(:item_ids, [{{:., [line: 296], [Data.Item, :instantiate]}, [line: 296], [{:sword, [line: 296], nil}]}], %Data.Save{channels: ["global", "newbie"], currency: nil, experience_points: 0, items: nil, level: 1, room_id: {{:., [line: 292], [{:entrance, [line: 292], nil}, :id]}, [line: 292], []}, stats: nil, version: nil, wearing: nil, wielding: nil})
    (ex_venture) lib/data/save.ex:28: anonymous fn/2 in Data.Save.__struct__/1
    (elixir) lib/enum.ex:1826: Enum."-reduce/3-lists^foldl/2-0-"/3
    (ex_venture) expanding struct: Data.Save.__struct__/1
    priv/repo/seeds.exs:291: Seeds.run/0

Compilation failure

Hi, trying to "mix compile" and getting the following error.

== Compilation error in file lib/game/session/supervisor.ex ==
** (CompileError) lib/game/session/supervisor.ex:6: module DynamicSupervisor is not loaded and could not be found
(elixir) expanding macro: Kernel.use/1
lib/game/session/supervisor.ex:6: Game.Session.Supervisor (module)

Wrong lines order for NPC entering

[101/101hp 66/66sp 24/24mv 25xp]  
You are being targeted by Goblin.

You are now targeting Goblin.

Goblin enters from the west.

[98/101hp 66/66sp 24/24mv 25xp]  
Goblin fails a club at you.
3 bludgeoning damage is dealt to Vadi.

Overworld TODO

Known issues with the overworld

  • Change the map size
    • Sector processes are started/stopped depending on new size
  • background map colors
  • On login, the game checks if your room is still available, this should work with the overworld
  • Items in the overworld
  • Item pick up
  • Dropping an item
  • Listening on the overworld
  • Shops, maybe
  • Look in a direction
  • Say/emote/whisper might want to echo further than the exact same cell
  • Doors
  • Creating exits into/out of the overworld
  • Scanning
  • "Empty" cells should not get exits to

Problem with docker set up

Hi,

I get the following on Ubuntu 18.04

~/Dev/ex_venture-master$ docker-compose run --rm ex_venture seed
Starting ex_venture-master_postgres_1 ... done
Loading ex_venture...
Starting dependencies..
Starting repos..
Running seed script..
โ–ธ Evaluation failed with: ERROR 42P01 (undefined_table): relation "zones" does not exist

This is from following the instructions here: https://exventure.org/docker/

I have installed:
Docker version 18.06.1-ce, build e68fc7a and docker-compose version 1.21.2, build a133471

Any ideas? This was pulled from github on the 28th September

Thanks

Tom

Wrong target still attacks current target

https://ada-young.appspot.com/pastebin/Jxyv9DOe

This seems dangerous and a potential source of frustration if the engine auto-picks to do something else than what you intended. I think it should complain about the invalid attack order.

While it seems like a convenience, there could be a situation where you make a mistake and didn't mean to attack, for example, and the engine finding a valid target and aggroing it for you would be bad.

Proficiencies TODO

Missing from proficiencies still:

  • train new proficiencies from npc trainers
  • hone your proficiencies
  • display what you do have for a missing requirement when moving.
  • when looking in a direction, show if you meet the requirement or not
    • if not display what you have

Trying again to install via docker

HI,

trying to install via docker instructions on the project website.

When i try and login via website it says there was a problem creating the account and account creation failed contact the administrator. When i try via tintin i get a url to connect to https:/connection/authorize?id=9f439079-b394-4cb9-b1c0-59351a2b5b5f

i assume connection should be 127.0.0.1:4000 as its run locally?

When you try and connect you get an ssl error:

An error occurred during a connection to 127.0.0.1:4000. SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG

This is using the latest firefox if thats relevant. And latest docker and docker-compose.

Can any one help?

thanks!

shifters

Migration issue

When attempting to run ecto.migrate on a cloud sql server, i had an error saying that "update users set save = (select row_to_json(t) from (select id as room_id from rooms limit 1) t) is a json expression while save is a jsonb column. I had to cast the expression to jsonb in order to continue.

I had also another error with uuid, i have changed the sql request create extension \"uuid-ossp\"; to create extension IF NOT EXISTS \"uuid-ossp\";

Stats/boost gives error when saving

When trying to add the stats/boost effect to a skill and edit any field it errors when saving. "There was an issue update [skill]. Please try again."

It works if you leave the default values, but any changes will cause it to not save.

Seeds broken / Query error when booting up app

I just installed my app. I ran mix ecto.reset successfully. I continued by running mix run --no-halt and when I visited localhost:4000, I got the following error. No changes have been made to the repo itself. I did get the same error when running mix run priv/repo/seeds.exs.

        + 1 hidden module
01:21:24.834 [error] GenServer Game.Config terminating
** (Ecto.MultipleResultsError) expected at most one result but got 2 in query:

from c0 in Data.Config,
  where: c0.name == ^"game_name",
  select: c0.value

    (ecto) lib/ecto/repo/queryable.ex:100: Ecto.Repo.Queryable.one/3
    (ex_venture) lib/game/config.ex:353: Game.Config.handle_call/3
    (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4
    (stdlib) gen_server.erl:690: :gen_server.handle_msg/6
    (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message (from #PID<0.893.0>): {:reload, "game_name"}
01:21:24.854 [error] #PID<0.893.0> running Web.Endpoint (connection #PID<0.891.0>, stream id 1) terminated
Server: localhost:4000 (http)
Request: GET /
** (exit) exited in: GenServer.call(Game.Config, {:reload, "game_name"}, 5000)
    ** (EXIT) an exception was raised:
        ** (Ecto.MultipleResultsError) expected at most one result but got 2 in query:

from c0 in Data.Config,
  where: c0.name == ^"game_name",
  select: c0.value

            (ecto) lib/ecto/repo/queryable.ex:100: Ecto.Repo.Queryable.one/3
            (ex_venture) lib/game/config.ex:353: Game.Config.handle_call/3
            (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4
            (stdlib) gen_server.erl:690: :gen_server.handle_msg/6
            (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3

Performance Testing

I've been trying to see how far I can push ExVenture with minimal changes. I hope to have this issue to start tracking them.

  • Quest tracking as you move around should not hit the database
  • Disable sign in and out messages as more players show up
  • Players don't need to update their character in the session registry as often (really only when going AFK)
  • Character saving should be pushed further out (1 min, 5 min?, as needed?)
  • Cache the current player count, instead of calculating it

Ecto.InvalidChangesetError when applying seed during setup

Thanks for the super-detailed set up instructions! Everything was going fine until I got to mix run priv/repo/seeds.exs, at which point i got the error below. Unfortunately, i'm not well-versed enough in Ecto to debug this on my own yet, so i figured i would report the bug in case it's some sort of trivial fix. Otherwise, i'll try and take a look in the next few days to see if i can resolve the issue on my own. Thanks!

** (Ecto.InvalidChangesetError) could not perform insert because changeset is invalid.

Applied changes

    %{
      currency: 100,
      events: [
        %{action: %{type: "target"}, type: "room/entered"},
        %{
          action: %{
            delay: 2.0,
            effects: [%{amount: 2, kind: "damage", type: "slashing"}],
            text: "[user] slashes at you.",
            type: "target/effects",
            weight: 10
          },
          type: "combat/tick"
        }
      ],
      experience_points: 230,
      level: 2,
      name: "Bandit",
      stats: %{
        constitution: 10,
        dexterity: 10,
        health_points: 25,
        intelligence: 10,
        max_health_points: 25,
        max_move_points: 10,
        max_skill_points: 10,
        move_points: 10,
        skill_points: 10,
        strength: 13,
        wisdom: 10
      }
    }

Params

    %{
      "currency" => 100,
      "events" => [
        %{action: %{type: "target"}, type: "room/entered"},
        %{
          action: %{
            delay: 2.0,
            effects: [%{amount: 2, kind: "damage", type: "slashing"}],
            text: "[user] slashes at you.",
            type: "target/effects",
            weight: 10
          },
          type: "combat/tick"
        }
      ],
      "experience_points" => 230,
      "level" => 2,
      "name" => "Bandit",
      "stats" => %{
        constitution: 10,
        dexterity: 10,
        health_points: 25,
        intelligence: 10,
        max_health_points: 25,
        max_move_points: 10,
        max_skill_points: 10,
        move_points: 10,
        skill_points: 10,
        strength: 13,
        wisdom: 10
      }
    }

Errors

    %{events: [{"are invalid", []}]}

Changeset

    #Ecto.Changeset<
      action: :insert,
      changes: %{
        currency: 100,
        events: [
          %{action: %{type: "target"}, type: "room/entered"},
          %{
            action: %{
              delay: 2.0,
              effects: [%{amount: 2, kind: "damage", type: "slashing"}],
              text: "[user] slashes at you.",
              type: "target/effects",
              weight: 10
            },
            type: "combat/tick"
          }
        ],
        experience_points: 230,
        level: 2,
        name: "Bandit",
        stats: %{
          constitution: 10,
          dexterity: 10,
          health_points: 25,
          intelligence: 10,
          max_health_points: 25,
          max_move_points: 10,
          max_skill_points: 10,
          move_points: 10,
          skill_points: 10,
          strength: 13,
          wisdom: 10
        }
      },
      errors: [events: {"are invalid", []}],
      data: #Data.NPC<>,
      valid?: false
    >

    (ecto) lib/ecto/repo/schema.ex:128: Ecto.Repo.Schema.insert!/4
    priv/repo/seeds.exs:281: Seeds.run/0
    (elixir) lib/code.ex:677: Code.require_file/2
    (mix) lib/mix/tasks/run.ex:136: Mix.Tasks.Run.run/5
    (mix) lib/mix/tasks/run.ex:76: Mix.Tasks.Run.run/1

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.