• Resolved Aristocles

    (@apos37)


    Do you happen to have any method for capturing the score using JS? It doesn’t seem to be storing it in local storage, session storage or cookies. Can I hook into it somehow? I mean, I can edit the JS file, but it will be overridden every time you update the plugin.

    • This topic was modified 1 year, 2 months ago by Aristocles.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chris David Miles

    (@chrisdavidmiles)

    The game doesn’t currently save high scores. I don’t have any plans on adding more features to the game or modifying it beyond what’s needed to work with other common WordPress plugins and WordPress core because I want to keep the plugin lightweight and fast.

    That being said, lots of people want to change plugin assets and use their own JS, their own image sprites, add custom classes or attributes to the sprites, etc.

    Everything from game js, css, spritemap images, the built in duplicate check, to the html attributes on the spritemaps themselves can be defined by another plugin using a PHP constant. If no other plugin defines those, the dinosaur-game plugin will fall back to its own default.

    Here’s a proof of concept of how you can use custom assets with the plugin:
    https://github.com/chrisdavidmiles/assets/raw/b41cc12b3db946e78517eb35a64a9291/custom-assets-dinosaur-game.zip

    There are also some interesting forks of the same t rex runner JavaScript on GitHub you may want to check out if you want to see what others have done:
    https://github.com/wayou/t-rex-runner

    I hope this helps!

    Thread Starter Aristocles

    (@apos37)

    Thank you. That helps!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Capture Score’ is closed to new replies.