Jump to content

Question about programming games.

Emperor Numerius

I know Python and its dependencies, but mobile platforms like Android and IOS dont use that. instead they use Java and Swift. How similar are those to programming in Python?

i.e. if i have a game that i coded in pygame and it runs as an application how much effort, time and work will it take to convert it to android or IOS? (I don't have an up to date android phone but i mostly code on Windows)

 

Link to comment
Share on other sites

Link to post
Share on other sites

Have a look at Pygame Subset for Android, this git repository seems to allow you to run your game on Android: https://github.com/renpytom/rapt-pygame-example

 

Pygame on android GitHub issue:

https://github.com/pygame/pygame/issues/727

 

It seems like it would be possible to build pygame on iOS, but I think you would have to build it from an OSX device:

https://buildozer.readthedocs.io/en/latest/

- (via: https://github.com/kivy/kivy-ios)

 

Hope this helps

Link to comment
Share on other sites

Link to post
Share on other sites

The biggest problem for you'd be that pygame comes with a bunch of functions, that you won't have in Java/Kotlin or Swift. You should probably look at a game engine that already provides those functions. You could of course also take the more difficult approach of handling everything yourself, but for that you'd have to learn a lot.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Choc_a_Block said:

Have a look at Pygame Subset for Android, this git repository seems to allow you to run your game on Android: https://github.com/renpytom/rapt-pygame-example

 

Pygame on android GitHub issue:

https://github.com/pygame/pygame/issues/727

 

It seems like it would be possible to build pygame on iOS, but I think you would have to build it from an OSX device:

https://buildozer.readthedocs.io/en/latest/

- (via: https://github.com/kivy/kivy-ios)

 

Hope this helps

thanks for the info!!!! 😁

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, adm0n said:

The biggest problem for you'd be that pygame comes with a bunch of functions, that you won't have in Java/Kotlin or Swift. You should probably look at a game engine that already provides those functions. You could of course also take the more difficult approach of handling everything yourself, but for that you'd have to learn a lot.

do you have a suggestion for a game engine that has those functions?

Link to comment
Share on other sites

Link to post
Share on other sites

It's not feasible to develop an iOS app without a Mac computer, regardless of how you do it, you'll have no way to test. You may be able to rent something in the cloud.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, thevictor390 said:

It's not feasible to develop an iOS app without a Mac computer, regardless of how you do it, you'll have no way to test. You may be able to rent something in the cloud.

I have a macbook that i can use!!!

its an M1 Macbook pro that is 2 years old.

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Emperor Numerius said:

do you have a suggestion for a game engine that has those functions?

Unity is pretty easy to pick up and lots of decent games have been built with it.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, adm0n said:

Unity is pretty easy to pick up and lots of decent games have been built with it.

it uses C++ right?

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Choc_a_Block said:

It uses C#

how different is that from python?

I also have done a bit of Java

Link to comment
Share on other sites

Link to post
Share on other sites

39 minutes ago, Emperor Numerius said:

how different is that from python?

I also have done a bit of Java

If you want a good game development platform then pretty much it's Unity or Unreal. Programming languages on their own don't play a role that much. Nowadays you need the software stack to do anything. Python can do a game with PyGame but it will be limited on various fronts as it's not a "tier 1" software stack in terms of features and maturity. Same with mobile development - Python can make a simple-ish mobile app with Kivy but it's nowhere near good mobile apps done on tier-1 software stacks.

 

Also, game development is one of the most time-consuming/complex. Unity/Unreal stores can help you with assets and some components but still, it will require a lot of time and effort from you to learn them... but if you do you will have a commercial career path open as well.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Emperor Numerius said:

how different is that from python?

I also have done a bit of Java

It feels more like python than like C++ in my opinion. At least in the way you'll mostly use it while working with unity. You always have the option to use more complex C# features, but for most common use cases the unity libraries have you covered.

 

If you've done any programming at all, you'll have no trouble with the programming side of it and will naturally pick up most of what you need while learning how to use unity. At least until a certain level. I'd just give it a shot.

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, riklaunim said:

If you want a good game development platform then pretty much it's Unity or Unreal. Programming languages on their own don't play a role that much. Nowadays you need the software stack to do anything. Python can do a game with PyGame but it will be limited on various fronts as it's not a "tier 1" software stack in terms of features and maturity. Same with mobile development - Python can make a simple-ish mobile app with Kivy but it's nowhere near good mobile apps done on tier-1 software stacks.

 

Also, game development is one of the most time-consuming/complex. Unity/Unreal stores can help you with assets and some components but still, it will require a lot of time and effort from you to learn them... but if you do you will have a commercial career path open as well.

wut?

can you break it down for me

i'm not familiar with tier's in programming

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, adm0n said:

It feels more like python than like C++ in my opinion. At least in the way you'll mostly use it while working with unity. You always have the option to use more complex C# features, but for most common use cases the unity libraries have you covered.

 

If you've done any programming at all, you'll have no trouble with the programming side of it and will naturally pick up most of what you need while learning how to use unity. At least until a certain level. I'd just give it a shot.

ok thanks for the advice, I want to make a game for mobile platforms

🙂

Link to comment
Share on other sites

Link to post
Share on other sites

32 minutes ago, Emperor Numerius said:

wut?

can you break it down for me

i'm not familiar with tier's in programming

 

It's just a term for "the best" software stack for given task, either supported by host company (Google for Android, Apple for iOS) or third-party/very large community project that is used for "production" applications and is widely recognized as the best or one of the best, worth using.

Link to comment
Share on other sites

Link to post
Share on other sites

I second the Unity recommendation, especially if you are just starting out
There are countless resources/tutorials on how to do pretty much anything on Unity, also if you are not all that interested in learning programming you can use one of many different "Visual Scripting" addons that would let you "program" your game via a GUI

example: https://assetstore.unity.com/packages/tools/visual-scripting/playmaker-368 

Link to comment
Share on other sites

Link to post
Share on other sites

I think it is worth noting react native in this thread. I have only used react before rather than react native. From my understanding react native can be used to have a single codebase that will work for both IOS and Android.

Link to comment
Share on other sites

Link to post
Share on other sites

On 8/17/2023 at 9:47 AM, adm0n said:

If you've done any programming at all, you'll have no trouble with the programming side of it and will naturally pick up most of what you need while learning how to use unity. At least until a certain level. I'd just give it a shot.

While I do think that Python is a decent language to start with and so are other scripting langues, I do find that a lot of people have troubles switching to something like C# or C++ where types essentially are defined.  Where int a = 2; a / 3 will have a completely different outcome to what python would produce.  That's where I think the biggest hiccups are, that there are quite a bit bigger differences between C++ and python.  (That and the concept of pass by value vs pass by reference etc)

 

To the original poster, what others said, Unity.  Unity is nice I find; and it's c#.

Honestly if you learn C# well, and python you probably would have an easy time eventually adapting to things like C and C++ (where the biggest thing with those two is memory management)

3735928559 - Beware of the dead beef

Link to comment
Share on other sites

Link to post
Share on other sites

On 8/17/2023 at 5:03 PM, Emperor Numerius said:

I know Python and its dependencies, but mobile platforms like Android and IOS dont use that.

I'm afraid, there is a slight misunderstanding: A platform basicly doesn't care what language a program has been written in. As long as the program has been compiled  for that platform (i.e., translated from the somewhat human-readable programming language into the architecture's native machine language), it can run the program. Python is a bit more complicated because it is an interpreted language rather than a compiled one, but as long as you have an interpreter for Python that runs on iOS/Android, you can write any game in Python and it will run on either platform. AFAIK, Python interpreters do exist for both Android and iOS, so go ahead!

Link to comment
Share on other sites

Link to post
Share on other sites

On 8/17/2023 at 5:40 PM, Emperor Numerius said:

how different is that from python?

I also have done a bit of Java

This is the difference in terms of performance with Python:

 

When Is Java Faster Than C++?

https://www.forbes.com/sites/quora/2015/05/26/when-is-java-faster-than-c/

Large projects tend to be easier to optimize in Java, because the JVM handles many of the "global" optimizations (such as the ability to inline dynamically-loaded code) for the developer.

 

https://www.reddit.com/r/programming/comments/37d9kg/when_is_java_faster_than_c/

In almost 20 years of C++ and Java development, my impressions are exactly the same: the bigger the program, the more concurrent, the harder it is to beat Java.

 

Why Java is the Language of Choice for Game Programming

https://connectbud-itsolutions.medium.com/why-java-is-the-language-of-choice-for-game-programming-a55e0ab4f2a9

 

Python is one of the very slowest programming languages in terms of app speed. You can also see that apps like Ansible and pgAdmin are many times slower than similar apps written in other programming languages. You can also say that Python programmers, despite their numerousness, are useless and basically just produce crapware.

 

If you mean how different the syntax and features of the language are, the difference is pretty big.:

https://artoonsolutions.medium.com/python-vs-java-comparison-c06e44d652a5

OS: FreeBSD 13.3  WM: bspwm  Hardware: Intel 12600KF -- Kingston dual-channel CL36 @6200 -- Sapphire RX 7600 -- BIOSTAR B760MZ-E PRO -- Antec P6 -- Xilence XP550 -- ARCTIC i35 -- EVO 850 500GB

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, The Hope said:

Why Java is the Language of Choice for Game Programming

There aren't many: https://www.javacodegeeks.com/2021/09/7-best-games-written-in-java.html

 

And nothing beats Unity and Unreal in terms of the popularity and quantity of successful games delivered. And no one here realistically recommended Python for game development either.

Link to comment
Share on other sites

Link to post
Share on other sites

On 8/30/2023 at 10:22 PM, riklaunim said:

There aren't many: https://www.javacodegeeks.com/2021/09/7-best-games-written-in-java.html

 

And nothing beats Unity and Unreal in terms of the popularity and quantity of successful games delivered. And no one here realistically recommended Python for game development either.

That's not all Java games ever made. It is just a random list of Java games known to the person who wrote the text.

 

Made in JavaScript, Angry Birds has become more popular than literally any game made with Unity or Unreal engine.

Minecraft (made in Java) has also become more popular than any game made with Unity or Unreal engine. 

 

You now have Godot engine which is almost as fast as Unity in terms of performance. I think you can choose multiple programming languages for Godot to use.

It currently only supports C++, C# and GDscript. But since they added C# later, I think it should also be possible to support Java and other languages in the future.

C# is arguably a very close copy of Java.

 

There is also a game engine written in Jai born out of frustrations with C++.

https://en.wikipedia.org/wiki/Jonathan_Blow#2017–present:_Jai_programming_language,_untitled_Sokoban_game,_and_Braid,_Anniversary_Edition

 

I would say that you are not required to use C++ or C#. There are multiple game engines for Java.

 

There are several projects that prove that it doesn't always matter which programming language you choose:

 

Kandria, an action RPG made with Common Lisp

A fully-fledged Common Lisp game engine

https://github.com/Shirakumo/trial

 

Games reliant on Haskell

https://wiki.haskell.org/Applications_and_libraries/Games#Games

 

Julia: A Game Developer's Dream Language

https://marketsplash.com/tutorials/julia/julia-game-development/

 

Nim SDL2 Game Development for Beginners #1 Setup and your first moving image

 

 

OS: FreeBSD 13.3  WM: bspwm  Hardware: Intel 12600KF -- Kingston dual-channel CL36 @6200 -- Sapphire RX 7600 -- BIOSTAR B760MZ-E PRO -- Antec P6 -- Xilence XP550 -- ARCTIC i35 -- EVO 850 500GB

Link to comment
Share on other sites

Link to post
Share on other sites

41 minutes ago, The Hope said:

You now have Godot engine which is almost as fast as Unity in terms of performance.

Yet there are no job offers locally for it, while there are for Unity and Unreal.

 

43 minutes ago, The Hope said:

Nim

Going into elitarims or fanboyism is bad.

Link to comment
Share on other sites

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

×