Sunday, April 19, 2015

Interview with Ahmet Sezgin Duran!

Sharon: Hello, and thank you for agreeing for this interview.  I'm Sharon Lougheed, and I'm a student at UTD.  Could you tell us a little bit about yourself?

Ahmet: Hello. My name is Ahmet Sezgin Duran and I'm a B.Sc student at Ankara University Computer Engineering. I'm a GNU/Linux user (also free software supporter) for 7 years and for the past 3.5 years I'm developing softwares with free software (e.g. open source) technologies. For the last 1.5 years, I worked in lab2023 - information technologies as a web/system developer, using open source technologies such as Ruby (Rails), Python and GNU/Linux. Currently I'm interested in artificial intelligence and working in a government supported project which is related to swarm intelligence.

Sharon: How and when did you first learn Python?

Ahmet: Back in 2012, before starting B.Sc education, I studied English for 1 year in Ankara University's prep school. Funny thing is that I actually failed in prep school passing exam accidentally, didn't see the last page and failed at border. This situation gave me an great opportunity: Lots of free time.

I was going to study computer engineering after prep school and I asked myself that why I'm not learning a programming language. Then I looked for programming language books. I looked for Python books because, I always encountered Python in GNU/Linux distros. I found http://www.istihza.com website, a person named Fırat Özgül was (still is) writing down Python 2.x and Python 3.x tutorials as a book, also free. I downloaded Python 2.x book and studied it. Also I studied several books too: "Dive Into Python" and "Invent Your Own Computer Games With Python". Those 3 books are still my favorites for Python.

Sharon: I understand you've worked on a project using Pygame.  Could you tell us a bit about it, and how would you describe the experience?

Ahmet: My project was a photo booth machine, programmed in Python and game dynamics. It included coin machine programming, DSLR machine controlling, system management, image processing and printer controlling systems, all of them were written in Python by myself. Application's general structure was programmed as a game with Pygame.

The experience was entertaining for quite reasons: I was the only programmer, all parts of the application was coded in my favorite programming language which is Python and Pygame were (still is) quite primitive for developing a game or an application with game mechanics. The last part led me to create lots of abstraction tools such as easy font rendering, position centerizer for drawable elements, state machine manager, application manager for smooth application initialization and application exit, etc. I can say that if I used a high level tool such as Kivy, I wouldn't gain this much experience.

Now the annoying part of the experience: compatibility issues. I had a lot of trouble with Pygame's audio and font rendering system. Mixer library in Pygame were making problems with audio's that has different frequency attributes. I tried finding proper frequency settings for 3 days and found it just by luck. In the mean time, SFML library, Python SFML too, finds proper settings automatically and it doesn't make any problem with frequency (if audio file is not corrupted). Other serious problem: Smooth font rendering. Pygame can render fonts smoothly but it didn't with custom fonts designed by my project's graphics designer. I had to use a standart font and that created a lot of trouble between company and client. Yet, the application is currently in production without a problem for 9 months in a shopping mall, in Denizli, Turkey.

Sharon: What advice do you have for those who are new to Pygame or game development in general?

Ahmet: I've several advices for the people new to Pygame or game development. First of, I need to say that Pygame is actually not a game library. It doesn't provide any game mechanic tool. It's an actually a multimedia library, which SFML says is properly (Simple Fast Multimedia Library)

Transformation from a multimedia library to game library is quite challenging. You will need to implement application manager, entity system, AI elements, state machine manager and so on. Without understanding this topics, you will have lots of troubles while creating a game. My first advice is to learn mechanics and there's an awesome website for learning them:

http://gameprogrammingpatterns.com/

After learning mechanics, it's best to use a multimedia library and create abstract tools for easy programming. SFML is quite better for first time learners, it's mostly based on OOP style. On the other hand, Pygame is relatively harder than SFML, but the idea behind them are quite similar. My second advice is to transform a multimedia library to a game engine, with previous knowledge of mechanics.

The last advice of mine is that: Don't be perfectionist. Don't care if your game looks terrible, just develop it, test it, play it and start another. Cloning well known, popular games (e.g. Mario, Legend of Zelda, etc.) is a good way to practice.

Sharon: Thank you very much for your interview!

Edit: Ahmet sent me this afterwards, in case you are interested:
Also if you need to learn game mechanics by example, check out this page too:
http://gamemechanicexplorer.com/

No comments:

Post a Comment