GithubHelp home page GithubHelp logo

ece493-capstone's People

Contributors

ad3kunl3 avatar mayshukla avatar mrboisvert avatar

Watchers

 avatar

ece493-capstone's Issues

Some obstacles don't generate collisions, or generate collisions in the wrong location

From @mrboisvert :

So when I add this code to add a whole bunch of obstacles the agent does collide with some of them. I think maybe it's the obstacle positions that are weird. Like the obstacles don't collide at the locations we are expecting. I'm pretty confused

        self.physics.add_obstacle(Obstacle(self.gen_id(), Vector2(479.5, 337.5), 32, 32))
        self.physics.add_obstacle(Obstacle(self.gen_id(), Vector2(511.5, 369.5), 32, 32))
        self.physics.add_obstacle(Obstacle(self.gen_id(), Vector2(447.5, 305.5), 32, 32))
        self.physics.add_obstacle(Obstacle(self.gen_id(), Vector2(799.1666666666666, 562.5), 32, 32))
        self.physics.add_obstacle(Obstacle(self.gen_id(), Vector2(831.1666666666666, 562.5), 32, 32))
        self.physics.add_obstacle(Obstacle(self.gen_id(), Vector2(799.1666666666666, 530.5), 32, 32))
        self.physics.add_obstacle(Obstacle(self.gen_id(), Vector2(863.1666666666666, 562.5), 32, 32))
        self.physics.add_obstacle(Obstacle(self.gen_id(), Vector2(799.1666666666666, 498.5), 32, 32))
        self.physics.add_obstacle(Obstacle(self.gen_id(), Vector2(159.83333333333334, 112.5), 32, 32))
        self.physics.add_obstacle(Obstacle(self.gen_id(), Vector2(127.83333333333334, 112.5), 32, 32))
        self.physics.add_obstacle(Obstacle(self.gen_id(), Vector2(159.83333333333334, 144.5), 32, 32))
        self.physics.add_obstacle(Obstacle(self.gen_id(), Vector2(95.83333333333334, 112.5), 32, 32))
        self.physics.add_obstacle(Obstacle(self.gen_id(), Vector2(159.83333333333334, 176.5), 32, 32))

Collision bug

AttributeError: 'NoneType' object has no attribute '_add_collision'

Render name of agent and health bar

From SRS, FR3 - UI.RenderGame:
The system should render the following items:
...

  • Agents
    • text label showing the name of each agent
    • health bar showing the percentage of health that each agent has

...

Handle state messages in frontend

State messages are received by frontend but positions of sprites aren't properly updated.

Also, we need to send a message to indicate that when projectiles are removed.

Stop rendering agents when health gets to zero.

Remove a projectile after receiving a an object destroyed from server #16

Stop receiving keyboard input.

Moving through obstacles after collision

While agent collision with obstacles is detected and the collision callback is called, agents can still move through obstacles or boundaries if they continue to set their velocities in the direction of the obstacle.

Agents can move through obstacles while attacking

When the following player code is used for both agents, the agent on the right moves through the right wall

class MyAgent(Agent):
    """Enter your code here ..."""
    angle = 20
    movement = 250 
    hit_flag = False
    x = 20
    def run(self):
        self.attack_ranged(0)
        if MyAgent.hit_flag:
            self.set_movement_direction(MyAgent.angle - 90) 
            self.set_movement_speed(MyAgent.movement)
            MyAgent.x -= 1
        if MyAgent.x <= 0:
            MyAgent.hit_flag = False
            MyAgent.x = 20
        else:
            self.set_movement_speed(MyAgent.movement)
            self.set_movement_direction(MyAgent.angle)

    def on_obstacle_hit(self):
        MyAgent.angle += 90
        MyAgent.hit_flag = True

Check for win condition and display results

Game should check for an agent being eliminated. When this happens, the game should stop and the server should send the results to clients.

The clients should display the results screen.

We will need to keep track of survival times in the Game class.

Clients aren't removed from matchmaking queue if they disconnect before a game starts

If another client connects and a game is started, the follow error with be raised:

ServerToClientConnection closed
New ServerToClientConnection
Starting a new game
ERROR:tornado.application:Uncaught exception GET /websocket (::1)
HTTPServerRequest(protocol='http', host='localhost:9000', method='GET', uri='/websocket', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "/home/may/.local/lib/python3.10/site-packages/tornado/websocket.py", line 954, in _accept_connection
    open_result = handler.open(*handler.open_args, **handler.open_kwargs)
  File "/home/may/Files/school/ece493/ece493-capstone/src/server.py", line 24, in open
    self.game_server.enqueue(self)
  File "/home/may/Files/school/ece493/ece493-capstone/src/gameserver.py", line 19, in enqueue
    self.start_game(clients)
  File "/home/may/Files/school/ece493/ece493-capstone/src/gameserver.py", line 26, in start_game
    client.write_message("Found match. Starting game...")
  File "/home/may/.local/lib/python3.10/site-packages/tornado/websocket.py", line 337, in write_message
    raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError

Render animation for attacks and damage

From SRS, FR3 - UI.RenderGame:
The system should render the following items:
...

  • Animations for when agents perform an attack or are hit by an attack
    • Note: Animations do not need to be complicated. They can be as simple as a colour
      change.

...

Comment requirements on each code file

From system implementation assignment:

Each code unit must include a reference (as comments) to one or more specific requirements mandating its inclusion.

Probably good enough to have one comment per file

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.