Skip to content

To C or Not to C: Initial rework #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 6, 2021
Merged

To C or Not to C: Initial rework #27

merged 6 commits into from
Apr 6, 2021

Conversation

bbbbbr
Copy link
Contributor

@bbbbbr bbbbbr commented Feb 8, 2021

@avivace @ISSOtm

All,

This is an start at reworking the To C or not to C doc by ISSO. After some discussion we decided that instead of just making minor updates to bring the document up to the current state, it might be better to change the approach. To that end, this restructures it to be a little more broad and general- how to choose the tools that will work best for one's goals and abilities. It tries to include all current tools (including GBStudio) and give people a sense of their limitations and strengths.

Where it needs help:

  • RGBDS Strengths & Weakness could stand to be filled in by someone with more experience

  • Should the document be renamed to something like "Choosing tools for Game Boy development"?

Please consider this more of a rough draft than a PR that is expected to merge. Feedback and direction is very welcome.

I haven't looked at it for a little bit now and may want to change a bunch as well, but would rather collect changes and do a bunch of editing all at once.

@avivace
Copy link
Member

avivace commented Feb 9, 2021

That's great, it already looks super nice. Thanks for your efforts on this, @bbbbbr

@avivace avivace requested review from avivace and ISSOtm February 9, 2021 11:07
@avivace avivace marked this pull request as draft February 11, 2021 00:18
@bbbbbr
Copy link
Contributor Author

bbbbbr commented Feb 14, 2021

I made a couple small corrections and fixes.

I wasn't sure if it was ok to add was a link to the gbdk/zgb specific discord server. If the preference is to not have it I'm happy to roll that back. I also made it via the GBDK github page to avoid having to update in multiple places if the link was to change later on.

I updated the expired Discord link for gbdev - though maybe it's better to point that one to the gbdev community page so it remains current?

Now that I've given it a once over I think it's good to go. I'm still happy to integrate further feedback and changes if anyone has ideas.

@bbbbbr bbbbbr marked this pull request as ready for review February 14, 2021 04:03
@ISSOtm
Copy link
Member

ISSOtm commented Feb 14, 2021

I updated the expired Discord link for gbdev - though maybe it's better to point that one to the gbdev community page so it remains current?

Yes, definitely.

@bbbbbr
Copy link
Contributor Author

bbbbbr commented Feb 14, 2021

I updated the expired Discord link for gbdev - though maybe it's better to point that one to the gbdev community page so it remains current?

Yes, definitely.

Done. Note- there isn't an id="..." anchor target for the discord heading in the gbdev.io landing/community page, so it doesn't scroll down to that section automatically. But there is a discord icon near the top, maybe that's fine?

@avivace
Copy link
Member

avivace commented Feb 14, 2021

Maybe this one? https://gbdev.io/chat.html

@bbbbbr
Copy link
Contributor Author

bbbbbr commented Feb 15, 2021

Haha, not sure how I missed that! 🤦
Done

@bbbbbr
Copy link
Contributor Author

bbbbbr commented Feb 26, 2021

Hey folks, what's the news on this? Any additional requests for changes or does it look ok to merge? If you'd rather not merge it, that's ok too.

@ISSOtm
Copy link
Member

ISSOtm commented Feb 26, 2021

Sorry, I have my terms coming in 3 weeks, so I really have no time to get involved in that for now. Please understand that it's still at the top of my priority list, though. Sorry.

@bbbbbr
Copy link
Contributor Author

bbbbbr commented Feb 26, 2021

Thanks, that's helpful to know. I'll check back afterward and good luck.

@avivace
Copy link
Member

avivace commented Mar 7, 2021

Let me say that that the document is currently too biased and aggressive, it's clear we need a profound revision to keep it as an official intro document.

I finally had some time to read the revision this honestly looks pretty good, especially because it's removing a lot of strong opinions on GBDK, while still allowing an informed choice.

However, I'd still like to have some kind of (objective) comparisons of the performance between the two approaches, highlighting how different the two tasks are and how "taxing" it is to write ASM vs GBDK but how it actually affects CPU cycles.

Thanks @bbbbbr for taking the time and the patience to work through this.

@bbbbbr
Copy link
Contributor Author

bbbbbr commented Mar 7, 2021

However, I'd still like to have some kind of (objective) comparisons of the performance between the two approaches, highlighting how different the two tasks are and how "taxing" it is to write ASM vs GBDK but how it actually affects CPU cycles.

The version online right now has a comparison using last crown warriors, however that's (presumably) compiled with the ancient SDCC and GBDK. It would be better to use a comparison that reflects the current state of the tools.

While I think comparisons are useful to illustrate, they should probably carry a caution not to draw broad, general conclusions from individual examples. Comparisons will be highly sensitive to context: what's being done, how complex is it, how important is the performance/code size, how much of an existing code library is available to draw from, how skilled and familiar is the person with ASM vs C, etc.

Case in point: I recently rewrote a C function in ASM. The ASM version benchmarked about 2x faster, it also took about 10+ times as long to write (I'm slow at ASM, despite being able to integrate some existing code). The speed bump was nice and it was a useful learning experience, but it didn't incentivize me to rewrite any of the other code. For another person that might have been sufficient motivation though. Or, it might have taken them the same or a smaller amount of time to write it in ASM at the outset.

@avivace
Copy link
Member

avivace commented Mar 16, 2021

@ISSOtm can we start merging the current status of the PR, even if it's a draft? It's better than keeping the outdated version online :/

@avivace
Copy link
Member

avivace commented Mar 16, 2021

I'd also change the title to "C vs ASM for gbdev" or something similar

@bbbbbr
Copy link
Contributor Author

bbbbbr commented Mar 16, 2021

I'd also change the title to "C vs ASM for gbdev" or something similar

Would you prefer a more specific title (like above) versus something general such as "Choosing tools for Game Boy development"?

@ISSOtm
Copy link
Member

ISSOtm commented Mar 16, 2021

Agreed, we ought to also point at GB Studio too, or at any other usable worflow/toolchain that may emerge in the future.

@avivace
Copy link
Member

avivace commented Mar 16, 2021

Agreed, we ought to also point at GB Studio too, or at any other usable worflow/toolchain that may emerge in the future.

Yes but please in a second moment, let's try not pack too many things for the first rework

@bbbbbr
Copy link
Contributor Author

bbbbbr commented Mar 16, 2021

Agreed, we ought to also point at GB Studio too, or at any other usable worflow/toolchain that may emerge in the future.

Do you mean on this page, or elsewhere on gbdev.github.io?

GB Studio is already mentioned in the new revised version and includes a link to their website.

@ISSOtm
Copy link
Member

ISSOtm commented Mar 16, 2021

That's what I mean: the document should point to those, and I also think that the title would be better if updated to reflect that. The document isn't just "C vs. ASM" anymore (and that was a fairly stupid thing, anyway).

@avivace
Copy link
Member

avivace commented Mar 19, 2021

@ISSOtm A part from the generalities of the document (which I'll be working on too), can you give some feedback on the contents so we can start merging it?

@ISSOtm
Copy link
Member

ISSOtm commented Mar 19, 2021

I have a bit of breathing room now, so please just give me until Sunday.

@bbbbbr
Copy link
Contributor Author

bbbbbr commented Apr 6, 2021

Any news on this, or anything that should be changed/improved?

@avivace avivace merged commit 151bbfb into gbdev:dev Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants