Forum Archive

Pythonista-made game now on App Store

chriswilson

Hi all,

The puzzle game I have been working on is now available for free on the App Store.

Here is the link

Thanks to those who helped with my code, and to @omz for the awesome Pythonista Xcode template!

Icon

Screenshot

Webmaster4o

@omz already tweeted about this

chriswilson

@Webmaster4o
Thanks - I didn't realise as I don't use Twitter!

khilnani

Pretty cool! Congrats!!!

cook

@chriswilson good job! I keep losing points. I need to read the rules more....!
:)

One suggestion about the rules presentation....
Use an html document with pictures and present a webview!

Anyway...I like how it looks and everything. I've never tried to make a game yet with pythonista...but I imagine you put in a lot of time.

chriswilson

@khilnani thanks!

@cook I'm thinking of ways to improve it for next version. I've never used a web view but will definitely look at that - thanks!

chriswilson

By the way, App Store reviews are very much appreciated of course! 😀

shaun-h

@chriswilson the game looks great, haven't quite got the hang of it yet though. Just a comment (it is very minor) you might want to take a look at the high score table and the settings screen they aren't are off to the left a bit on the iPhone 6 Plus not sure about other devices.

shaun-h

Actually something else to note if you click the high score table button multiple times it appears to present it then when i dismiss it it presents it again.

chriswilson

@shaun-h Thanks very much for your feedback. It's a bit tricky to get to grips with!

I tested in simulators in Xcode to ensure nothing was off the screen and I thought I had set the settings page to be centred. Would you mind posting a screenshot?

chriswilson

@shaun-h Yeah the highscore table can be delayed in appearing while it retrieves the info, leading to it appearing again won't multiple taps.

Any idea of how to prevent this behaviour. I guess I could disable it after a press.

All of this is good feedback to work on for version 1.1!

shaun-h

Just working out the best way to post the screen shots, and the high score table could be fixed by disabling the button until the view is presented I'm pretty sure you can check if a view is being displayed on screen

shaun-h

You can find the screenshots here

chriswilson

@shaun-h Thanks for the screenshots - I see what you mean. I'll have to look at the UI layout.

cook

@chriswilson you could present the high score view first with a 'please wait' and you should be able to download the info in the background. Once it's downloaded just update the view.
If you have a function with the decorator...

@ui.in_background
def getinfo()
...
chriswilson

@cook @shaun-h
Version 1.1 is now on the App Store. I've made changes based on your advice regarding the highscore button, settings and instructions screens etc. It's also a universal app now. Thanks!

chriswilson

Some impressive scores from @JonB !

ccc

If I know @JonB, he probably wrote a learning algorithm that runs on his iPhone that plays the game on his iPad.

disorientedp

I just found a bug. I can change into landscape mode, but it cuts off most of the buttons (iPad).

cook

@chriswilson saw that...looks great! Good job!

chriswilson

@cook Thanks!

@disorientedp Thanks for spotting that. It's meant to stay in portrait and does on iPhone. I guess that's the first fix needed in version 1.2! :)

shaun-h

@chriswilson awesome I'll update it and give it a go, I am still no good at the game though.

Webmaster4o

If you double-tap the next level check mark, the level can pause mid-spin when the animation is interrupted by the "are you sure" alert. If you can't reproduce, I'll upload a video.

JonB

If you tap a square before the lock animation is complete, the animations get all locked up. This can happen if you are just tapping really fast trying to fill an area to get the white square bonus.

chriswilson

@Webmaster4o @JonB
Thanks for the feedback. I've reproduced both those bugs. I think it's something to do with the difference between A.rotate_by() and A.rotate_to() animations.

I also use a method to stop animation of squares when needed, but it doesn't seem to reset square rotation back to zero. I'll play around with this and look at releasing an update when I can.

@JonB I never thought of filling up with locked squares to get the white square bonus! Maybe the bonus is too generous or the penalty for locked squares too lenient?! 😉

ccc

Those learning algorithms think up optimizations that don't even occur to mere mortals... ;-)

JonB

@chriswilson
I have found that it is almost always worth it to get the white square bonus. Through maybe level 20, I try to get the bonus on every level. I don't quite get how the bonus is computed, but it is usually 10-15 points. I am not saying I fill up huge swaths, and it is always better to have a larger connected path... but sometimes you get maybe 3 or 4 areas blocked off, and it is better to fill them in and get the bonus. (also, i sometimes fill the whole screen when i cannot win... to see if there is any secret hail mary bonus )

Is the timer entirely based on level? Or score? or previous times? on regular mode, i feel like the timer gets too fast too quick. Though often i just make careless errors, like pressing Go when the path is not clear. For instance, I had a 2500 score on easy, which i could have kept going except i got careless (that score did not save... i was on a bad wifi link. might be worth saving scores locally for retransmission if network cannot be reached?)

@ccc the first dozen or more times i played, i got pitiful scores. which frustrated me, because the rules are so simple. I spent some time thinking trying to recognize some common patterns... such as a 2x2 square of blacks (tap the corner away from the path you want to clear), a few patterns to help clearing the block right near the entrance and exit, and also once i actually figured out how to use powerups. For instance, i used to mostly use the black/white flip powerup. But the X powerup is more powerful, for instance locking the white square in front of the exit to clear the squares around it, then clearing the lock. also very useful for clearing a path into a section of whites for the white square bonus.

chriswilson

@JonB
It's great to see some techniques! The computation of the bonus is a bit strange but I wanted it to relate to the size of the grid (assuming it's more difficult to get on a larger grid). The bonus equals rows + columns in the grid.

The threshold for getting an extra one of each powerup is scoring more than the number of squares in the grid (rows * columns).

The timer (in seconds) is based on level and difficulty as follows (easy = 1, regular = 2, hard = 3):

time_allowed = 61 - (difficulty * 10) - (self.level * 0.5 * difficulty)

This gives a different baseline time (i.e. at level 1) and a linear change in time allowed through the levels, but with a steeper gradient at higher difficulties.

I am thinking of local storage of scores for later upload; I just need to figure out how!

I'm also thinking of changing the MySQL query that calls the high scores to only show the highest score for each player (as people playing a lot get more space on the table).

By the way, have you seen what happens when you get a star and the power-ups are all full?

JonB

I have noticed there is a green box when powerups are full, but i keep forgetting to see if the start gets converted to points.

chriswilson

@JonB @cook @shaun-h @Webmaster4o @disorientedp @ccc @omz

Version 1.2 is now on the App Store with a host of bug fixes! Thanks for pointing them out.

The high score table now just shows the top score for each player, so the table is simpler and won't be taken up by those who play a lot; not looking at anyone in particular! 😉

chriswilson

Now taking bug suggestions for version 1.3!

Webmaster4o

@chriswilson

bug suggestions

😂 Here goes: make the app crash every third time you open it

chriswilson

@Webmaster4o
Haha maybe suggestions isn't what I meant! That is a particularly devious one though - it would drive people mad!