published 01 Jul 2015

  • Made some great progress today implementing what I discussed yesterday. osu! is back to rendering as it should, so I don’t have any breakage videos for you today, sorry!

  • I didn’t get around to doing a write-up on the new draw hierarchy – because I was too busy actually implementing it – but it’s planned for tomorrow’s post :).

  • Tablet shipment safely delivered after some confusion and me attempting to remotely guide the delivery man (who has no smartphone with maps) through a neighbourhood I am unfamiliar with using google maps.

Let me take a moment to again make a shout out to the new forums, which are now more-or-less in a working state as far as posting, replying, quoting and consuming. They have been getting daily updates over the last weeks based on feedback, but we aren’t planning on releasing them to the masses until we are 100% sure they are ready.

Starting this week, we moved development focus to other areas of the site, so I’d be very grateful for any feedback on the forums specifically. Anything from usability to performance issues, to anything that’s bugging you which makes them unusable over the old forums for now.

As we don’t currently have somewhere to report issues (until the github repo is opened up), you’re welcome to leave comments on this post or just tweet at me.



published 30 Jun 2015

2D math.. harder than you may first expect. At some point you realise it is best to cut your losses and start implementing from scratch, rather than attempting to fix what is at hand. This was that point for me:

(this video isn’t as broken as you might think: everything is working apart from sprite-based text and non-default texture origins)

Today I enlisted the help of Echo as we went through the graphic architecture that I’m attempting to achieve. He came up with a proof-of-concept in javascript which seems to work as we need it to (and moves us closer than ever to a software reimplementation of javascript matrix logic).

In other news, while the osu!store is still in hibernation, our next batch of tablets is scheduled to arrive early tomorrow morning. While I’m not directly accepting the shipment, I am remotely managing communications between the person who is and the customs broker / delivery company. Lots of fun. Needless to say, we lasted a full tablet batch without going completely out of stock, and should also have stock for the foreseeable future. Finally figured that one out :).



published 29 Jun 2015

Hello peoples of osu!, and welcome back for another week of ramblings. Hope you had a great weekend. It’s going to be another long week!

Continuing work on the draw hierarchy means I’m spending all my free time focusing on math. Math tires my brain like nothing else, so don’t expect too much by way of long posts until things settle (although I plan on attempting to explain the main issues I am working to solve in a technical post tomorrow)!

Breaking osu! in fun new ways, every day.

With that out of the way, let me touch with why I haven’t done a coding stream yet, even though I keep saying I will:

  • I know you guys say you want to watch no matter how boring I think what I am doing is, but honestly, the restructuring I’m doing right now means I regularly sit staring at the screen doing nothing for 10 minutes at a time, or am writing notes on paper to try and figure things out.

  • The code I’m currently working with isn’t exactly something I’m proud of. It’s a clusterfuck of hacks that work perfectly at a high level, but internally feel really clumsy. I feel cautious to share such code on my stream because it doesn’t set a good example.

  • I’m not really in an environment which I can use a microphone to talk while streaming. People around me can be quite noisy and I don’t want to capture that in my stream.

  • I have so many interruptions throughout the day which cannot be streamed (like attending to reports of foul-play, fixing ongoing database issues or answering emails) which I need to correctly separate to make sure they aren’t included in the stream. I had this setup well back around the time I was streaming late last year, but have since formatted and lost the degree of separation I want to achieve.

  • With these blog posts, I worry that the overhead of transparency will impede on my productivity. Streaming means dealing with extra social elements which I wouldn’t usually have to worry about. Socialising is tiring for me at times.

Honestly, coding streams work best when I am working on something fresh, rather than fixing bugs or refactoring large portions of code. I have made a mental note to stream next time I’m working on something new.

That said, I really want to stream on a more regular basis. I’ll keep striving to get to the point I can do so!


20150627 /answers-3/

published 27 Jun 2015

It’s time for Friday (Saturday?) Q&A again! I may be a day late, but flyte posted a nice long osu!next post fielding questions about osu! design work, so I don’t feel so bad.

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!).

General Coding

@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

Write code.

@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


@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).

Final Words

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).



published 25 Jun 2015

Had to catch up on administative/accounting tasks today, but still managed to attack a part of the draw hierarchy code reform (and completely drained my brain of any extra energy in the process). Also spent some time following up the next incoming shipment of tablets, which was delayed a few days and has therefore required rescheduling at our end.

So what is this “Draw hierarchy” thing I keep mentioning? Let me try and sum it up in a way that’s easy to understand:

Until now, to sprites in osu!, you add them to a SpriteManager. This SpriteManager contains some global information like their offset position on screen (to allow for scrolling views and such), but the sprites themselves contain what we call “field” information. A sprite’s field determines what coordinate system is used for the mapping of position and scale of a sprite from input (code) to output (screen).

While this is relatively felxible, there are some very large shortcomings which I already addressed in osu!stream (which was a rewrite from scratch), namely that SpriteManagers can only contain Drawable objects, but SpriteManagers are not Drawable themselves. Fixing this is the main goal of the current restructure. It means we can move a lot of the complex calculations out of the Sprite level and also allow for more easily grouping many sprites together (think groups inside groups).

It’s an ongoing effort, and while I am working on it I’ll likely have little interesting to talk about since it’s REALLY mundane and complex stuff (if you aren’t completely familiar with the internals of osu!, reading me rant about it will mean nothing). For that reason I’m not even sure if it’s worth streaming coding this week, since I question the value of it as a form of entertainment. Let me know your thoughts.

I leave you with the most broken view of osu! you have ever seen: