Detroit Area MahJong Message Board › Another Android Riichi Game

Another Android Riichi Game

Merle
user 11831024
Ypsilanti, MI
Post #: 9
OK, a brief overview on this project first. Summers are really slow for me at work so I decided to start playing with Android programming (it gives me something to do and it looks like I'm actually working). I ended up picking a Riichi game because it wouldn't require a lot of work with graphics (it seems like 9/10 of all the game projects/ideas I have ever had were derailed because I couldn't draw the required graphics). I decided to base it around Saki because it's awesome and the various super powers would make for a fun game/challenge.

That said the various characters and super powers aren't in there yet (there are characters shown in the game, but they are just placeholders). But I need to step away from the project for a little while to regain my sanity (I could continue to test/tweak the AI for all eternity and never be completely satisfied).

This is just an alpha release. I wanted to get an idea of what people thought about the AI, make sure it will actually run on various phones correctly, and let people know what I'm working on. Like I said I could nit pick the AI forever, so it would be helpful to get an outside opinion. Also I wanted to solicit any help from the more creative people for graphics (backgrounds, buttons, character images, etc). I can give you size/format requirements if interested.

Requirements:
- Android 2.1 (it may work on 1.5, but it was only tested on 2.1 and 2.2)
- Screen size of at least 320x480 (bigger is fine, smaller will not work)
- Enable Settings->Applications->Unknown Sources (sorry AT&T people)

Known/Annoying Issues:
- For some reason it is creating 2 icons in the app drawer (one of them runs the game and the other force closes immediately)
- It doesn't terminate cleanly so you may want to force stop it afterwards (even if you don't it shouldn't affect battery life, it will just hang around in ram).
- Likewise after you finish South Round it will just kind of sit there. You'll have to close and restart.

Controls/Etc
- Double tap to discard
- If you press the menu button it will give you options to switch between Japanese and English (Not everything is bilingual yet)
- Also in that options menu is a "Debug Mode" option that will let you see the AI's hands (so you can actually see what the AI is doing)

http://code.google.co...­
Download the apk to your phone and open the file to install (you may be prompted about which program to use to open it, pick "package installer")

The code (as of today) is there too if you felt like poking around.
Jocilyn W.
user 12236492
Ann Arbor, MI
Post #: 10
Wow, great job! All the normal game play functions seem to be working (on a Samsung Intercept running Froyo). It must have been a lot of work to program all the scoring functions. Thanks for all the hard work!

The only thing that I saw that really made it problematic was the size of the tiles are so tiny you can't really tell what all your opponent's discards are. Subsequently when it interrupts to offer you a pon or chi, I wasn't immediately sure what was being offered. Is it possible to zoom in on that interrupt tile somehow? Other than that it seemed well designed.
Merle
user 11831024
Ypsilanti, MI
Post #: 10
Yeah, I do need to highlight or zoom in on the tile you are being asked to call. I'll add it to the list of things to do.

The intercept's display is 432×240 which is smaller than anything I tested; I'm pleased it works at all (pats self on the back for robust coding). I'm not sure if I can do anything to enlarge the tiles without completely changing the layout. Does Virtual Tenhou look better on your phone?

Actually the thing that gave me the most problems was the shanten count (tiles away from winning). You get something like 112333 in your hand and it could be broken up as: 11,2,333 or 1,123,33 or 123, 13, 3 or 11,23,33 and which of those will end up giving you the lowest shanten count.
Adam
akilleen
Group Organizer
Ferndale, MI
Post #: 32
So far so good on HTC EVO with Cyanogen 6.1.2 (Android 2.2.1). With the AI everything looks good so far, but I will continue playing to see if I can give you any more feedback on that. The highlighting/zooming would definitely be nice. It took me a minute to figure out to double tap to discard a tile. I'm wondering if dragging the tile to the discard pile may be a good way of dealing with that? Or maybe a discard button like V-Tenho, though of course I am sure you don't want it to be too similar to that game.

Awesome job so far! I'm looking forward to future updates.
Merle
user 11831024
Ypsilanti, MI
Post #: 11
I like the double tap to discard method, but that may just be because I'm so used to it at this point. I thought about adding slide to discard, but I didn't for that exact reason; I didn't want to look like I was copying Virtual Tenho. I suppose I should add it as an option.

As for the AI feedback, obviously I can't ask you to sit there in debug mode and pick apart every decision (thats for me to do =P). I guess I'm looking for a more broad impression. Does it seem too weak? Does it seem to win and/or riichi at a respectable rate? Does it take too many cheap hands? How does it compare to Virtual Tenho? If you are playing in debug mode does it's discards/calls make sense to you? That sort of thing. I know all it's little quirks and spent a ton of time testing and looking at every discard choice I didn't like, so I don't feel like I can't be an objective judge on it's performance anymore. I'm just kind of curious what other people think and if anything jumps out at them that could use improvement.
Merle
user 11831024
Ypsilanti, MI
Post #: 12
Version 0.1.1 Available
http://code.google.co...­

Controls and requirements are the same as before (I haven't gotten around to the "Slide to discard" controls). I recommend uninstalling the previous version first. It should overwrite the previous version, but I'm not positive that will work correctly. Source code was also updated, though I'm not sure anyone cares about that.

Highlight of the changes:

  • 4 Characters added and a character select screen
  • Saki, Momoka, and Koromo have their respective super powers (see below)
  • Fixed an issue where a player in riichi would sometimes be unable to call ron
  • Fixed an issue where Chinitsu hands would sometimes cause the game to glitch
  • The AI will now open up their hand for sanshoku doujun and doukou
  • English is now the default language
  • Fixed the double app drawer icon issue
  • Characters will announce Noten/Tenpai after an exhaustive draw
  • When asked to call a tile it will show you what tile you are being asked about in the center



About the super powers:

In General:
I picked the characters I did because their powers were the most straight forward (and Kana because she's my character). My goal was that they would get to use their powers at least once in each game you play against them. Super powers activate automatically when the situation is correct (see below for more details).

Saki:
In general I'm pretty happy with how she is working. If you play a full East-South game you are very likely to get Rinshan'ed at least once.

Her powers activate when you are in tenpai and have a pon in your hand. If both your kan tile and your tsumo tile are in the wall, you will immediately draw the kan tile and then get your rinshan. If your tsumo tile is in the wall but your kan tile is not, your power will still activate if you call a kan off of someone's discard. If your tsumo tile isn't available nothing will happen.

The PSP game cheats A LOT more than that. If you are playing as Saki you will be dealt a kan from the start in about 90% of hands and it's not unusual to see a Saki opponent call 2-3 random kans in every hand. I don't really want to go that far.

Momoka:
I'm also content with how she is working. Her powers activate after 2 straight hands where you do not call chi/pon/kan/ron/tsumo (ie don't do anything to draw attention to yourself). When invisible no one will be able to call any of your discards. The power deactivates when you make one of those calls. It works/looks better as an AI opponent; their hand and discards will completely disappear). Obviously I can't do that if you play as Momoka so it will just kind of tell you that you are invisible.

It works more or less the same way in the PSP game, but it doesn't activate until the South round and she is allowed to call people's discards without losing her invisibility.

Koromo:
Proved to be a bigger headache than I thought. The problem is that it's sooo hard to setup a haitei. Even if she calls a tile to put herself in line for a haitei, anyone else calling something will derail it and the only way it ever comes into play is an exhaustive draw. You probably won't see it in most games where she is an opponent, but it does work.

To activate be in tenpai and have the last draw. If your winning tile is in the wall you should get it.

PSP doesn't do a much better job at this. They gave her a secondary power to make up for it (I assume it's the "prevent people from reaching tenpai" power, but I'm not sure exactly what it does). You don't see many haitei's in that game either.


Work has started giving me actual work to do, so work on the game will likely have to be done in my free time now >_>
Jocilyn W.
user 12236492
Ann Arbor, MI
Post #: 12
I love it! Great idea with adding the superpowers. If you play a game with four Saki's, four hands out of five will end in a Rinshan Kaihou. xD Momoka's power was pretty cool too. Though I wasn't able to finish my Invisible Kokushi Musou because I discarded the wrong tile (they're way too small on my screen and I'm always discarding the wrong one), it was pretty awesome nevertheless. I need to get a Galaxy Tab so I can play this game.
Merle
user 11831024
Ypsilanti, MI
Post #: 13
I'll look into making a small screen/bigger tile layout. I think I could move some stuff around and maybe stop drawing the opponent's hands to free up some room. But it probably won't be ready for the next release. I want to get the rest of the characters in there, add a results screen, and put in 2 game modes (free play like it is now and maybe a tourney or story format) and call that a Beta release. Adding a second/different screen layout is a substantial amount of work (the graphics/UI code is even longer than the AI code) and I'd in essence be doubling up everything to have 2 completely different layouts. I'll shoot for adding it to the second beta release or the first release candidate.
Sara
user 14109339
Ann Arbor, MI
Post #: 1
I've been playing this on my phone for a couple days, and I really like it! I agree the tiles could be bigger, though fortunately my phone is all screen so they're not too small for me to select. I'm really looking forward to all of the Beta additions, it should be awesome!

I did notice something though while I was playing the other day: I had a round where I was sitting in North and the three players before me had all discarded the West wind. I also had one in my hand, and I wasn't watching the discards so I got rid of it, but the game progressed as normal instead of aborting. I have yet to receive an abortive hand or have 4+ kongs in one round (I clearly haven't played with 4 Sakis nearly enough), so I don't know yet how those scenarios play out.
Merle
user 11831024
Ypsilanti, MI
Post #: 14
Thanks =D

Yeah, none of the abortive draw scenarios are programmed yet (same 4 initial discards, 4 kans, 4 riichis). It's just one of those things I never got around to. I suppose I should add them to the list of things to do =P
Powered by mvnForum

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy