Kategorie: Schnopsn

Schnopsn: Card Shuffling Algorithm

Randomness is something that is often counter-intuitive and individual perception of random series, for example a deck of cards, might sometimes give the impression that there is some kind of „intelligence“ or plan behind it.

After various user requests, on how the card shuffling for Schnopsn works, and if it is really random we decided to publish our simple, but effective shuffling algorithm here … and yes, the card distribution is totally random, we do not interfere with it in any case.

Our algorithm is based on the following pseudocode, suggested in this article: http://www.cigital.com/papers/download/developer_gambling.php

FOR CT = 1, WHILE CT <= 52, DO

And here is our Java Implemenation of the code as it is 1:1 used on the server side of Schnopsn Online as well as in the Singleplayer mode of the Android App. We are aware that we use the current millisecond as random seed, but that should be perfectly fine for our purpose.

	ArrayList cards = getFullDeck();

        //	GET RANDOM SEED
	Random randomGenerator = new Random(); // here, the seed is the current millisecond

        //	FOR CT = 1, WHILE CT <= size, DO
	int size = cards.size();
	for (int ct = 0; ct < size; ct++) {

		int x = (randomGenerator.nextInt(size - ct)) + ct; // number between ct and size-1

		if (x != ct) {
			Card tempCard = cards.get(ct);
			cards.set(ct, cards.get(x));
			cards.set(x, tempCard);

So, if you have any educated comments or suggestions on how this simple algorithm can be improved or if you see shortcomings, just let us know by posting here or contacting us via support@schnopsn.com

Schnopsn Online

We built to a free-to-play beta online version of Schnopsn end of February and since then we have been working on improving it, partially based on our ideas, partially based on user feedback (thanks for the great feedback by the way). Users can play against others online right away, without any annoying registration or logins as we consider the device as your identification. Schnopsers are ranked based on an ELO system like in chess – the best players by ability should be ranked first.

Currrently, despite the beta and the fact that we did virtually no marketing so far, around 10.000 „Bummerls“ each day are played on our server, and we have over 50.000 active device installs.
At the moment, online play is only available for Android, but once we are „feature complete“ on client and server side we will also introduce the online version on iOS and later also on the web and probably other platforms like Windows Phone or Blackberry.

Why did we do it on Android first? It is not because of a certain preference for one system or another, we love and hate all of them, it is simply because we can roll out new version in order to improve and try out new things whenever we want, within two hours instead of a two-weeks-approval phase, so iterative develpment, rollout and immediate user feedback is feasible. We did about a new version each week since beginning of March.

At that point we have to say sorry for the frequent updates, still it is a small app with around 10-15 MB in size, but as with iOS Gaming Apps with sizes up to around 1GB are a common sight, many Android users tend to be concerned about 10 MB Traffic for an Update 🙂 Its not a stereotype, Android and iOS users are in fact pretty different audiences in many ways, with quite a different mentality, both having their good and bad sides from our point of view.


But beta phase is going to end soon and the app will be more and more stable so update frequency will certainly go down.
When stabilizing, we a learned lot about the tweaks of Android native app development (did we like it? Well, let’s put it that way: we’ll seriously give Cocos2dx a try as key technology for future gaming projects). Android is not only fragmented by different device types, but also by different API versions, an example where it gets tricky is display and memory management for bitmaps / images but finally we got it working.

We also experimented with certain Ad networks – mobile advertising is truly a science on its own. However traditional banner apps or even interstitials only pay off with huge numbers of users, the income from ads is no serious alternative to paid content, but still it is better than nothing, pays at least part of out server running costs. We may try other forms of advertising like video or push messsages in the future, but when beta phase is over we have come up with an appropriate way of monetizing the online playing user base in order to keep the Schnopsn Online going.

iTunes: Transferring the ownership of an app to another company

So for everybody who wants to transfer their apps from one business account to another (because they sold their app or – as we did – founded a subsidiary which focuses on app development) and wonders if this is possible, here’s the story. Unfortunately without an happy end 😉

As the founding of DonkeyCat was finished we wanted to transfer our apps (Schnopsn HD and Schnopsn Lite) from our mother company hs2n to the newly founded subsidiary DonkeyCat by changing the company behind our App Store Accounts. For Google Play, this was done within a few minutes, for Apples App store, however, we already suspected that it would not be that easy.

So we created a request to change the developer accounts company data in iTunes connect. Very soon (Apple developer support is – despite its reputation – in our experience very responsive) we got an e-Mail with questions and we provided them with answers and documents (like the legal registration) of the new company. Among those questions were the three crucial:

 Has the original company been dissolved, or is the original company still in business?
Has the new company bought or acquired the original company as a whole business?
Is the original company the same legal entity as the new company and is only undergoing a company name change?

None of them was the case, so we answered „no“ and sent the documents. Next day I got a phone call from Apple support stating, that if the new business is another legal entity and the old business still exists, the change is by no means possible. Only we could provide legal documentation, that the old company has been dissolved or acquired as a whole, then it would be possible.

For our case, the „solution“ would be to create a new account for DonkeyCat and then remove the apps from the old account and re-submit them for the new account.

The only thing that Apple can more or less guarantee is that you can keep the app name, other than that it is the same as submitting a completely new app so you would lose:

  • the update path to all existing, already installed versions of your app – will for sure disappoint your user base quite a bit, especially if you have a paid app
  • all ratings and reviews – for some apps, might be not a bad thing though, but our apps received very good reviews
  • all store rankings and therefore crucial discoverability in the App Store – so most of the marketing would have to start all over again

Furthermore you will have to go through the apple review process again, and even if this process may be quicker than initial submission, the app will be out of sale at least for a few days.

So, in short words: Transferring an App from one business account to another – or changing the legal entity of an existing business account – is simply not possible. 

Sorry, but the „solution“ apple offers is nowhere near an acceptable solution, I would not even call this a „workaround“.

This blog entry offers some very good information about the backgrounds – there is some speculation, that apple used the Tax-ID as some kind of key and therefore changing that Tax-ID is technically not possible – may be the case, but why is it then possible to change from individual to business?

At least, changing the bank account to the new company is possible without any problem, but this is also not really a clean solution.

OK, this is also somehow stated – not very easily discoverable though – in iTunes connect documentation so we should have known what we were up to … But as a developers we have to say that Apple should put some emphasis on solving this shortcoming … sure, Apple at them moment provides by far the best best platform – at least from a commercial point of view – for developing and selling apps. As competition – namely Google and Microsoft – is still quite a bit behind in store revenue, they are catching up and in the end of the day the success of a platform is determined by the acceptance of developers that provide high quality apps – so every company, even Apple, is well advised to listen and react to their problems and demands, and we (and pretty sure many other developers) would like to have this solved.

We are realistic enough not expecting to have this solved too soon, and as we are software developers ourselves, we know that a seemingly simple problem seen from user perspective might be a huge issue when looking at it being in the shoes of the people who build the system.

So we will have think of some new strategies for the Schnopsn product line … and who knows, every problem also opens up new opportunities 🙂