News:

11 March 2016 - Forum Rules

Main Menu

How do I port Castlevania from android to pc

Started by Lufims, December 15, 2022, 10:16:08 AM

Previous topic - Next topic

Lufims

I used apktool to decompile the castlevania sotn apk, and now I don't know what to do with that, someone know how to port the game to pc?

KingMike

You port it with a lot of knowledge in a preferred programming language. Seriously.

If it was something so simple, it would have been done long ago.
"My watch says 30 chickens" Google, 2018

akualung

Quote from: Lufims on December 15, 2022, 10:16:08 AMI used apktool to decompile the castlevania sotn apk, and now I don't know what to do with that, someone know how to port the game to pc?

I know what I'm going to say is stupid, but the most sensible way is just installing an android emulator and run that game on it.

Lufims

Quote from: akualung on December 16, 2022, 11:15:39 AMI know what I'm going to say is stupid, but the most sensible way is just installing an android emulator and run that game on it.
My pc doesn't even run youtube with the video in 720p, so I can't run an android emulator

Lufims

Quote from: KingMike on December 16, 2022, 09:50:53 AMYou port it with a lot of knowledge in a preferred programming language. Seriously.

If it was something so simple, it would have been done long ago.
Yeah, i know, but what I need help is some directions to where to go, like, what language should I use (I just made android apps with java, css and typescript, and I have some knowledge in python too), and how can I start to make a port, because i've never did that before.

Cyneprepou4uk

#5
Since you already have a source code, you can read it and write basically the same game with your programming language in some game engine. Or maybe you can open it in Visual Studio and adjust it to a PC version or something. I don't really know how it works exactly, but I would start with looking that up.

Lufims

Quote from: Cyneprepou4uk on December 16, 2022, 01:41:03 PMSince you already have a source code, you can read it and write basically the same game with your programming language in some game engine. Or maybe you can open it in Visual Studio and adjust it to a PC version or something. I don't really know how it works exactly, but I would start with looking that up.
Ok, so, with visual studio I can rewrite some of the code to adapt it to pc, ok, this is a start, and basically I have to use C or C++ to do that, because java code is very slow in pc (I don't know about that, I just heard it somewhere), or something like that

JP32

Quote from: Lufims on December 16, 2022, 12:41:32 PMMy pc doesn't even run youtube with the video in 720p, so I can't run an android emulator
Emulate the ps1 version then.

KingMike

Quote from: Lufims on December 16, 2022, 12:41:32 PMMy pc doesn't even run youtube with the video in 720p, so I can't run an android emulator
That sounds like an apples to oranges comparison. I imagine running streaming video is more of an Internet connection problem than a PC problem (that the issue with downloading the data fast enough, rather than execution). But I could be wrong?
"My watch says 30 chickens" Google, 2018

Jorpho

Quote from: Lufims on December 16, 2022, 02:41:51 PMbecause java code is very slow in pc
What gave you the idea it was written in Java..?

You say you "decompiled the APK", but that probably doesn't mean you have any kind of human-readable code that you can easily rewrite in a different language.
This signature is an illusion and is a trap devisut by Satan. Go ahead dauntlessly! Make rapid progres!

KingMike

Is Java still used on modern smartphones?

My understanding is that the extent of Java was like mid-2000s flip phones.

I can't even remember since using Java in a programming class circa 2005, does Java even produce binary files or are apps entirely run by interpreting the code?
(my feeling is like, yes, there is a binary level and that it kinda was the point of Java: to create cross-platform programs by means of emulating fictitious hardware)
"My watch says 30 chickens" Google, 2018

Cyneprepou4uk

Quote from: Jorpho on December 19, 2022, 01:25:20 AMYou say you "decompiled the APK", but that probably doesn't mean you have any kind of human-readable code that you can easily rewrite in a different language.

I think it's possible to get the code, as it says here
https://stackoverflow.com/questions/3593420/is-there-a-way-to-get-the-source-code-from-an-apk-file

And OP said he used apktool, which is required for one of the steps.

Jorpho

Quote from: KingMike on December 19, 2022, 04:02:36 AMdoes Java even produce binary files or are apps entirely run by interpreting the code?
(my feeling is like, yes, there is a binary level
Aye, https://en.wikipedia.org/wiki/Java_bytecode

Quoteand that it kinda was the point of Java: to create cross-platform programs by means of emulating fictitious hardware
Indeed, if it was written in Java, an Android emulator would not be necessary.

On that note, doesn't Windows 11 run Android apps natively now? Of course, they'll still have to be compiled for x86, which isn't supported by all apps.

Quote from: Cyneprepou4uk on December 19, 2022, 04:56:26 AMI think it's possible to get the code, as it says here
https://stackoverflow.com/questions/3593420/is-there-a-way-to-get-the-source-code-from-an-apk-file
One of the answers:
Quoteit's not going to return the code you wrote. It is instead going to return whatever the compiler inlined, with variables given random names, as well as functions given random names. It could take significantly more time to try to decompile and restore it into the code you had, than it will be to start over.
.
This signature is an illusion and is a trap devisut by Satan. Go ahead dauntlessly! Make rapid progres!

akualung

Quote from: KingMike on December 19, 2022, 04:02:36 AMIs Java still used on modern smartphones?

My understanding is that the extent of Java was like mid-2000s flip phones.

I can't even remember since using Java in a programming class circa 2005, does Java even produce binary files or are apps entirely run by interpreting the code?
(my feeling is like, yes, there is a binary level and that it kinda was the point of Java: to create cross-platform programs by means of emulating fictitious hardware)

Correct, a bytecode is produced by compiling the Java source code, and then a virtual machine interprets it. On Android, I think that VM used to be Dalvik time ago, which was later replaced by Art. No idea if there's a different one currently, as I never went deep into coding for Android, didn't like it very much. Nowadays, it seems that you can code non-native apps using frameworks such as React native or Flutter.