27 Jun 2015
This week, I asked for questions specifically about coding and the open-sourcing of osu!. I wanted to cover this area since open-sourcing osu! is one of my main focuses currently. There’s some basic stuff I want to cover that I guarantee will be asked many times over in the Q&A session (I haven’t read the questions yet, but I’m confident!).
@ppy how does osu! deal with being multi platform and playing mp3’s? do you just have to support different libraries for different OS? –maboesanman
We use the Bass audio library, which covers mp3 playback.
@ppy Which IDE are you using for coding web related stuff? –HawKyuu
Sublime Text 3.
@ppy Since you like using SublimeText, are there any "Must have" Plugins you suggest (besides PackageControl)? –Techbot01
AlignTab, BracketHighlighter, Emmet, SublimeLinter.
@ppy Have you ever though of remaking osu completely in another programming language? If so, which one and why? –loup37
No, c#/.net works just fine.
@ppy How did you implement slider curve rendering in OpenGL? –unknownloner
Basically took what we were doing in Direct X and coded it in opengl.
@ppy I’m currently studying C# what do you think I should learn next and when should I start studying it? –NestyGs
Rather than learning something specific, try and do something you want to do. Create a project, make a goal, then learn whatever is required to make it happen.
@ppy How do you handle networking with osu & bancho (in terms of coding it)? –VirtuousNinja
I wrote everything from scratch using async .NET sockets. osu! and bancho share a common assembly which has serialisation method for each kind of packet.
@ppy I have too much questions that i have to take a photo of them. Hoping for your answer >< http://t.co/r0m7LshPav –tuong_duc_khang
Sorry but I’m not typing all these out just to answer them. Link me the raw text next time, rather than a screenshot.
@ppy What do you think your biggest coding mistake has been in building Osu? If it was using XNA then what was the next biggest mistake :). –KurtKartaltepe
XNA wasn’t a mistake. THe biggest mistake was the render hierarchy, which is what I’m currently working on fixing. One huge mindfuck of ratios and variables acting on each other.
@ppy What is your stance on using software to autocomplete typing out functions, compared to doing it all manually (when learning coding)? –Woddlez
Anything that can be automated should be.
@ppy Were there any specific resources that helped you get started with server-side stuff, or did you just learn as you went? –Limyc_
Learn as I go.
@ppy How much time do you usually devote to bug fixing? –BusterTheFox
95% of the time I spend coding is fixing bugs.
@ppy Have you found C# restrictive when it comes to performance and data locality? If so, do the productivity benefits vs C++ outweigh that? –Limyc_
No way. The performance difference isn’t even that big (can use unsafe contexts if necessary, which gives you ~= performance to c++).
@ppy What’s your opinion on Swift? –bboxxy
Better than ObjC, but they got a bit too liberal with features IMO.
@ppy how long could a slider get before you get a out of memory error? –Miterosan
No idea. Try it yourself?
@ppy how many lines/classes of code do you have? –Miterosan
I’ll have to get back to you on this.
@ppy how may big threads has osu! Or is the game one big thead? –Miterosan
Usually 4-10 threads, depending on what is happening.
@ppy how long would it theoretically take to implement a new game mode into osu? –LoLMonosphere
To get the basics working and playable, around 1 hour (if you know what you’re doing). To perfect it, probably 1-3 months.
@ppy How do you ‘start’ to get into coding? –Intelmuch
@ppy Will you be stopping support for DirectX when Osu is fully taking advantage of OpenGL? –abe8132
DirectX isn’t supported anymore.
@ppy What was the biggest help to you while learning to code? –rrisx
Open Source Related
@ppy Oh also, will open source just be graphical, gamemode, gameplay, modifications or other components as well? –Methos319
The osu! game client will be the first part.
@ppy what kind of commits do you expect when osu goes opensource? –Fredgid0
New features, bugfixes. Anything that moves osu! forward.
@ppy Will we be allowed to have private builds + bancho instances with e.g. custom multiplayer modes/mods without ranking for <10 people? –mario185
No, this won’t be covered by the licence we release under. The idea of open-sourcing osu! isn’t to have people run their own communities, but to allow contributions to the main code-base from anyone who wishes to help out.
@ppy Do you think the open sourcing will happen this year? –xasuma
Yes, that’s my aim.
@ppy How realistic would a ‘modding’ API be for osu? –VirtuousNinja
We had an API but with open source as a goal, we recently deprecated it. We plan on making skinning much more flexible, and hope that will be enough to satisfy modders. If you need code changes to make something happen, and they are reasonable, then you’re just a pull request away from getting them into the official client :).
@ppy If you go open-source, how are you going to prevent modified / hacked clients from submitting the scores? –YaLTeRz
Netcode will not be released with the client.
@ppy Obligatory when open source? Also, what will you want/refuse to change when open source eventually happens? –Yoshiap1
I plan on having a list of features/bugfixes with bounty attached. When fulfilled successfully (and correctly), the users that completed the task will be rewarded.
As for what I will accept/refuse, this is yet to be decided. As usual, I’ll still have the final call. I hope to let as much in as possible, within reason.
@ppy When osu! is eventually open sourced, will you be accepting pull requests for improvements and bug fixes that meet quality standards? –Limyc_
That’s the plan. In fact, that’s the ONLY reason we are open-sourcing. I don’t want to manage/pay a huge dev team; I’d rather have a huge dev community that are rewarded based on their precise contributions.
@ppy Do you have a roadmap to OS, or are you taking things one at a time until you feel it’s ready? Estimate for OS release? Within a year? –Limyc_
@ppy How close do you feel osu! is to becoming open source? –Kraminka
One at a time, as I always do. This year is definitely the plan.
@ppy Do Bancho or something similar will be released (in an open source way) so that we can create our own game server ? –Unennako
Bancho is getting deprecated, so the current implementation will likely never be public. The new web back-end will be open-sourced in the near future. That said, the licence will not allow for it to be used publicly (private use/testing is fine, of course).
It will be more clear once we release the licence that will be used for all osu! open-source components, but as per my answers, the idea is not to allow custom builds of osu! to be released. To me this seems counter-productive (I want all improvements to be shared with all osu! users, rather than a subset), and I would argue that if you are looking to make your own osu! clone, starting from scratch is a much better idea.
Open-sourcing osu! is my solution to growing the development team further, allowing correct distribution of funds based on impact of contribution (not hours spend) and increasing transparency. More transparency is always a good thing. It is my solution to allowing anyone who wants to (and has the skill to) contribute to osu! development to do so.
It is also my solution to making osu! live forever – after all, who knows what may happen to me in the future. Much of the current osu! ecosystem is still reliant on me being around, so I would like to ensure that this is not the case going forward.
Obviously there will be people who ignore me and break the licence terms, but I am happy to deal with this as we go (using legal means where necessary). I am sure some of you may disagree with my thinking here, but just keep in mind that I still see osu! as my own project and I would like to see the ecosystem continue to grow as one, rather than splitting out into many smaller communities. There’s not many games that bring every country in the world into a single united community. I’d like that osu! remains this way as long as it can.
We are still working on the final licence terms (this is one of the major blockers for releasing open-source components – a few of which are ready and waiting).