Classic Solitaire Klondike


#1

Before starting a new big project we decide to make a small one-week game for experiments with ASO optimisations.

For now game without ADS and without IAPs. Just a game for people who like Klondike Solitaire.

Links (would be great if you install game and leaving good review, first reviews are important):
iOS: link
Android: link
Html5: link

Community page: link

About development
We tried to make a small and fast game.
For now the game has only one atlas 512x512, minimum in game.project options (for example: Max resources: 16, Max instances: 128, Max sprites: 256 etc)
Our game build on android is 3Mb, on ios 6.6Mb, Html5 without gzip 5.9 Mb, with gzip 1.4Mb
Game resolution is 1080x1440 and only 3 Draw Calls.
All game logic is reactive, and I use only one update method for timer (one more update in render script).

Game performance feels good on my old huawei U8825D (Android 4.0.4, 2012 year) like native apk.

About HTML5 on mobile
Question that excites many developers: html5 performance on mobile.
You can check by yourself, it’s not smooth as can be (check here).
I think it’s a bad idea to recomend Defold like engine for Instance games and other games for mobile html5.

Of cource, maybe I forgot something, I know one place in my code where I’m create more objects than I should, I will fix it later. But I think this is a really small and simple game can be benchmark for mobile html5 performance.

Conclusion
I want that Defold community growing up with people who like Defold and know what Defold can do well and what can not…

I like Defold, guys! I am happy that I made this choice 18 month ago. It’s a great feeling to see how engine grows-up and changes. Defold team is awesome! It’s a pleasure to communicate with you.

It’s not just a words because we choose Defold for the next game (and maybe games =) ) and that I already start to teach a new programmer to work with Defold.


Onet Paradise
#2

Any particular issues you’d like to highlight performance-wise?
Also can you suggest any similar game written with other tool that performs better on HTML5?


#3

And we like you! Great to see that you found Defold to be a good fit for you :slight_smile:


#4

ImpactJS is a solid one it costs $99 to buy. Phaser is another that is free (but upsells its tools which get included in the price of ImpactJS). Construct 2 is good for people who don’t want to touch their keyboard much - its HTML5 builds are very good. HOWEVER none of these are Defold with its greatness and I’d currently only recommend them to people who want to only ever make HTML5 games.

The main issue with Defold’s HTML5 support is that it uses a black magic wizardry layer to make it work and doesn’t have a direct HTML5 runtime. While it works fine for desktops, it’s not optimized for mobile, and has some extra overhead due to the way it’s made to work. Maybe down the road when selective building is possible a native HTML5 runtime can be made although by then probably it just won’t matter. I’d still suggest to force mobile users to use the mobile app version and not let them play the web mobile version.


#5

There are no engines like Defold that have good mobile web.

By engines like Defold, I refer to engines that use emscripten for compilation. Take for example GameMaker and the limitations they have https://help.yoyogames.com/hc/en-us/articles/216754018-HTML5-Issues-And-Differences?mobile_site=true

They actually have html5 specific code in order to maximize performance (caching 4 sprites etc.). They tend to hyperoptimize code for each platform.

Unity gives you dialog saying mobile web is not supported with yes/no.

If anyone wants great HTML5 then only native has great performance so only engines using native JS like: Phaser or Cocos Creator (which has Spidermonkey and soon V8 engine for web and it uses cocos2dx bindings for native android/ios/desktop).


#6

I use phaser for mobile html5 games. I’ll show you the same solitaire later on this week made using phaser.

Anyway, it’s not about “defold is bad” it’s about “defold is not enough good for mobile html5”.

UPD: for example our solitaire on phaser https://bagabum.bitbucket.io
I really don’t know how many draw calls and other parameters in this game. I am sure that I can optimase it more, if you think that it works bad.
But I open this phaser solitaire and Defold solitaire , and phaser’s works better on my ipad4


#7

Yes, the general advice is to use native builds on mobile. We’ll see what the future holds
for HTML5 builds. We don’t know what webassembly might bring performancewise, for instance.


#8

Fully agree with you.


#9

For games in messengers, FB instant games, etc., main problem is HTML5 build size. Not only performance on mobile devices.

For example I had a discuss with Head of Games platform of big Russian social network and he said (and sad) that 6-7Mb of my game is too much for game in chat, he wants less or equal to 3Mb.


#10

yes, as I know
facebook.com instant games 5 Mb (recommendation, can be bigger)
ok.ru chat games 3 Mb (requirement, cannot be bigger)
vk.com direct games 10 Mb (requirement, cannot be bigger)

It’s again about my old topic


#11

We made small update with final animation and some performance optimisations. Thank you @ross.grams (topic)

ios version still on review, but html5 and android released.


#12

Awesome! :smiley:

By any chance are you planning on adding a sideways layout for mobile? My brother’s wife plays klondike on her iPhone all the time, but she had a version with ads, so I showed her yours. She missed the bouncing cards and being able to rotate her phone for the sideways layout though.


#13

Yep, we plan to make landscape in the next version.

What do you mean with “bouncing”?


#14

Great!

I mean the part you just added, with the trails, when you win.


#15

At the end cards fall down one stack at a time, maybe make it all four altogether? Should look fancier.

When card is picked, make it bigger (scale up) and add a shadow underneath. That will make an illusion of a raised card above the table. The same technique can be used when a card is flipped, and since Defold is 3D, make a proper 3D rotation with perspective (when one side gets bigger during the rotation).

Add a texture background that looks more like a textile and some slight dark gradient to make a feel of a lamp nearby.

Cards transition linearly? Some easing could also make it look snappier.

No lose state determination?


#16

Many of this things already in to-do list.
We have no plans for monetization of this game - we don’t want to spend many time for it. Time to time I will make some features and improvements, only when I have no any other things.
Thank you for your feedback and suggestions.


#17

One more programmer joined to our team, which means that we will be able to do a little more =)
Our solitaire was updated to version 1.55
What’s new:

  • The game now can be played in landscape orientation (requested by @ross.grams =) )
  • Added button “Auto win” in case if all the cards are face up.
  • Reduced the size of the build.
  • Minor bugfixes.

Android and HTML5 version already updated. IOS build - Waiting for Review.


#18

How much did you manage to reduce the size, and how?


#19

The build size reduced using buildmanifest:

# Release + No: Physics + Record + Profiler + Facebook
platforms:

    js-web:
        context:
            excludeLibs: ["BulletDynamics", "BulletCollision", "LinearMath", "Box2D", "physics", "record", "vpx", "engine", "profilerext"]
            excludeSymbols: ["FacebookExt", "ProfilerExt"]
            libs: ["engine_release", "physics_null", "record_null"]

    armv7-android:
        context:
            excludeLibs: ["BulletDynamics", "BulletCollision", "LinearMath", "Box2D", "physics", "record", "vpx", "engine", "profilerext"]
            excludeSymbols: ["FacebookExt", "ProfilerExt"]
            libs: ["engine_release", "physics_null", "record_null"]

    armv7-ios:
        context:
            excludeLibs: ["BulletDynamics", "BulletCollision", "LinearMath", "Box2D", "physics", "record", "vpx", "engine", "profilerext"]
            excludeSymbols: ["FacebookExt", "ProfilerExt"]
            libs: ["engine_release", "physics_null", "record_null"]
            
    arm64-ios:
        context:
            excludeLibs: ["BulletDynamics", "BulletCollision", "LinearMath", "Box2D", "physics", "record", "vpx", "engine", "profilerext"]
            excludeSymbols: ["FacebookExt", "ProfilerExt"]
            libs: ["engine_release", "physics_null", "record_null"]

iOS:

Android:
OLD Version: 3.06 Mb
NEW Version: 2.58 Mb

Html5 gzip:
OLD Version :


NEW Version:


Is Defold can really make small size Android APK?
#20

Wow, fantastic! :smiley: