• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
3Ddreamer

Blender and Python: Objective Opinions Sought

9 posts in this topic

Good day, everyone

Recently I have been leaning toward Python as my next language after I learn and explore C# for a while. I want to work with C# getting at least the fundamentals in hand and maybe add Python in my course of learning later. Meanwhile, I will continue working with Blender in preparation for later things. I decided to make Blender my main base for animating. There are reasons why I started with C#, but I really don't want to go there with this thread, please.

I did a lot of reading here at gamedev and elsewhere, but I want to get viewpoints on the following questions here so I can make a final decision on Python with the help of objective opinions.

Questions:

1) a. Is Python a good or great language for game performance, specifically frames per second and smoothness in 3D scenes? The reason I ask this is because Python appears to be a very adaptable language but I wonder if it could be "too good to be true" in the sense of maybe game performance might be the price to pay for all that language adaptability, especially the syntax expressiveness. I don't know but there seems to be some doubt out there about performance.

b. How does Python compare to C++ for game performance, all other things being about equal?


2) Is Python better for people of lesser experience to learn it compared to C++?

3) With all the flexibility of Python, what are it's strengths and weaknesses for games?

4) How do I deal with the issue of an IDE for Python? Is Blender going to be a dead end in one sense of needing an IDE eventually?


Please keep in mind that I do understand how personal preference and experiance play a major role in these issues, but I want to look at them apart from personal aspects. I'm sure that a few people will wonder why I don't ask these things in a Blender or Python website, but I want to get more objective opinions.


As always, any and all comments, questions, and criticism of my writing is welcome in my threads, but please stay on topic.

3Ddreamer


P.S. ll Note to Administrators: No more than two Tags are being allowed to save at this time in my post for some reason. Edited by 3Ddreamer
1

Share this post


Link to post
Share on other sites
Hi,

[quote name='Goran Milovanovic' timestamp='1345947871' post='4973384']
The CPU is not the bottleneck.
[/quote]

Is this because the memory management prevents a CPU bottleneck? In the meaning of memory management, do you mean video memory management? In that case, I can see the benefit of automatic memory management.

Memory management is a huge issue in many games, I know. Do you happen to know if Python supports preprocessing of video frames? Perhaps this is included in automatic memory management.

By an interpreted language, in the case of Python is it the case that the program data is more video memory and GPU focused than that of a compiled language? I hope that I am getting this. I know it to be much easier to prevent stuttering in a game in general with graphics based solutions where possible rather than facing CPU lob jams, but this might have changed recently with CPU advances.

3Ddreamer
0

Share this post


Link to post
Share on other sites
Goran Milovanovic,

Right you are that I am very inexperienced and I know it.

As a matter of conscience, I must get enough information in order avoid months or years of learning things which will never be needed again, so I am choosing my path carefully. I know what I want in a very general sense and I am looking for a system which will be a good match to my goals both short term and long term.

Thank you very much for your help! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]


3Ddreamer
2

Share this post


Link to post
Share on other sites
[i]1) a. Is Python a good or great language for game performance, specifically frames per second and smoothness in 3D scenes? The reason I ask this is because Python appears to be a very adaptable language but I wonder if it could be "too good to be true" in the sense of maybe game performance might be the price to pay for all that language adaptability, especially the syntax expressiveness. I don't know but there seems to be some doubt out there about performance.[/i]
[i]b. How does Python compare to C++ for game performance, all other things being about equal?[/i]

[b]Depends[/b]. The worst answer in the world to give a newbie, but it's also almost always the right answer. Python gets very reasonable performance for a scripting language, [u]but it is a scripting language[/u]. For a typical 2D game (such as a pac-man clone), it would perform very well. If you're hoping to make Crysis 3, you will most likely find Python insufficient. The issues with using scripting languages over C/C++ or even C#/VB.NET for game development is that you not only gain interpretor overhead, but also lose the ability to play directly with OS interfaces.

As Goran mentioned, on newer hardware, and written by a good programmer, the CPU (interpretor overhead) is not likely to become the bottleneck of any game, it will be GPU, but I feel the need to mention interpretor overhead anyway. I'm old-fashioned.

[i]2) Is Python better for people of lesser experience to learn it compared to C++?[/i]

[b]Yes[/b], Python is simple to learn relative to C++ and even C#. Not only is it easier to learn, but you will get faster results when creating from (essentially) scratch, which is great for encouraging newbies (and why very few newbies stick with C++ after realizing such alternatives exist). I highly recommend using Python or a similar scripting language to familiarize yourself with programming, even if it winds up being insufficient for the purposes of making your game.

[i]3) With all the flexibility of Python, what are it's strengths and weaknesses for games?[/i]

[b]Strengths[/b]
Easy to use
Easy to learn
Fast results
Portable
Many bindings available for open-source game development APIs
Reasonable performance
Boost.python provides excellent C++ bindings to python, making it easy to use for scripting events, should Python prove to not be performant enough to do all game functionality in.

[b]Weaknesses[/b]
Interpretor overhead
No direct access to OS and hardware features
Most game programming tutorials are still in C++, few serious game developers use Python

[i]4) How do I deal with the issue of an IDE for Python? Is Blender going to be a dead end in one sense of needing an IDE eventually?[/i]

[b]There is no IDE for Python[/b] -- well, okay, I'm sure somebody's made one by now. But there is no need for an IDE for Python. Python is a scripting language that does not need to be compiled or linked to be run (it is run by an interpretor), so the only use for an IDE in the case of Python would be syntax highlighting, in which case you should find Notepad++ quite suitable.


[i]The unasked question: Is the Blender API good for making games?[/i]

Blender is a great tool for making 3D models, and it is awesome that they provide a method to easily see those models in action.
I do not think any serious game studio would use it for its entire game. But I'm sure there's someone who has disproved me.



Also, on your last post:
[i]As a matter of conscience, I must get enough information in order avoid months or years of learning things which will never be needed again, so I am choosing my path carefully. I know what I want in a very general sense and I am looking for a system which will be a good match to my goals both short term and long term.[/i]

Whoa, bro. The only re-learning in game development is between various APIs (X11 vs Win32, OpenGL vs DirectX, etc); and even then, it's more like learning an alternative than it is re-learning; you don't want to dump the old knowledge, only gain the new.
All programming experience is a positive thing. Even if your software is a steaming pile of crap that doesn't run, crashes sporadically and frequently, and every now and then even leaves you with a BSoD, at least you have the experience of making that crap.
All programming experience improves you, as a programmer, as long as you actually learn from it. I look back at code I wrote in '06/'07 and laugh at my inexperience.
Learning Python is never a waste of time, and every bit of experience in Python will carry over to C++ (or whatever language you use next), even despite their vast differences. Painting may not be sculpting, but programming is programming, period.
Unless I'm missing something and there's some urgent reason why you must finish your game in the next couple years, like it's your dream and the doctor told you that you only have three years to live or something, take it slow and experiment. Nobody can tell you the best route to take, we're all still learning too.

[b]Personal Recommendation:[/b]
Start with Python, use it to make a nice simple game like a pac-man clone. This will likely take you a few months. That should give you perspective enough to decide your next step. Ultimately, I would recommend C# and XNA -- XNA is a great API, C# is a great language, and the .NET framework is probably the greatest I've played around with. Unfortunately, XNA is not portable, and will only work on Windows and XBox360, and I found some requirements of using XNA (not the API itself) to be aggravating after knowing the unbounded freedom of developing games in C++. These requirements will certainly not bother someone who has never had that experience. Edited by nfries88
2

Share this post


Link to post
Share on other sites
[quote name='3Ddreamer' timestamp='1345932399' post='4973348']
1) a. Is Python a good or great language for game performance, specifically frames per second and smoothness in 3D scenes? The reason I ask this is because Python appears to be a very adaptable language but I wonder if it could be "too good to be true" in the sense of maybe game performance might be the price to pay for all that language adaptability, especially the syntax expressiveness. I don't know but there seems to be some doubt out there about performance.
[/quote]
Compared to other scripting languages, the CPython interpreter is high on the "object tax" scale (dynamic lookup of everything, every time) but it has two advantages: superb support for arrays (particularly with additional libraries like numpy) and reference-counted garbage collection (causing ugly pauses only if you do something stupid).
[quote]
b. How does Python compare to C++ for game performance, all other things being about equal?
[/quote]
Probably you are going to use better algorithms in Python, your skill and effort being equal.
[quote]
2) Is Python better for people of lesser experience to learn it compared to C++?
[/quote]Python should be easier to learn for just about anyone, but every language has its place.[quote]
3) With all the flexibility of Python, what are it's strengths and weaknesses for games?
[/quote]None in particular, but you might write something grossly inefficient because it seems natural. Which is a much better deal than writing something subtly and dangerously wrong in C++ because of a momentary lapse from paranoia.[quote]
4) How do I deal with the issue of an IDE for Python? Is Blender going to be a dead end in one sense of needing an IDE eventually?
[/quote]
The appropriate mode for Emacs or Pydev for Eclipse are good, and Blender has its own Python editor. There is no issue and no dead end.
2

Share this post


Link to post
Share on other sites
okay, I chewed that. I will need to spend more time on it, but that is a good next area where you guys lead me.

Today I continued doing hours of reading in different sources.

Long term, I want to create my own game source code in order to customize the game as an executable program. In the case of Blender and Python, I have yet to realize how I can learn with them and be able to eventually create my own game engine and separate executable game. Blender has the game engine integrated with it, so I am concerned down the road about the end user of my games having to install Python scripts in order to play my games. I will want them to get the game as an executable program only with no need for downloading anything else as I have experienced myself on rare occasion with games. Perhaps Blender actively supports the game developer in creating source code and separate executable games, but I have yet to get there in my research. Surely for these issues I must read more thoroughly the Blender institute information and begin to ask questions in the Blender forums.


3Ddreamer
0

Share this post


Link to post
Share on other sites
[quote name='3Ddreamer' timestamp='1346104604' post='4973919']
I am concerned down the road about the end user of my games having to install Python scripts in order to play my games. I will want them to get the game as an executable program only with no need for downloading anything else as I have experienced myself on rare occasion with games.[/quote]
There are [i]several[/i] tools to automatically bundle your code, libraries and a stripped down Python interpreter into an executable, for example Py2exe [url="http://www.py2exe.org/"](http://www.py2exe.org/[/url]) or PyInstaller ([url="https://github.com/pyinstaller/pyinstaller"]https://github.com/pyinstaller/pyinstaller[/url]).
2

Share this post


Link to post
Share on other sites
LorenzoGatti,

Thanks for saving me some searching. I read some poster in a thread in the Blender Artists forum talking about it, but no link was given. I really am [i]not[/i] trying to take any lazy way about this, but sometimes saving time is a good thing.

The idea of designing a game engine to use another language for certain performance demanding issues is very interesting to me, however I am a long way from handling that kind of thing. It would, it seems, allow Python to really be competitive in high performance characteristics if another language is incorporated effectively.

I am a 2D and 3D artist, so the art aspects of Blender are very attractive to me. Realistically, having a complex game created by me is probably years in the future, so I best get moving on it real hard! [img]http://public.gamedev.net//public/style_emoticons/default/cool.png[/img]

Decision on what system I will start to use will come by the end of this month - Friday. I'll find some way to let the people who helped me know.


3Ddreamer
1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0