Page 1 of 2
Android game for the blind & deaf
PostPosted:Thu Nov 12, 2020 5:25 am
by jawfin
I decided to challange the ability to make a game which could be played without sound or pictures (which could also translate to an idle game to play unobtrustively), and thus created this catch game: -
https://play.google.com/store/apps/deta ... jawfin.bdc
Note its early access, so can't leave a rating!
By using echo location as determined by the phone's vibration your job is to catch the escapee. The rule is it will not move faster than you move your finger - but I did my best to make it as smart. Note that it is possible to catch it - after all it would be a matter of simplicity of doing so if you could see it - you just need deduce where it is and herd it into a corner.
There's a couple of options, double swipe up/down for difficulty to be harder/easier, And double swipe left or right for the vibration intensity to be smaller or bigger. Touch the screen with 3 fingers to reset those settings.
I have several ideas to improve it, which I'll get around to working in when I'm motivated enough to do so!
Please feel free to have a go at it, and if you have any suggestions for improvement, or just to make it more enjoyable, let me know.
I also have a few other ideas for games for the blind and deaf, I suppose it depends on whether the work would be apprciated (as they won't generate income).
Re: Android game for the blind & deaf
PostPosted:Tue Dec 15, 2020 6:53 am
by jawfin
Update released.
https://play.google.com/store/apps/deta ... jawfin.bdc
Put in audio ping & screen flash options. I put more instructions on the front screen. It also remembers best scores.
So far I have only got feedback from 1 person! But positive at least
Re: Android game for the blind & deaf
PostPosted:Thu Dec 17, 2020 2:42 am
by Bubbles
I'll test it for you!
Edit:
It def works although, maybe make it more obvious once you actually catch the ball. The vibration seems very subtle when you catch it. But maybe for a death/blind person a subtle vibration is not so subtle.
Also you can catch the ball very easy in seconds just by going ham with your finger like a lunatic!
Re: Android game for the blind & deaf
PostPosted:Thu Dec 17, 2020 7:40 am
by jawfin
I tried to avoid screenspam from catching it, but it may just be a framerate issue. I have it at 30 FPS, I could step it up. And yes, the irony of a frame rate of a screen that is just a black screen, but there's still multiple threads running, one for input and one for output, and they sync and "skip" frames to achieve that. You can make it harder, ie. ball smaller, for when it gets too easy. I also show my algorithm of how it tries to evade, so once you learn its patterns its easier to catch.
Re: Android game for the blind & deaf
PostPosted:Thu Dec 17, 2020 8:23 am
by Bubbles
Definitely has promise. Although I suspect finding deaf and blind people to try it out might be..... difficult. :p
Could be useful as a focusing exercise though as you do have to shut everyone out and feel it.
If I was to do it. It would be you hold the ball and you have to guide it through a maze.
And it starts vibrating more the closer you get to an edge or a wall.
Some thing like that.
Although, I suspect screen space may be a issue for that.
Re: Android game for the blind & deaf
PostPosted:Thu Dec 17, 2020 1:09 pm
by jawfin
Ok, so, I have in fact already designed the maze game I mentioned.
I'm a programmer, ergo I cheat. Here is the algorithm. I pick six (or so) random points, ensuring they are some distance from each other. The player starting from the top-left has to navigate through all 6, but not directly, so they go horizontal for the first (getting to it's X coord) then vertical to the Y, then rinse repeat for all points, and make bottom-right the last point. So its really going through 12+ points - but it'll feel like a maze.
Advantages to my system is its easy to write, its always solvable, and there's the possibility of the "maze" overlapping itself, thus making it harder than a visual maze (you can get tunnel style mazes which do that). The interface is there is no vibration until you leave the path, so the further they stray from the next point, the greater the vibration (note only modern devices support degrees of vibration).
So its all spec'd out, I'd just have to write it. I decided between catch and maze, catch would be more fun to play therefore I did it first. And depending on how interested people are, and my time, is whether I actually write maze!
Re: Android game for the blind & deaf
PostPosted:Thu Dec 17, 2020 2:14 pm
by Bubbles
Well, I'm no coder.
I think if I was to do it I would just use the unity game engine or something just as simple that allows easy exporting to other platforms. I'd just use hit detectors attaching them to the geometry. The maze wouldnt take long to put together. Then I would colour it all black or just put a simple black overlay over it.
The only tricky bit would be doing the pulses.
I'm sure there is a cleaner way to do it but probably something along the lines of
if distanceToEdge == 0
{
print: game over
}
else if distanceToEdge == 1
{
Vibration = constant
}
else if distanceToEdge == 2
{
vibration = moderate
}
Now that prob makes no sense, but I've never made a game before so :p
Your way is definately better in terms of actually tackling the problem properly though xD.
On another note. I had a play with the PS5 the other day and the tactile trigger buttons are really amazing.
Re: Android game for the blind & deaf
PostPosted:Thu Dec 17, 2020 7:58 pm
by Mnsomc
Played around for a bit, definitely interesting. One thing though, is there some kind of an indication when I catch it? If not, would be good to have one (e.g., long vibration) and say so in the instruction.
Also since it's also a game for the blind, might be beneficial to think about narrated instruction in the long run (perhaps hire some of your international friends here for multilingual narration :p).
Re: Android game for the blind & deaf
PostPosted:Thu Dec 17, 2020 10:53 pm
by jawfin
There is a long vibration, and the screen changes and replays the whole chase - I should make the vibration longer if its not being noticed - but still the playback of the win works for a sighted person: -
https://youtu.be/WR5JOB6YcYk (the green circle being what you are trying to catch isn't so obvious on that video)
Spoken speech was another thing on my to-do list, and I was looking at this approach: -
https://www.tutlane.com/tutorial/androi ... vantxsphex
But the thing is I don't have any blind friends who can tell me what technology there already is. So I don't know what is currently in use by them, and it wouldn't surprise me if they already use a separate screen-reader / narrator application which will do it automatically, or that I fire an intent from. So my approach was to wait until someone asks me "but why doesn't it use
app/feature to read the screen out?" !
Re: Android game for the blind & deaf
PostPosted:Fri Dec 18, 2020 1:33 am
by Bubbles
Out of curiousity why decide to build games for the deaf and blind?
Re: Android game for the blind & deaf
PostPosted:Fri Dec 18, 2020 2:19 am
by Atsila
Because it is hard for someone like me to play games at times without sound and the vibration would be interesting. I would test it finding someone deaf is not hard actually.
Re: Android game for the blind & deaf
PostPosted:Fri Dec 18, 2020 2:37 am
by jawfin
Bubbles wrote:
Out of curiousity why decide to build games for the deaf and blind?
Its true, I don't know anyone - in fact, my nephew is learning sign and has many deaf friends, and I sent him a SMS about my game and got no reply - so it's not like I had anyone in mind (still, annoyed the kid didn't even bother to reply!!)
I guess because a smart phone has the capability to provide a game for those dealing with these limitations. I could also have used the accelerometer (moving the device through the air) and gyroscope (the angle it's on) and even the compass as input - but I was also aiming for discrete - and I couldn't see how to use those in a game!! For the blind and deaf the only output is vibrate (unless I've missed something?).
But to answer your question, the answer is in part in my
store listing: "Ergo this game can be played in the dark, and in silence. Handy when stuck watching a boring film!" and my first sentence on my
webpage "It occurred to me I wanted a small game which could be played without looking at the device, and with no noise." So could even play a game discretely lying in bed at night! Thus the challenge.
Less relevant but applicable is I'm teaching myself another programming language, Kotlin, and wanted a simple but purposeful app to develop it in.
@Atsila: any feedback you could provide would be extremely appreciated, as I hope you'd be well aware of! But no pressure of course. This is a project of love, so how it would best suit those who may use it, the happier we'll all be!!
Re: Android game for the blind & deaf
PostPosted:Sat Dec 19, 2020 4:03 pm
by Loki
It be nice to translate this to Swift and deployed to iOS as well using your game model. I have an Apple ID that I use tied to the App Store for deployment with a developer license.
Re: Android game for the blind & deaf
PostPosted:Sun Dec 20, 2020 1:55 am
by jawfin
Doesn't Apple natively support Kotlin?
https://kotlinlang.org/docs/mobile/crea ... ion-on-ios
As I don't go near Apple devices with a 10 foot pole with an extension attached I can't speak from experience!
Re: Android game for the blind & deaf
PostPosted:Sun Dec 20, 2020 4:17 am
by Loki
I think you can get away with compiling using kotlin but I don’t think it’s common enough especially when much of the packages are available natively using Swift and SwiftUI if you are going to be tapping into graphics engine of the phone. It be worth a try and interesting in finding out if it compiles directly
Re: Android game for the blind & deaf
PostPosted:Sun Dec 20, 2020 6:08 am
by jawfin
I can shoot you over the source, but just need to state you can't profit by it, so the app is provided free and no ads. The source is not for sharing and I maintain intellectual property. Any improvements shoot back to me so we can keep them the same! I'd also update the webpage to reference the Apple store.
It uses Android libraries, but it draws to the canvas for both the animation and all text, so no view objects which should make it easier. First test you can compile & run a blank Kotlin app just to see how much trouble it's going to be for you!
Re: Android game for the blind & deaf
PostPosted:Sun Dec 20, 2020 8:01 am
by Loki
Of course and another question I was curious about was the design pattern that you used during development did you use for MVC, MVVM, MVP, etc.
I will try this out i am curious to try compiling kotlin to an iOS application also my MacBook is not the fastest thing in the world. I did order a new Mac Mini with the new M1 chip, but it won’t arrive til Jan 26th.
Re: Android game for the blind & deaf
PostPosted:Sun Dec 20, 2020 11:52 am
by jawfin
The app barely has any data, I mean, this is it: -
Code: Select allobject S { //my settings singleton
var VibrateScale: Int = 3 //1 .. 5
set(value) {
field = if (value < 1) 1 else if (value > 5) 5 else value
if (field == value) //means it wasn't corrected, so log change
Timber.d("VibrateScale:%d", field) //Timber is a console logger, filtered out on the release build
}
var Difficulty: Int = 4 // mDifficultyRange = (10 - mDifficulty) * 10 //4 -> 49, 7->9 //4,6 7,1
set(value) {
field = if (value < 1) 1 else if (value > 7) 7 else value
if (field == value) {
Timber.d("Difficulty:%d", field)
calcRange()
}
}
var DoBeep: Boolean = false
var DoFlash: Boolean = false
var FastestTime = 0L
var FastestDistance = 0f
var ShortestTime = 0L
var ShortestDistance = 0f
fun calcRange() { //needed for canvas resize, which loads the width & height
val dif = (10 - Difficulty) * 10 //4 -> 49, 7->9 //4,6 7,1
mHitRange = dif * (if (mWidth < mHeight) mWidth else mHeight) / 700f
Timber.d("HitRange:%.0f", mHitRange)
}
init {
calcRange() //doesn't actually do anything as mWidth etc has no values
}
}
In Kotlin a class object
by design is a singleton which is a beautiful thing for anyone coming from Java who wants a true thread-safe, reflection-safe singleton (clue, in Java use an enum) - and that's it, all the data worth keeping is in there. The player and the opponents movement is stored in an array (elsewhere). The whole app itself if just 2 units - but, and its not really clean, as I put the AI in the unit which is also an inherited/custom canvas - so kinda ugly - I wasn't intending to share so I didn't care! I was more focused on what I could do to objects, and how I can pad them out. Which is why I put the init() in that S object, not because it needed it, but for when I write my next app I'll look at that and remember that its is a reserved function (my code is by its design self-commenting, so I cut down on research!).
Re: Android game for the blind & deaf
PostPosted:Mon Dec 21, 2020 4:25 pm
by Loki
That is very interesting, I have no experience using Kotlin and the last time I used Java was during my undergrad classes lol. I do mess around with multi-threading quite a bit using Swift but now I am interested in learning a bit more about Kotlin. That being said, I need to wait for my new machine to come in, mine has started to show its age and needs to be replaced. I did look up some articles about people compiling Kotlin to iOS, but I have to do further research, because from what I have read I think it be beneficial (time wise) to just translate it into Swift.
Re: Android game for the blind & deaf
PostPosted:Mon Dec 21, 2020 5:02 pm
by jawfin
I would reckon Kotlin is a nasty language to translate from. Due to its significantly high use of lambda expressions combined with its null safety checks, a lot of procedural code can get squished into one line. I also used that combined with the elvis operator as I was getting to grips with its syntax.
And finally there's no ternary operator because the if statement is itself an expression like that ''field = if (value < 1) 1 else if (value > 5) 5 else value'' in my code. Key would happily tell you that would be "field = value < 1 ? 1 : value > 5 ? 5 : value" - may need brackets! (Note the Java code is shorter, but requires reading right to left, ie. seeing the ? then working back to ask the question [as an LR parser]).
Pascal: if value < 1 then field := 1 else if value > 5 then field := 5 else field := value;
But due to the lambda shortening which can be set to a default function, and within that also passes a single parameter as 'it' - you wouldn't know what got taken out (like runnables, onCreate event etc.) Fortunately though this app is small enough to just write over in another language; not sure how much I would trust a utility to translate and provide a decent solution.
So, in short, let me know when you're ready!
Re: Android game for the blind & deaf
PostPosted:Tue Dec 22, 2020 1:20 am
by Loki
As I read more into Kotlin I am noticing more of the similarities between the languages, lambdas (Kotlin) closures (Swift) nil checks in Swift are handled using optionals and optional binding. That being said both languages take properties from oop and functional programming. Such as, passing in functions as arguments and returning functions from functions. Both also handle computed values when initialized at compile time I think which is pretty nice. When I meant translate I didn’t mean it literal I meant to say “rewrite” the app in Swift. I am finishing up a project here soon and it be nice to set some time for this as the new year starts once I get my new machine
Re: Android game for the blind & deaf
PostPosted:Thu Dec 24, 2020 3:54 am
by Bubbles
You done well on that card game btw Jawfin. Over a million downloads!
Looks good.
Reading some of the negative reviews were fun as well
Re: Android game for the blind & deaf
PostPosted:Thu Dec 31, 2020 12:08 pm
by Atsila
I can see why that would be annoying. Most phones like this one will light up and flash when someone is texting. Games there are a few that use vibration but mostly many do not so gets a bit boring to play.
I used to play kaboom a lot because of the vibration I would get when attacking someone and in text gaming to where I could talk to a single person or guild.
I wish games would use sign honestly that would help many understand but honestly could not happen since the is like three different ways to sign hello.
Re: Android game for the blind & deaf
PostPosted:Thu Dec 31, 2020 1:28 pm
by jawfin
Every country has its own sign language, even those who are in a country whose spoken language is the same. An Auslan signer doesn't really know too much of the language as USA sign. You'd need a fair amount of the screen dedicated to showing the signer, and to translate from a language to sign is a significant amount of work, plus, the facial expression of the signer conveys a fair amount of the language. It'll have to be pre-recorded videos, or nothing. Unless Google decides (or has already decided) to employ its translation AI to also sign - but it would be a multi-million dollar investment I would think.
Re: Android game for the blind & deaf
PostPosted:Mon Mar 08, 2021 10:25 pm
by jawfin
Just an update to state that Catch for the Blind & Deaf has been promoted from open testing to live production.