Code Monkey home page Code Monkey logo

dark-world's People

Contributors

dependabot[bot] avatar lordmauve avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dark-world's Issues

Object rotation W to S

When objects rotated from W to S they go all the way around. This is due to a simple interpolation in Y rotation values.

One antidote to this would be Slerp.

Crash in pathfinding

There appear to be bugs in pathfinding (possibly when there is no valid route?):

Exception in callback EnemyAI.think()
handle: <TimerHandle when=15530122.692093613 EnemyAI.think()>
Traceback (most recent call last):
  File "/tmp/artfs-fuse-mount-KMFxh3uv/1dc90f7a36a7f973c711e50b91235ba0f6615129_20180425_143724_419/glibc-2.13-x86_64/ext/public/python/3/6/x/dist/lib/python3.6/asyncio/events.py", line 145, in _run
    self._callback(*self._args)
  File "/home/mauve/dev/dark-world/darkworld/ai.py", line 85, in think
    path = a_star_search(e.world, e.pos, target.pos)
  File "/home/mauve/dev/dark-world/darkworld/ai.py", line 154, in a_star_search
    return reconstruct_path(came_from, start, goal)
  File "/home/mauve/dev/dark-world/darkworld/ai.py", line 124, in reconstruct_path
    current = came_from[current]
KeyError: (-4, 8)

Crash in EnemyAI.think()

Exception in callback EnemyAI.think()
handle: <TimerHandle when=15530281.037834777 EnemyAI.think()>
Traceback (most recent call last):
  File "dist/lib/python3.6/asyncio/events.py", line 145, in _run
    self._callback(*self._args)
  File "/home/mauve/dev/dark-world/darkworld/ai.py", line 88, in think
    d = direction_to(e.pos, step)
  File "/home/mauve/dev/dark-world/darkworld/coords.py", line 75, in direction_to
    return INV_DIRECTION_MAP[delta]
KeyError: (0, 0)

Improve terrain rendering

Add splatmap-controlled texture blending.

Lacking height (currently), we should use an Advanced Texture Splatting approach to preserve visual interest. The idea here is to use the alpha channel as a per-texture height map, which means that the textures blend together in texture-dependent ways.

Example video

Poor feedback if websocket connection unavailable

Sometimes websockets are unavailable due to proxies etc. Currently in this case the client just periodically says "connection closed: 1006".

We should provide a useful error message instead when we fail to connect.

Crash when enemy stands on something

Exception in callback EnemyAI.think()
handle: <TimerHandle when=15535387.597063713 EnemyAI.think()>
Traceback (most recent call last):
  File "/tmp/artfs-fuse-mount-KMFxh3uv/1dc90f7a36a7f973c711e50b91235ba0f6615129_20180425_143724_419/glibc-2.13-x86_64/ext/public/python/3/6/x/dist/lib/python3.6/asyncio/events.py", line 145, in _run
    self._callback(*self._args)
  File "/home/mauve/dev/dark-world/darkworld/ai.py", line 95, in think
    e.move_step(random_dir())
  File "/home/mauve/dev/dark-world/darkworld/actor.py", line 102, in move_step
    self.world.move(self, to_pos)
  File "/home/mauve/dev/dark-world/darkworld/world.py", line 165, in move
    obj.below.on_enter(obj)
  File "/home/mauve/dev/dark-world/darkworld/actor.py", line 529, in on_enter
    pc.client.text_message(f'Picked up a {self.item.singular}')
AttributeError: 'Enemy' object has no attribute 'client'

Race condition on model loading

When a spawn or refresh message is received, we load the model and schedule a callback to add a model to the scene and to set its UID.

During the delay while the model is being loaded, a move message may be received for this UID. Because the UID is not in the scene at this point it will also cause the model to be loaded and added a second time.

The fix is to add an object with the correct UID to the scene synchronously, and populate or replace that object when model loading is complete.

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.