python - Game cross-compiling and packaging -


Some friends and I wanted to develop a game. Any language will do this; I was programming in C for years, but never written a game before that. One of us knows SDL a little bit. It would be a good excuse to learn Python + Pajama.

We want our game to be 'standalone'. By standalone, I mean most users (at least Linux, Mac and Windows) must not manually install anything other than packages and this is fine if the installation handles automatic missing dependencies if the package contains binaries , We want them to be able to use cross-complexes from Linux.

How can we prepare and structate the project, and which language is most suitable?

If you have not sorted a game before, then I suggest you Start and pygame. Python is very easy to learn, if you are already a programmer, then it will not be too much leap for you.

With Pygame, you will have "Programming Game Logic" almost immediately with world-wide low-level explanations such as Window Management and Sound Setup, and at any time you blit ing Will be left and right. What's more, the prototype of your game will be very easy to run so that you can start experimenting with mechanics - I have programmed a simple side-scrolling platform in just a few hours.

Display

Python's performance with Pygame is generally good for simple games, although "smooth-scrolling" games can show poor performance, especially on Linux (my experience At least - pygame.display .update () literally took 15-30 MB per frame on Linux, and 4-5 on Windows with cheap Intel graphics, although it was two years ago And Linux Intel driver has been better late). In addition, if you have a physical science / math-heavy code, then you can give heavy speed (in some cases 20%-200%), although you will be limited to 32-bit python on an x86 computer.

Once you work mostly on Game Logic, if the display is still unsatisfactory, you can switch to C and SDL. Since you have already written Game Logic, you have to pay attention to dealing directly with SDL. Even it should be quite easy - Piegge uses SDL internally, so translation should be relatively simple.

OpenGL

Unfortunately, the above is true only if you are writing 2D games - Pygame does not basically give you any help for OpenGL. However, I recommend starting not game programming with OpenGL. For the first time, it can be very difficult to understand, so you will present yourself with two problems together - firstly, you are trying to find out how to get game logic / physics / AI / etc. Work, and then you are struggling to understand OpenGL. OpenGL is finally worth it to learn, but not from the beginning - starting with the basics and going from there.

Cross-platform idea

As far as cross-platform concerns - (for windows) and (for Mac) allow you to create separate executable files Which includes your dependencies (including Python interpreter and pygmem); However, I do not think you can make your executable with a Linux environment (you probably have to take a Windows / Mac computer for a few minutes). For Linux, you will probably distribute a .deb which lists Pygame as dependency (and if necessary, as a recommendation or signal for Psycho).


Comments

Popular posts from this blog

bytearray - Removing trailing nulls from byte array in C# -

linux - Authenticating GTK app to run with root permissions -

WPF TextBlock Overflow Text to the Left -