Friday, May 12, 2017

Making of 8 or Bust - Play Screen

8 Or Bust

Play Screen

The play screen' main area is the matrix in the middle. This matrix is 6x5  --- 6 rows and 5 columns.
A(0,0)   A(0,1) A(0,3  ....  A(0,5)
A(1,0)   A(1,1) A(1,3  ....  A(1,5)
A(6,0)   A(6,1) A(6,3  ....  A(6,5)

Now, this matrix contains blocks... Some of the cells are empty and some contain block with a number.
When a player touches a cell and moves his finger --- the direction is noted --- could left, right, up, down ie, 1,2 4 and 8.

Now, if the direction is supposed DOWN then the block below it is checked and if it the 2 blocks can be added then move get valid ...

The selected block moves to the cell below. The sum of selected block and down block is calculated and then down cell's block is changed to new number with animation.

Similarly, the  UP move tested subtraction and on valid ..... move happens.

All cells are identified by their place in matrix --- Aij.

Now after every move-- there is a test whether MATCH-3 has happened. 

Math-3 is tested by regular expression --

        String pattern = "(\\d+:)\\1{2,}";
          Pattern r = Pattern.compile(pattern);
          Matcher m = r.matcher(string);

which matches more that 2 digits coming together.
Now, if there is a positive match find all these cells. Break them and let the top Blocks from cells above take their position.

After they take the position, check if there more matches. This process continues till all matches are removed with alternatively falling of top blocks and breaking new matches.




Monday, May 8, 2017

Driving traffic to distribute my game link

Working hard to promote 8 or Bust,  Fun Game of Mathematics
8 Or Bust

After the successful launch of my game 8 or bust on Play Store. Next target is to drive the traffic to get the game downloaded.
Things I have tried ---
Later I will be updating the actual traffic resulting from these efforts.

1) Running a contest on the Facebook page to download and play my game, catch 15 animals and win a book written by my friend " Shiv Prasad Koirala" very popular author of Technical Programming Books.
 .NET: Interview Questions  

2) Running a contest on Facebook groups to offer free Workshop for kids who can catch 18 animals by a specific time.
3) Tempted to use link submitted FFA sites. But after going through several links decided against it. More than the traffic you get marketing emails on your published emails for a month.

4) Trying which says can get me 10,000 visitors to my site over 30 days. Will be monitoring the views on this blog. How many actual downloads using this links... If my game downloads increase (can be monitored in Localytics)  

5) Also reading through their article of how to promote your link. Found some useful tips.

Will keep updating things I tried over next few weeks and also the result.

Friday, May 5, 2017

8 or Bust - Gamification of Learning

8 Or Bust

Gamification of Learning is a new approach towards making learning fun. 

Mobile games have advantages:
  1) Easily accessible as everyone has a smartphone of their own.
  2) Even parents and grandparents who were never into playing are finding it as a good source of passing time with challenges.
  3) We have so many options to download from Play Store.
  4) Play it at your leisure, while waiting for the bus, in the metro, waiting for the doctor, in long journeys.
Games are fun, lovable and addicting. So if games are so much fun, why do we not use gaming at our advantage of introducing learning into it. And Mobile games are here to stay for good or bad ...

Humans think they know the best way to learning but little they know of how the brain functions.When we are kids we play games and learn the most till we go to school, stop gaming and start the formal education.

Research are now recognizing this and advocating to introduce the concept of fun, games in learning.


In Siddbetter,  we do not make games with motive of teaching something. Instead we make games which takes some basic fundamental concepts of learning and allows you to play and have fun with intuitive learning. Just like chess, which does not teach you anything but makes you think about your steps ahead, build concentration, make strategies to overcome your opponent.

Siddbetter's "8 or Bust" teaches you -

  • Simple rules of using adding/subtracting numbers to reach numbers in line. 
  • Pattern recognition of match-3 with same numbers/color. 
  • It teaches you concept of even/odd numbers because when the odd number starts appearing the game gets more challenging.  
  • It makes the player think of complements of number to identify quickly the add/subtract compatible numbers.
  • The patterns can be horizontal/vertical.
  • It makes you think ahead of your steps so that you can achieve the better pattern. 
  • It requires concentration to be able to find patterns.
  • Foremost, it provides you a goal of catching as many cute animals like cats, dogs, butterflies...
  • You compete with your friends for a spot in Leaderboard. 

This does not mean, everyone who plays will become the master of multiple skills but the game offers a puzzle and challenge which aids in learning.

Thursday, May 4, 2017

Making of 8 or Bust - Main Screen Login

Login Screen

Now, the significant parts of this screen were:

1) Aligning the Buttons in Linear Layout in equal distance. Required the concepts of LinearLayout with containing view weight-sum = 6 and layout height of button 0. In this case the height is then adjusted based on layout-weight which I set as 1 in this case.

2) Android does not scale the images by default but they can be scaled on if we take the ImageView and set image as its property as "src" not background and set attribute like adjustViewbound to true.

The button below are imageButton for it to scale evenly.

3) For button, on click to show interaction by changing color or ripple is achieved by





4)  Facebook button logs onto Facebook using Facbook SDK

        callbackManager = CallbackManager.Factory.create();

    loginManager = LoginManager.getInstance();

    LoginManager.getInstance().logInWithReadPermissions(this,        Arrays.asList("public_profile", "user_friends"));

                new FacebookCallback() {
                    public void onSuccess(LoginResult loginResult) {
                        // App code

                    public void onCancel() {
                        //show cancel      

                    public void onError(FacebookException exception) {
                         showFacebookWindow(1, exception.getLocalizedMessage());


 5.  Remove Ads --- Call IAP function to get the price of sku and then populate the windows to make purchase workflow

6.  RateApp --- using Appirater

7.  Leaderboard -- connects to our Server communicating using Volley APIs and gets the result back in JSON format which is converted into Java Classes like HashMap. 
    The return data is used to populate the Leaderboard.

8.  HowtoPlay is our tutorial with sliding screen using CustomPagerAdapter extending PagerAdapter
    which loads each screen in initiateItem(ViewGroup containerm int posistion)

9. Menu Button loads the Menu Screens implemented as Fragments. 

10. Google Play which logins in using 
                       .addOnConnectionFailedListener(connectionResult -
                       .addOnConnectionCallBacks( )
Next would be main Play Screen

Monday, May 1, 2017

Making of 8 or Bust ---- a Mathematical Puzzle

Splash Screen

Android games in the native platform are built using Java using Android SDK. I used IDE Android Studio for developing 8 Or Bust. Android Studio on the creation of a project create a default app folder and build tool used is Gradle. 
Now, the first screen of almost all apps is a splash screen which is shown for few seconds and then the main screen appears.
 public class MainActivity extends BaseActivity {
         private static final int splash_time = 30;
            protected void onCreate(Bundle savedInstanceState) {
                View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |               

           public void onWindowFocusChanged(boolean hasFocus) {

            if (!hasFocus || animationStarted) {

             new SplashTask().execute();


          public void onNewIntent(Intent intent) {

         public void onStop() {


        private class SplashTask extends AsyncTask {
            protected Void doInBackground(Void... params) {
                try {

                   Thread.sleep(splash_time); /// show splash screen for 
                } catch (InterruptedException e) {
                return null;

            protected void onPostExecute(Void result) {
                startNextActivity(); // then move over to next screen 


         private void startNextActivity() {
             BaseUtility.startNextActivity(this, LoginActivity.class);


     public static void startNextActivity(Activity activity,Class className){
         Intent intent = new Intent(activity,className);
         activity.overridePendingTransition(android.R.anim.slide_in_left,                   android.R.anim.slide_out_right);

This splash screen after showing for 30ms loads the next Screen -- Login.

Wednesday, April 26, 2017

Porting game from iOS to Android -- 8 or Bust (a Mathematical Puzzle)

Recently, we decided to launch our game which was on iOS on Android. Releasing on Android made sense because of its reach and popularity.

Well, I started making research to be able to port my game from Objective-C to Java Android.

After going through some frameworks and site reviews on frameworks,  I decided to code natively using Android Java. Maybe because I had some prior knowledge of java. Also, the point that using a framework which allowed building in both would have made sense from scratch.

After having the first hurdle out. I explored which IDE to use. after struggling for a day in eclipse I switched to Android Studio.
Android Studio installed. I started out with some sample.
The Android Studio would crash a lot and be using emulator(ADB) for seeing the running code very tiresome. Although I always used the emulator in iPhone.
So I decided to work on my device instead of the emulator in the case of Android.
I started learning Android.

  1.  First I learned Activity and Views and how do they connect.  

             Activity is like a UIViewController in iOS.
    Storyboard --> got replace by layouts
            When I created an activity, the IDE asks me associated View and creates in layout folder.                      Connecting with tools:conext

         In activity --- by setContentView(r.layout.{activityname})
         Lifecycle changed - ---                                  
                    OnCreate                                   ViewdidLoad
    OnStart/                       viewWillAppear/ViewDidAppear
                    OnResume       viewWillAppear/ViewDidAppear -- Background
                OnPause                                    ViewWillDisappear/ViewDidDisappear
                    OnStop                                      ViewDidUnload
    OnDestroy                                  Dispose

          not exactly matching but close enough

2. Storyboard allowed connection in the GUI manner --- by connecting the screen fields in View fields.
       Android -- we have to do it findbyview
3. The major issue was the sizing issue iOS has only 2 sizes for iPhone and iPad. Android has no sizes standard.

        ViewGroup, FrameLayout, LinearLayout .....  
        Much of my time was spent in making the views suitable for all layout using LinearLayout ....              for my game activity I went on with Framelayout with actual sizing
        This became major task to get the code running for som many screens starting 4", 5", 7"  
         (HDMI, xHDMI,xx-HDMI)

        Understanding the size, layout, DPI concept is very necessary to be able to tackle this issue.
    4.  Next task was to port my objective C to Java.
 Not so difficult. other than replacing the performSelector afterDelay with handler.postDelayed

        What I most missed was NSPredicates,, filterarrays ... , valueforKeypath
        Replaced with Predicate, predicate.apply with some changes could achieve it.
        Rest --- MutableArray <-> ArrayList
                 MutableDictionary  <-> HashMap
                Got the mapping in place and which does not exists coded a class for their support
                Code Android Utility functions for matching function emulating ones in iOS.

    5.  Animation
               CABasicAnimation, AnimationGroup , UIView animation, [CATransaction begin/commit --
              - setCompletionBlock]

                replaced by
                ScaleAnimation and other Animation types with animation listener, ObjectAnimator,
                ValueAnimator, AnimatorSet,  AnimatorListenerAdapter

Missed CALayers of ios.
    6. CoreData Replaced by SQLite (using GreenDao for ORM)
    7. Emitter ---- droidparticle
    8. Volley for network  
    9.  Last was Localization --- Excellent support in Android with String and Values folder of resources.

All this typically were the element of my iOS to Android Port


Wednesday, February 18, 2015

e-Learning - New Innovative ways of Learning

A vision for e-Learning describes a future where the effective use of advanced learning technology will reduce the time to learn without compromising the effectiveness and quality of education. It is where the dream of a personal intelligent tutor for every learner is realized.

E-Learning will enable personal customized learning -
- Anywhere
- Anytime
- Any pace

To meet the vision of the future Architecture the trends can be classified in three main areas:
- Innovative Ways of Learning
- Enabling Pervasive Technologies
- Enabling Infrastructures

This blog I try to list Innovative Ways of learning….
Innovative Ways of Learning
This focuses on methodologies in producing e-Learning where the technological solution is transparent to the user. It emphasizes new ways of making the learning more effective and objective.

-Outcome based learning, learning methodology which focusses on aligning a course based on the final outcome based on standard.
Ex- First Grade State standard “Add and subtract within 20”
So the outcome here is learner should be able to add and subtract within 20, if learner is able to do addition and subtraction to that effect then the goal is achieved. Learner can move to next outcome.

This methodology works with setting up a defined goal and then gives concept and exercise to that goal and in end giving test exercise where learner has to answer these questions requiring students to demonstrate that they have learned the required skills and content. It promotes curricula and assessment based on constructivist methods.

-Collaboration & community, As they real fun is doing things together.
This methodology promotes collaborative way of working, giving rise to the way student projects are structured.
The days of isolated learning is disappearing, giving way to models in which students and their teacher collaborate together and understand address issues objectively with real-life examples by collaboration. The geography and location are also becoming immaterial in this paradigm.

- Project based plan, where learning objective is like a project to facilitate learning in measurable milestone programs followed by assessment to measure success of achievement of the milestone objective.

-Lifelong Learning, Learning never stops. One finishing goal shows next milestone to reach.
Learning is not only limited to curriculum and schools but also for personal, civic, social and employment.
There is high requirement for ways of progressing in life to achieve higher salary, better standards of living, and progress in social ladder. This methodology aims improving for current knowledge and expertise and sets up goal for next promotion and train for the job of tomorrow. It makes the practice of professional development a continuous one.

Ex- It takes up the profile of a software developer and quickly draws up a career plan for him like 2 year senior programmer, 4 years managing capabilities…. The plan may list skills required, available options of certifications …

-Adaptive Learning, All learners are unique in their requirement and their skill to learn.
Adaptive-learning is moving away from traditional mass-teaching based one-for-all learning methodologies. There is increasing trend to model the learning programs based on individual learners’ needs, preferences, and learning goals, that is  learning has become  more and more personalized and adaptive.

Adaptive Learning is based on some intelligent engine which compiles the course based on the learners IQ, his performance in earlier assessments.  The engine adapts the content based on the learner’s behavior – like his assessment score, his last questions’ answer, and his behavior in time…

Ex- During assessment, if learner gives wrong answer to an addition question, the next question could be more simple addition question or showing him answer and then putting similar question again.

-Learning Analytics, Analytics is heart of adaptive and optimized learning. Collection of learner behavior, Measurement, Analysis and subsequent reporting or profiling and using that report of profile to adapt the course, next goal or Next assessment question ….

Leaning Analytics models the learner activity, interaction, assessment results and learner profile to predict and in short-term the adaptive learning by course and content customization, learning personalization and in long-term help in finding the learning opportunities based on the objective map and skills.

-E-Portfolio, is kind of management of record for lifelong learning methodology. It is a collection of electronic evidence assembled and managed by a user. E-portfolios are both demonstrations of the user's abilities and platforms for self-expression. It also record of things that the learner has done over a period of time, and may be directly tied to learner outcomes or rubrics.

E-portfolio is like progressive curriculum vitae of a person.