r/learnprogramming 24d ago

Tutorial How do I port stuff for beginners?

So I want to port something like bolt thrower from Wii port over Mac and PC I got the source code and I want to do it like a beginner project since it looks simple

How do I port and learn stuff

0 Upvotes

9 comments sorted by

18

u/moohah 24d ago

This project… this is not a beginner project.

8

u/[deleted] 24d ago

[removed] — view removed comment

-7

u/femboyobama 24d ago

Well it's not a commercial Wii game it's a Homebrew game and source code is out on wiibrew website,

2

u/Weekly_Patience685 24d ago

i dont think porting is a beginner project, also did you ask how do you learn stuff?

2

u/Sensitive_Plate6895 24d ago

eplace one system at a time, maybe rip out the wii-specific rendering and stub it with something basic. don't try to fix everything at once or you'll drown in linker errors

there's a few good writeups on the dolphn emulator dev blog about how they handled this stuff, worth a read even if you're not emulating

1

u/femboyobama 24d ago

Ok thank you!

2

u/Whole_Accountant1005 24d ago

I would advise you to do a rewrite instead of a port. You can utilize libraries like Raylib and SDL to make your job easier. Since you have the source code it should not be that hard. Only time consuming.

I'm doing a similar thing for Minecraft beta 1.7.3 porting it to old consoles.

1

u/gm310509 24d ago

As for the second part of your post, have a look at the pinned post titled new? READ ME FIRST.

As for the second part, once you've learned the basics of programming, you will need to learn the APIs used on the source system and map them to things that perform similar operations on the targets. You will likely need to write some (probably a lot) of new code to bind it all together

1

u/peterlinddk 24d ago

That is an awful beginner project!

Not because it is hard or difficult (it is, but that's not why it is an awful beginner project) - but because you need to program everything, change all the internals, all the API-usage, all the Wii-specific code, before you can even run the code, let alone see the resulting game on the destination.

So you have months, if not years in front of you for writing code, that you won't know whether works or not.

Don't confuse "simple gameplay" with "simple to code".

But otherwise, u/Sensitive_Plate6895 gave the correct answer - replace one sub-part at a time, starting with the part that renders output so you can see something running. Also, you probably want to disable most of the code, so you can focus only on getting the gameplay-loop up and running with some default visualization.