Contact Form

Name

Email *

Message *

Monday, November 2, 2015

Why Python for Game Design

Python is the choice language being used for the development of the Green Ninja Project. Other languages have been considered, but a static language has its limitations when compared to a scripting language such as Python. One of the main advantages of this language is that it can incorporate C/C++ code in order to enhance and automate production. (Game Scripting)

The limits of a language such as C++ stem from the fact that this language emphasizes run-time speed, rather than the features of the application. Sometimes there must be sacrifices to run-time in order to have the functionality that is desired. C++ also has the disadvantage of being static, which can infer that the coding process of the game being developed will take significantly longer. This is due to the complex functions that must be developed for potentially a single function call. (Game Scripting) C++ has the benefit of being an overall faster language when using floating pointers, in comparison to Python. However, the speed of modern computers effectively negatives this positive when comparing the extra work and time that would be spent adapting the same code in C++ from Python.

https://academy.zenva.com/wp-content/uploads/2014/09/Python-Game-Development-Create-a-Flappy-Bird-Clone.jpg


One of the main reasons to use Python in an environment, such as game development, is that all of the created objects have their memory allocated. Unlike in a static language which requires the freeing of memory,  there is no worry that bad allocation can cause other issues with memory down the line of the development or deployment of a product. Python also has easy integration of both C++, as well as HTML. This can allow for web apps, or in this case, games to be hosted on a webpage. In order for Python code to be executed on a HTML page, there needs to be a Common Gateway Interference, or CGI, that will serve as a bridge between the program and the server. (Use Python) From there, the standard MVC (Model View Controller) method can be applied in order to interface the application with the webpage. (Use Python) With these tools at the disposal of this language, Python becomes a very versatile and powerful language that has the ability to integrate high-level functionality while maintaining a simple-to-use coding environment.


https://i.ytimg.com/vi/CErDowuFclY/maxresdefault.jpg

Dawson, B. (n.d.). Game Scripting in Python. Retrieved November 3, 2015, from http://www.kaiyuanba.cn/content/develop/Game_Scripting_in_Python.doc

Kubica, M. (n.d.). HOWTO Use Python in the web¶. Retrieved November 3, 2015, from https://docs.python.org/2/howto/webservers.html


No comments:

Post a Comment