-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
125 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- I renamed web-game to game-player. Have to fix everything upon that. | ||
- Split game-player so that we dont have settings in this way anymore. We use modules more independently | ||
- Refactor how interpolation works. We where thinking about doing it using components. Maybe extend the game entities into our own entities? | ||
- Redo ui using react | ||
- We wanted to extract reset functionality into game-web. Game should stay more pure. Especially since we have the bug that camera does not reset on reset call. For this also take a look if player in web should actually have such deep access. ALl sketchy. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
2 changes: 1 addition & 1 deletion
2
packages/web-game/src/game/game-loop.ts → packages/game-player/src/game-player-loop.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
packages/web-game/src/game/model/settings.ts → packages/game-player/src/model/settings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 22 additions & 3 deletions
25
packages/web-game/src/game/model/store.ts → packages/game-player/src/model/store.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,41 @@ | ||
import * as RAPIER from "@dimforge/rapier2d" | ||
import { EventStore } from "game/src/framework/event" | ||
import { ResourceStore } from "game/src/framework/resource" | ||
import { Game } from "game/src/game" | ||
import { Scene, WebGLRenderer } from "three" | ||
import { InterpolationStore } from "./interpolation" | ||
import { GameSettings } from "./settings" | ||
|
||
export class WebGameStore { | ||
public game: Game | ||
export class GamePlayerStore { | ||
public interpolation: InterpolationStore | ||
public renderer: WebGLRenderer | ||
public scene: Scene | ||
|
||
public events: EventStore<GamePlayerEvents> | ||
public game: Game | ||
public resources: ResourceStore<GamePlayerResources> | ||
|
||
constructor( | ||
public settings: GameSettings, | ||
renderer: WebGLRenderer, | ||
) { | ||
this.events = new EventStore() | ||
this.game = new Game(settings, { rapier: RAPIER }) | ||
this.resources = new ResourceStore({ | ||
renderer, | ||
scene: new Scene(), | ||
}) | ||
|
||
this.interpolation = new InterpolationStore(this.game) | ||
this.renderer = renderer | ||
this.scene = new Scene() | ||
this.renderer = renderer | ||
} | ||
} | ||
|
||
export interface GamePlayerResources { | ||
renderer: WebGLRenderer | ||
scene: Scene | ||
interpolation: InterpolationStore | ||
} | ||
|
||
export interface GamePlayerEvents {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...e/src/game/modules/module-hook-handler.ts → ...player/src/modules/module-hook-handler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.