Skip to content

yongtenglei/dino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

๐Ÿฆ– Dino

bigme

How could I only get 581 on my e-ink device, even though it runs at 21 FPS? So I have to have my own one. Now I can have much higher scores...

The sprites are from loparcog/chrome-dinosaur and soundtracks (sound effects) are from The sounds resource.

The running soundtrack generated by script:

import numpy as np
import scipy.io.wavfile as wavfile

sample_rate = 44100
duration = 0.3
pulse_width = 100
pulse_gap = 15000

signal = np.zeros(int(sample_rate * duration))
for start in range(0, len(signal), pulse_gap):
    end = min(start + pulse_width, len(signal))
    signal[start:end] += np.hamming(end - start) * 0.8

signal = np.clip(signal, -1, 1)

audio_data = np.int16(signal * 32767)

output_path = "./assets/run.wav"
wavfile.write(output_path, sample_rate, audio_data)

โœจ Features

  1. ๐Ÿฆ– Double Jump:

    Dinoโ€™s mighty legs let it leap once more while airborne โ€” because why not jump twice? ๐Ÿ•Š๏ธ๐Ÿฆต๐Ÿ’จ

  2. ๐ŸŠ Duck Dino:

    When danger flies high, go low. Ducking lets Dino dodge those pesky birds. ๐Ÿฆโฌ‡๏ธ

  3. ๐Ÿ˜ฎโ€๐Ÿ’จ Be Nice to Dino:

    Crawling is exhausting! After 3 seconds of ducking, Dino needs to stand up and catch a breath. ๐Ÿ›Œโฑ๏ธ

  4. ๐Ÿง  Vim Mode:

    Real pros use K to jump (instead of Space) and J to duck (instead of Down). Old habits die hard โ€” muscle memory, engage! ๐ŸŽฎโŒจ๏ธ๐Ÿ’ช

  5. ๐Ÿƒโ€โ™‚๏ธ Run Harder, Die Slower (WIP) Earn a revive every 1000 points ๐Ÿƒโ€โ™‚๏ธ๐Ÿ’จ๐Ÿ›ก๏ธ Because Dino deserves it. ๐Ÿ˜ค๐Ÿฆ–โœจ

๐ŸŽฎ Demo

demo

TODOs

  • Running soundtrack ๐Ÿƒโ€โ™‚๏ธโ€โžก๏ธ
  • Clouds in the air โ˜๏ธ
  • Better experience ๐ŸŽฒ
  • Duck Dino ๐Ÿฆ–
  • Vim mode โŒจ๏ธ
  • Run for Dino ๐Ÿƒโ€โ™‚๏ธ

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages