Game Development and Intro to programming.

I got started into programming through game development. Started off in Qbasic, which was then being taught in our school. This was towards the end of my 7th grade. Till then, I knew as much about programming as any of my classmates. Me and two of my friends wanted to make a pingpong for our annual exhibition that was up in about two months. However, after two days, the other two gave up. I didn't. It seemed interesting, and a challenge, so I looked up a lot of stuff on the internet, and the most important was how to account for the time delay for the game loop. If I recall correctly, I made use of a sound command, which played a frequency for a certain amount of time, so all the time the game played, there was a low humming noise. Wierd but okay. Also, I remember that I wrote the full code for the pingpong in pen and paper. Ofcourse, there was one user and one computer, and the computer had some wierd heuristical movement, and then the ball also had some randomised speed changes while colliding with the walls. Very basic. But to my surprise, there was only 1 bug in the 7 pages of code that I had written, when I finally wrote it in a computer. Anyway, that was my first encounter with more-than-school level programming.

After that I learnt a lot of QB64 in the next couple of months and wrote several more games, all of the usual things like pac-man, snake etc.
At the beginning of class 8th, Java was in syllabus so I started learning Java -- and completed almost everything in the standard edition, that was in core Java. Then again I started writing some simple games. Then, after 4 or 5 months, I began writing a chess engine (click ) and a ChatServer (click) in about 2 or 3 months time. For the latter, I also had to learn some networking. Also the chatserver was cool in the sense that the clients could detect the server over any LAN network and connect to it. Also, it had some more features than the normal youtube variants, like group chats and one-one chats and creating friends and friend-requests and all. However, I did not extend it much, so once the server was closed, all data was lost. The ChessEngine can beat about Fritz 1900 in level 5 mode. There are several versions however, and I forgot which was good and which wasn't.

Point is, all these applications are already written, and I did not expect to overcome them either. It was however very fun and sometimes challenging to write them. Unlike in competitive programming, in which we write a 200 line code atmax and solve a problem, all these projects took more than a month for me to code, partly because I was new to coding, and partly because of the inherent size of the codebase required. These were long term projects, but I never got bored while doing it. There was always some fun involved to see some new feature showing up in a actual visual way and by far the most useful aspect was that I got to learn a lot about the languages, as well as Object-Oriented -Programming. It is one thing to read about them in a textbook, and wholly another thing to actually apply them in a project. If not implemented in a correct way, the code can get very. VERY. messy, very fast. Thus its not just about coding, but there was a good deal of preplanning and thinking involved too in as how things should be designed and implemented.

This was most true when I started writing a turn-based RPG game in the beginning for my 9th standard. There were lots of challenges that I faced, and since the codebase was huge, (for me atleast, because it had around 250 files with 7k-8k lines of total code), a lot of time was spent on thinking about the designing of classes rather than actual coding. Moreover, this time I also learnt some amount of graphics. I face challenges that are not really just implementation based, but even how to go about arranging the code and what abstractions to use. I distinctly remember sometimes thinking about a week on a certain problem. This also helped me understand that object oriented programming was indeed powerful and that without proper planning the same functionality would have taken me 2x more time and 5x more code.

I feel game development is a good place to start programming. It is interesting to build games so beginners wont get bored, while we still get to learn tons of stuff because writing an actual application is so much more different than learning the textbook way. It helps to keep the interest as what you learn is directly translated into a new feature. However, it is also true that it is foolish to start a big ambitious project write away, because a beginner will simply not have the appropriate know how to even start it, and so will have no progress to account for, which can be demotivating.

Comments

  1. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Ah well, when i was writing these, i was way too young to try and incorporate AI. I mean sure, i implemented some heuristics, but nothing of AI sorts. Also, I just wrote about my experience, i am not going to tell you to start/not start, mainly because circumstances differ. I did it just for fun, because i liked to code something that is actually real, not just school excercises. But then, starting from 10th, the workload starts increasing. So maybe doing something without a clear goal is not good atleast in a country like India? (just my thoughts)
      Also will try my best at IOI. :P

      Delete
  2. Hi Dear,
    Thanks for sharing such useful blog. Really! This Blog is very informativeus for which contain lot of information about Hardware Tools Supplier and products. I like this post. Please visit at "Video game development company usa", i hope you may like our hardware tools.

    ReplyDelete
  3. Thank you so much for sharing this amazing blog with us. Anyone who are searching for more, free training's like Python, Java, Asp.Net, Nodejs and more programming languages please contact Nareshit.
    NodeJS Online Training
    Data Science Online Training

    ReplyDelete

Post a Comment

Popular posts from this blog

Small-to-Large

Segment Tree Beats - An introduction

Getting prepared for RMO