ThomasDavisA / simple-twitch-chat-visualizer

0 stars 0 forks source link

Y axis movement #74

Closed ThomasDavisA closed 2 years ago

ThomasDavisA commented 2 years ago

I did a bit more when I probably should have separated this out, so apologies to this.

Kobold sprites and their names are contained in a Kobold Plate now. This allows me to keep the names under kobolds as they move about on screen. Y axis movement has been implemented, as well as the kobolds spawning in random locations.

Kobolds have been split into their own file as well.

mdavisprog commented 2 years ago

Tried to test this locally and ran into some issues.

  1. There is an error trying to call the 'update' function on a kobold's chat bubble on line 122 in kobold.js. This is due to the test kobolds that are added without creating a chat bubble for them. I don't know if this is something I missed or was missed with the rebase, but if you could add the following after line 76 in pixi-renderer.js, that would fix the issue.
    koboldList.forEach(data => {
        const newUser = addNewKobold(data, Y_AXIS_LOWER_BOUND, Y_AXIS_UPPER_BOUND, X_AXIS_LOWER_BOUND, X_AXIS_UPPER_BOUND);
        app.stage.addChild(newUser.koboldPlate);
        newUser.chatBubble = new ChatBubble(app.stage);
    })
  2. New kobolds that are added from the fetcher are spawned in the upper left corner of the browser and never move out of that position. I think this is because no bounds are passed in when calling 'addNewKobold'. This should be fixed before merging over.

Other than the two issues mentioned above, everything else looks good.

mdavisprog commented 2 years ago

Closing due to newer pull request merge.