Wednesday, December 9, 2015

ODTUG APEX Gaming Competition - How'd They Do It? (Part 3)

At Kscope 15 this year we launched the first ever ODTUG APEX game competition. The APEX community responded with 15 entries! Each and every one of them left me thinking "How'd they do that?" So, let's find out more about the games and those who wrote them.

Next up is Nihad Haskovic.


First off, tell me a little about yourself.
My name is Nihad Haskovic. I am from Bosnia and Herzegovina, but now I live in Stuttgart, Germany. Currently I work at PITSS GmbH. Before PITSS I was employee at different company in Bosnia and Herzegovina. You can reach me by email nhasko@gmail.com or by twitter @Niho__


How many years of APEX experience do you have?
I have 8 years experience with developing Oracle APEX application.


What motivated you to participate in the APEX Gaming Competition?
I really like to programming in APEX, so when I see the announcement of Competition, I was ready to participate.


What is the name of your game?
Sudoku


Briefly describe your game.
Sudoku is one of the most popular puzzle games of all time. The goal of Sudoku is to fill a 9×9 grid with numbers so that each row, column and 3×3 section contain all of the digits between 1 and 9. As a logic puzzle, Sudoku is also an excellent brain game. If you play Sudoku daily, you will soon start to see improvements in your concentration and overall brain power. The popular Japanese puzzle game Sudoku is based on the logical placement of numbers. An game of logic, Sudoku doesn’t require any calculation nor special math skills; all that is needed are brains and concentration.

The classic Sudoku game involves a grid of 81 squares. The grid is divided into nine blocks, each containing nine squares. The rules of the game are simple:

  • Each number can only appear once in a row!
  • Each number can only appear once in a column!
  • Each number can only appear once in a box!


How long did it take you to develop your games?
To implement this game, I needed two and half months, working 1-2 hours per day


What was the most challenging element of your game design and how did you overcome it?
The most challenging part of implementing this game is to generate one solution Sudoku table.

First step was to generate solved Sudoku table and this is implemented in PL/SQL with procedures. I generate random number for each cell and number in this cell must be unique for row, column and block. After this process, I had to remove certain number of numbers for appropriate level to get one solution Sudoku table and that was biggest problem, because after each remove I had to check number of solutions. If Sudoku has more than one solution, I don’t remove number from current cell. If has one solution, i remove number and then I go to next random cell to repeat same step.

I also implemented a solution in PL/SQL, but solution was to slow and I had to find new solution. Then I implemented same solution in JavaScript and that was much better and faster. With combine power of PL/SQL and JavaScript I solved this problem.


Alright, how can I play?
https://apex.oracle.com/pls/apex/f?p=95780:101


Anything else you'd like to add?
It was pleasure to participate in OTDUG APEX gaming competition. And Thank you for organizing this event and I am sure, I will participate in next APEX competition. And next time I will try harder.



Thanks, Nihad for pushing the bounds of our favorite development tool. In the coming days we'll share more insight into the other games that were part of the contest.

...our journey continues

No comments: