Slot Machine Apps are addictive and entertaining for the users. One of our clients wanted us to develop such an App for him. Based on the idea of a slot machine, the App needed to be developed in a proficient way as the set of requirements was challenging. The client wanted the App to standout from the crowd with a touch of novelty while maintaining productivity standards. Our App Developer needed to integrate some of the most advanced features inside this App to make it superior to other such applications.
The concept of the App was appealing as it was going to be a three reel slot machine that was going to be manipulated by a player. It had to be done in a way to create the best scenario for a win. It demanded serious logic and improvisation on behalf of the player to apply an ideal setting and win maximum.
Detail of the Requirements:
Client required an App that would function as a physical slot machine. The features to be added to the application were:
Three slots in a machine
Separate sequence of items in each slot
Random Sequencing of Items on Start
Individual Iteration time for each reel
Easy Stop Functionality for the reel (as the user looks to stop the reel)
Auto Stop for the Reel in case of a non win situation
Rotation of the Reel by the Top Button
All above features were required with custom views and generic handling. No built-in library could fulfill these requirements. We had to develop a strategy to meet these requirements with best productive solutions.
We created the wheel using UITableView and customized cells. TableView was used to scroll its contents within predefined time but its animation could not be overrode in terms of time. In order to sort out this particular issue, different combinations were brought into contention but nothing effective could be found out. UIViewAnimation, CATransaction were tried but table view animation remained same.
Then we tried the timer as another option. A slot index was calculated based on required logic. Difference between the current index and the destination index was calculated. Timer was used with a specific time interval to scroll table cell by cell. Timer was set for each index and number of times the cell needed to move to get to the destination. Once the destination cell or index got to the middle, timer was invalidated. It proved to be a success and we achieved the desired solution.
Change in the Requirements from the client side:
Meanwhile, a requirement was changed by the client. He now wanted the slots to move with different speeds and in reverse orders. The change in requirement demanded us to re-visit our complete execution. With this change, smoothness was lost due to increase in animation time. Cell rendering also went blur. The earlier implemented solution was no more useful enough.
Ultimately, we needed to think something out of the box and that is what our developer did. As no help could be gained from the APIs, tableview native animation duration was used and that silenced all the odds. There was a definite logic behind this solution as the the animation time was adjusted by reiterating the process with tableview native animation. The animation remained entirely smooth within predefined animation duration tableview. This setting could now adapt to any change in requirements.
The main requirement of the App was to include a slot machine that would offer unique functionality and formulate a contemporary image of the slot feature in the minds of the users. The implementation of all the requirements from the client was highly challenging but we achieved optimized results with effective efforts of our App Developer.