Skip to content

Commit

Permalink
refactor(game): update readme, roadmap, clean code for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Hermann committed Dec 5, 2024
1 parent 2c66fd8 commit 3b10eaa
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 30 deletions.
16 changes: 4 additions & 12 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,13 @@ You can access to specific game setup by clicking the ⚙️ on the top right in
Here you can enable or disable few settings for your race:
<ul>
<li>🔊 Sounds</li>
<li>🧑‍🤝‍🧑 Spectators (may affect performance)</li>
<li>👻 Ghosts (may affect performance)</li>
<li>🧑‍🤝‍🧑 Spectators</li>
<li>👻 Ghosts</li>
<li> Particles (may affect performance)</li>
</ul>
You can also reset the game to default settings, restoring all tracks, ghosts, and records.

## 💡 Tips
### Preloaded tracks
The game includes 5 default tracks, so you can race on the same tracks as your friends, even on different devices:
1. <img src="https://www.kidlink.org/icons/f0-ch.gif" valign="middle"/> Davos (Giant slalom)
2. <img src="https://www.kidlink.org/icons/f0-ch.gif" valign="middle"/> Adelboden (Slalom)
3. <img src="https://www.kidlink.org/icons/f0-at.gif" valign="middle"/> Soelden (Giant slalom)
4. <img src="https://www.kidlink.org/icons/f0-ch.gif" valign="middle"/> Wengen (Super-G)
5. <img src="https://www.kidlink.org/icons/f0-ch.gif" valign="middle"/> Zermatt (Downhill)

### Different track styles
Each track style follows unique rules when generating a new track.<br>
Track style also impacts skier dynamics, mimicking real-world conditions.<br>
Expand All @@ -110,13 +102,13 @@ Ghost mode is activated by default so you can view your best time as you race.<b
</tr>
<tr>
<td><img src="src/assets/icons/event_record_ghost.png" valign="bottom"/></td>
<td>Event event best time on the track</td>
<td>Event best time on the track</td>
</tr>
</table>

### Performance
RetroSki is playable on any modern device with an updated browser.<br>
If you experience performance issues, try disabling spectators, ghosts, and particles in the game setup.
If you experience performance issues, try disabling spectators, ghosts, and particles in the game setup and reload the game.

### Crash
If the game crashes, try resetting and erasing all content via the game setup menu to reload the original content.
Expand Down
8 changes: 4 additions & 4 deletions roadmap.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Roadmap

## :calendar: Planning for the 2.0.0
- Improve particles
- Improve particles and performance
- Improve skier sprites when turning
- Implement async multiplayer
- Define default tracks, records and ghosts
- Rework skier dynamic
- Updatex excaliburjs core version
- Define new default tracks, records and ghosts
- ✔️ ~~Rework skier dynamic~~
- ✔️ ~~Update excaliburjs core version~~
- ✔️ ~~Finish learning pages~~
- ✔️ ~~Improve scrolling dynamic on event page~~
- ✔️ ~~Fix riders name selection~~
Expand Down
3 changes: 0 additions & 3 deletions src/app/common/models/result.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import { format } from 'date-fns';
import { Config } from '../../game/config';

export class Result {
public rider: string;
public date: Date;
Expand Down
1 change: 0 additions & 1 deletion src/app/common/models/rider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { StockableRecord } from '../../game/models/stockable-record';
import type { Result } from './result';

export class Rider {
Expand Down
2 changes: 1 addition & 1 deletion src/app/common/services/local-event.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Injectable, Signal, signal } from '@angular/core';
import { Injectable } from '@angular/core';
import { LocalEvent } from '../models/local-event';
import { Rider } from '../models/rider';
import type { Track } from '../../game/models/track';
Expand Down
4 changes: 3 additions & 1 deletion src/app/common/services/track.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export class TrackService {
}

public getTrackGhost$(trackId: number): Observable<StockableGhost | undefined> {
return from(RETROSKI_DB.ghosts.get(trackId)).pipe(map(ghost => ghost ? Object.assign(new StockableGhost(), ghost): undefined));
return from(RETROSKI_DB.ghosts.get(trackId)).pipe(
map(ghost => (ghost ? Object.assign(new StockableGhost(), ghost) : undefined))
);
}

public updateTrackGhost$(ghost: StockableGhost): Observable<number> {
Expand Down
3 changes: 1 addition & 2 deletions src/app/game/actors/spectator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ export class Spectator extends Actor {
width: Config.SPECTATOR_WIDTH,
height: Config.SPECTATOR_HEIGHT,
rotation: toRadians(rotation),
collisionType: CollisionType.Active,
// collider: new CircleCollider({ radius: 10, offset: vec(-1, 1) })
collisionType: CollisionType.Active
});

const randomizer = Math.random();
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/create-track/create-track.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChangeDetectionStrategy, Component, inject, Signal, signal } from '@angular/core';
import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';
import { ToolbarComponent } from '../../common/components/toolbar/toolbar.component';
import { ButtonIconComponent } from '../../common/components/button-icon/button-icon.component';
import type { Track } from '../../game/models/track';
Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/learning/learning.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
your best rides on this device. You can also play with friends by taking
turns on the same device.
</div>
<div class="retro-subtitle">Ride online</div>
<div class="retro-subtitle">Ride online (work in progress)</div>
<div class="retro-text">
Create or join a server with friends to share tracks and compete for the
best times.
Expand Down Expand Up @@ -152,7 +152,7 @@
<div class="retro-text">
Retroski is designed to run on any modern device with an up-to-date
browser. If you experience performance issues, try disabling ghosts,
spectators and particles in the setup menu.
spectators and particles in the setup menu and reload the game.
</div>
<div class="retro-subtitle">Have fun and keep riding !</div>
<div class="retro-text">
Expand Down
5 changes: 2 additions & 3 deletions src/app/pages/local-event/local-event.component.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { ChangeDetectionStrategy, Component, inject, Signal } from '@angular/core';
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { ToolbarComponent } from '../../common/components/toolbar/toolbar.component';
import { ButtonIconComponent } from '../../common/components/button-icon/button-icon.component';
import { Router, RouterLink } from '@angular/router';
import { RankingLineComponent } from '../../common/components/ranking-line/ranking-line.component';
import { ResultLineComponent } from '../../common/components/result-line/result-line.component';
import { type LocalEvent, LocalEventRace, LocalEventRanking } from '../../common/models/local-event';
import type { LocalEvent } from '../../common/models/local-event';
import { LocalEventService } from '../../common/services/local-event.service';
import { JsonPipe } from '@angular/common';

@Component({
selector: 'app-local-event',
Expand Down

0 comments on commit 3b10eaa

Please sign in to comment.