Code Monkey home page Code Monkey logo

taipo's Introduction

Taipo

Taipo is an experimental game exploring the idea of limiting control of the game to typing random Japanese phrases. There's also an English mode.

This could turn out to be a useful tool to practice quick Japanese recognition / production.

Play Online

A web build is hosted on itch.io.

Contributing

Please feel free to open a PR if you are motivated. See the TODO list below and any open Github issues.

Build

Taipo uses the Bevy engine and is pretty easy to build.

Build Dependencies

Bevy also has a few dependencies on Windows and Linux that you may need.

Build Taipo

cargo run --release

For web

cargo install cargo-make
cargo make --profile release serve

TODO

  • Move UI images into texture atlas.
  • Corpses should despawn after some time.
  • Load tower stats from game.ron.
  • Load starting yen from game.ron.
  • Position tower label placeholders in editor with a direction attribute (up/down/left/right)
  • Add a "partially typed" state to rendered glyphs?
  • If you type extra letters at the end of a target, but it otherwise matches, we should tint it red, not green.
  • Display upcoming wave's enemy type
  • ?Replace main menu with a typing interface.
  • Add some volume control, even if it's just typing "quieter" and "louder"
  • Add sound for
    • Wrong word after pressing enter
    • Correct word after pressing enter
    • Wave complete (Train Station Jingle?)
    • Enemy dealing damage
    • ?Becoming able to afford to do literally anything
    • ?Tower firing
    • ?Enemy taking damage
  • Art
    • Enemies (Last remaining BrowserQuest assets)
    • Map decorations
    • An auto-tilable tileset
    • Shuriken Tower is awful, so maybe that too
    • Another tower or two
  • Refactor so that we can restart the game without exiting and reopening.
  • More levels!
  • More words, word lists.
  • Add UI for choosing word lists
  • Allow users to add their own words

Attribution

We're temporarily using some unmodified assets from BrowserQuest, which are licensed under CC-BY-SA 3.0.

taipo's People

Contributors

rparrett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

taipo's Issues

web: Input is broken on international or non-qwerty keyboard layouts

This is due to a workaround for an issue that was causing the backspace key to be super janky. That issue may be in bevy and/or winit.

taipo/src/typing.rs

Lines 400 to 413 in ebcffca

// We were previously using Res<Events<ReceivedCharacter>> to handle the ascii bits,
// and Res<Events<KeyboardInput>> to handle backspace/enter, but there was something
// wacky going on where backspace could end up coming in out of order.
//
// After testing using puppeteer to shove various keyboard inputs in, it seems like
// this solution, though ugly, results in a better typing experience.
//
// I had also attempted to get ReceivedCharacter to give me backspace/enter, but that
// was not working, despite winit docs seeming to suggest that it should. But I found
// that I received no ReceivedCharacter events at all when typing backspace/enter.
//
// I'm guessing that the ReceivedCharacter approach would be ideal though if this
// solution doesn't work for people with non-english keyboards or dvorak layouts or
// whatever.

Long words are not fully visible in "help mode"

Ex:

11月1日
juuichigatsutsuitachi

Possible fixes

  • Just decrease font size in help mode
  • Can bevy_ui do some sort of automatic scaling?
  • Decrease the font size of everything in the action panel

Consider using another asset pack

One of the main things contributing to low motivation to work on this project is artwork. I'm bad at it and it's not fun for me. The current art set is heavily inspired by tiles from Mother 3 with monsters drawn in a completely different style / scale and various poor quality custom work by me.

I am somewhat attached to the Good Pupper Memorial Tower and (slightly less so to the) Boss Coffee Vending Machine Tower, so they would need to be re-imagined.

It would be amazing if we could find an asset pack that covers more ground in a cohesive way. Especially if the author is amenable to doing custom work.

Requirements

  • Compatible licensing for redistribution in an open source project
  • A decent variety of monsters with walk and attack animations
  • 16x16 tiles. (maybe 32x32, but 16x16 seems easier to build on)

Wants

  • Japanese city and/or train things
  • Towers
  • Monster portraits

IME improvement ideas

Hello!

Copied from the itch.io comments:

One comment I have is that I really struggled with some of the IME-like input since the behavior seems to not be quite the same as what I'm used to. Some examples:

enpi -> えんぴ (game requires ennpi. IME allows n followed by any consonant, I think)
tu -> つ (requires 'tsu')
ti -> ち (requires chi)

There might be a few others as well I didn't notice or which I don't tend to use, (e.g. li -> ぃ, xyo -> ょ).

But, especially since this is a time-sensitive kind of game, it would be nice to support some of these common shortcuts. Maybe it would be useful to use a library like https://docs.rs/wana_kana/

I had a couple thoughts based on your reply. First, I just wanted to share this article I found which is related, but unfortunately their advice is primarily targeted to native applications and I don't think it can really be applied to web apps...

So, other potential options I could see working:

  1. Develop an IME for every possible language used in word list (seems... impractical at best, impossible at worst)
  2. Accept user input via an HTML box or something like that (basically, players bring their own IME. Might be annoying to glue together and look weird)
  3. Handle some basic forms of input and allow word lists to define a mapping for non-ascii characters (basically the current model, but with some changes)

Option 2 probably has the best support for all possible languages, but would require some glue code that can handle shuffling keyboard input from browser to the game, and might cause other input problems if you want to use things like arrow keys, etc.

Option 3 seems like the least work, and would probably entail just using a more robust conversion layer from ascii input to language output (check more possibilities while matching characters). If you wanted to go that route, here are some ideas about ways you could support multiple languages:

  • In the word list, include a language designator indicating the target language
    • You could use this to decide whether to enable specific-language IMEs like Japanese/Korean/Pinyin
    • This raises the question of how to deal with "unsupported" languages
  • Create mappings from ASCII characters -> target characters, some examples follow. This could easily get messy and be easy to miss things, I think. It also doesn't scale for e.g. Chinese which I believe would require thousands of mappings to be usable
    • e -> é
    • ss -> ß
    • ka -> か | カ

All around, I think this is a tricky issue so it may come down to what you are willing to give up vs how seamless you want the user experience to be. Hopefully this gives you some ideas to play with, and if you're interested I could even try implementing something to see how it is in practice. Let me know what you think!

Add a restart button

I believe I have maybe already done a good portion of the refactoring / cleanup to make this more straightforward.

So this shouldn't be too hard.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.