Thursday, December 11, 2014

AFA2014 aftermaths!


It's that time of the year again!! Foo~!

AFA2014 has been pretty amazing for me. It seems that every year it just gets better and better! Generally, it is much more spacious, though I felt that there is a lot of unused space. Like they could have made the indie section more spacious. 

Met a couple of my FFXIV FC mates cosplaying SCH and WHM!! I didn't get to see their booth in the end due to time constraints on my part though, but still! Very very cool to see FFXIV in AFA! Play with us yo!

But of course, the kicker for me is the "I Love Anisong" concert. This was the first time I went for all 3 days VIP, due to the crazy line up. I mean, even if I don't listen to some of their songs, it is awesome to see them up close!

Friday started off well for me with Hocchan singing 3 meters away from me. It's funny cause it has been a teenage hope to see her in person since Love Hina days. And there she was, more than 12 years later, in front of me! Also, I think some people do not get her performance because her style is rather unique in the sense that she likes to setup up plays in her performance...like musicals. She isn't really the rock/pop kind of singer. If anyone seen her lives they would've known though.

Kitamura Eri was a blast for some, I can guess. There's a lot of Kitamura Eri fans, specially since she's kind of Visual Kei. I personally don't follow her songs as much as her career as a seiyuu, in which she is portrayed quite differently back then. Her performance is pretty good though! She did sing a couple of song I wanted her to sing (well, she was obviously going to sing them but STILL)..

To many, I think, that AFA2014 did not start until the final performance by angela. angela was amazingly....high that night? Atsuko cut her hair short and was rocking it out on stage while Katsu was doing flips with his guitar. Kicking off with "僕じゃない" made me tilt on so many levels, and ending it with their famous "Shangri-la" just made me look forward to the next day.

Saturday's kicked off amazingly with LiSA. LiSA is just so good live. I probably said this before because I'll say it again. If you are a LiSA fan and did not watch her live before, you as missing out a hell lot. She is absolutely charming, converting people like me who has never heard of her into a fan in 1 hour a couple of years back when she first came for Angel Beats. Of course, she sang "Rising Hope". For the record, I didn't like the song because it was in SAO because I was never a SAO fan to begin with. It's a pretty good song overall in my opinion.

Then im@s took the stage. What really surprised me was that the P's managed to get together and send each other the songs' call cards. The result was something that really felt like Japanese concerts. It's not exactly something I can describe but...basically it wasn't just mindless waving of lightsticks and random cheering. Everything was coherent; the waving of lightsticks, the shouts and cheers...it is a special experience and I wasn't ready to feel it again so soon after my minorin concert in Japan. And yay! I finally get to listen to Mingosu live with one of my favorite Idolmaster songs: 眠り姫! Wow when the lights turned ghostly blue and the bells started ringing before the song, I had goosebumps ^_^

Dizzy with surprise, next up was yanaginagi. I kinda know of her because of supercell, and I know she has a pretty big fanbase. She doesn't disappoint, even though I don't know many of her songs. She has a rather soothing voice that is difficult to hate.

Then fripSide. After missing her 2 years ago, I am sure as hell not missing her this year. fripSide was fantastic this year, especially with Japanese fans cuing for the cheers. Nanjo-san was super cute when she was talking about durians! Satoshi-sensei was raging over losing money as Marina Bay Sands' casino lol! fripSide was an hour long high for me. EVERY song I know from her finally hear live! The best part was ending with "sister's noise"! Super drained after their performance..

Finally was Sunday. I took my JLPT3 in the afternoon and rushed down in the evening (god bless my Listening section T_T).

Sunday. Was. Epic. It's all FLOW's fault. I mean, why the hell would you want to put FLOW at the start of the performance?! It's like putting JAM Project. Nevertheless, FLOW came on stage first and literally sang every song you would know from them. Cha-la-Head-Cha-la, DAYS, COLORS, GO!...etc. If the concert ended there, I would have gladly gone home for I was satisfied and exhausted by the end of it.

But no, they were just the first of the five. Next up was GARNiDELiA and their upbeat songs. MARiA is a fantastic performance, showing that she can really dance and sing really well.  It's evident that she has been doing this for a long time. Because I'm a Kill La Kill fan, I was looking forward to the last song she sang: 'ambiguous'. In a sense, it feels like a great way to end her performance and start Eir Aoi, who was up next.

Now, the last time Eir Aoi performed last year, she almost killed my ears thanks to the extra speakers and thanks to the said extra speakers being right on top of me. This year, there are no extra speakers and holy crap she is loud and powerful. Easily the most powerful and clearest singer in the entire line up. Her 'high' notes gave me chills every time. I already felt that listening to her on digital was awesome, but she somehow takes it to another level on her live...maybe I should travel to her solos? Hmm....

Shortly after, ROOT5 made their way to the stage. Okay here I'm going to rant. Even if you are not a ROOT5 fan like me, if you are sitting on the VIP sit, you should not sit down and play games/surf facebook dammit! Just enjoy the music at the very least and show the singers some respect! They don't travel all the way to see a bunch of people sit down during their performance. At least show some support. They even graced us with 「千本桜」 (in which everyone stood up and cheered...tsk)!

Finally the last performance was quite fittingly by May'n. She has been here every damn year since 'I Love Anisong' stage was nothing but a platform at some random side of the convention hall. It's amazing how far AFA has gone. May'n closed the event with a startling performance as usual, singing songs that she sang since the first AFA! It was truly...nostalgic and magical at the same time. *sigh*

It was a super tiring yet energizing weekend. I already can't wait for the next AFA!!





Monday, November 24, 2014

日本から帰りました!

Well, I'm back from Japan. What can I say? I have done all I could over there and it has been a blast! This trip could not have been more perfect.

During my trip, I:
  • Met up with colleagues and friends training over there.
  • Obtained a bunch of goodies I order from a good friend staying there! (Hello Kitty Rurounin Kenshin!)
  • Went to Artnia!
  • Went to Capcom Bar
  • Went to FF14 Bar
  • Met up with cousin for a few drinks
  • Card hunting
  • Loitered Akiba for 4-5 days
  • 2nd hand game hunting
  • Ate takoyaki!
  • Completed my japanese homework
  • Finally got to Code 8 in Freedom Wars
  • Ate at Musashiya,  probably the best ramen I ever ate.
  • Went for Minorin's birthday concert!!!
  • Missed a flight
Probably the best holiday I ever had in my life. It is difficult to write a verbal vomit of rainbows over each an every thing that happened there because I'm a little busy now...maybe I'll do so in the future when I'm recounting?  *shrug*

I wonder if my future holidays can top this one? Only time will tell I guess. And here I am already preparing for the next trip! ^_^


そうして日本語です(笑)。出発のときは日本語なら、帰宅も日本語はずでしょう!

やあ。今度の旅行は楽しすぎ!最初は持ってきた現金をどう使うか心配したけど、結局遠慮しないで使いました。なぜなら、円がどんどん弱くなっていますから。来年にもっと弱くなるかな?シンガポール人として、それはいいことですね。

秋葉原には何回行っても飽きられなさそうです。実は、混雑の場所は好きじゃないですが、秋葉原に気に入る物がたくさんあったので、構わないで買い物しました。僕にとって、そんな歩くエネルギーがあった場所は確かに秋葉原だけです!

来年お楽しみ!

Wednesday, November 19, 2014

みのりんの誕生日と10周年コンサート

たっだ今、みのりんの誕生日と10周年コンサートが終わりました。

どんな備えても、みのりんをやっともう一回見たら、ほとんど泣いてしまいました。俺は泣きにくい人から、そこまで感じさせられることできれば、すごいことです。

ですから、このコンサートは確かに俺の大好きなコンサート中の一番最高になりました。好きな曲をいっぱい歌えて、みのりんをびっくりさせて、とても楽しみました!

そのより、第二のアンコールに一番好きな曲を歌いました!

ものすっごく嬉しくなりましたわ!

嬉しいな。。。

そのコンサートを経験したら、なんかやる気が盛ってもらいました。来年の仕事をできる気がします。

本当にみのりんを応援するのはいつの間にかもう10年に過ごしました。初めて応援するとき、多分人気アニメのハルヒからですね。それで長門有気の役でみのりんのファンになりました。それから、みのりんの情報をよくついたけど、学生から、お金持たないから、日本に旅行できませんでした。そして、軍に入ったの2年にも過ごしました。そして、高校生の3年くらい。

8年ぐらいのあと、一生懸命勉強したの結果おかけで、就業しました。それで、給料で去年がようやくみのりんを合いました。それはいつもみのりんを見たら、感動するの理由です。

今回の10周年の祝いなんかも、俺が10年間のファンであるの祝いです。

とても幸せです!

ですから、みのりんはそんなに有名になった!








Friday, November 14, 2014

2014に自分で日本旅行!


今からはじめての一人で日本旅行が始まりました。実は先週の間、心が一応ワクワクしてた★(・ิ ・ิ〃)。一人で日本に生きられるのは子供からの夢の一つのです。


空港機について、SQはさすがにすごいですね。サービスは確かに喜ばれたほどいいです。それに加え、音楽の選択肢はすごいね。fripsideとkalafinaのアルバムもはいっていました o(^▽^)o

一つ映画も見ましたよ。この映画は前から見たいの[猫侍]といます。なかなか面白いと思いますので、帰ったら必ず同僚たちに推薦することにします。


そんなに多いエンターテインメントと持ってきた宿題があれば、6時間にはいつの間にか過ぎって、日本に到着しました。

(ノ´∀`)ノ

ワクワクです! 

そして寒い! 寒いけど、寒すぎない。もっと涼しい感じです。
シンガポールに比べ 、今頃の気温の方が好きです! 外に散歩中で汗が出にくて暑くないのはいいなあ。

いま電車を乗っています。すぐに東京に着きます。。。




Sunday, November 2, 2014

2014年10月のこと

10月になりましたね!

もうすぐ日本旅行の時間です!今みのりんの音楽を聴いて楽しみになりました!

まず、ゲームの話!

確かに新ロロナのことですね。このゲームを終えたくないわけじゃないけど、どうやって最強の装備を作る企画時間が多い。でももう大丈夫です!最強の武器は先週末で作って、残りは防具だけです。完璧に作り次第、しばらく新ロロナをやめて、ほかのゲームをやるに決まっています。

しかし、やはりロロナを逃げられなかった。その理由は:

http://www.gamecity.ne.jp/atelier-quest/

先週から配信が始まりました。何か可愛くて楽しいです。本当に逃げられないw。課金したいけど、今の都合が少し悪いせいで、課金できない。日本旅行でWebMoneyカードを買うことにします。

ゲームといえば、25-26月のGameStartをボランティアとして出席しました。手伝ったブースは私の会社ではなくて、Sonyです。それで未発売のGGXrdをよく遊びに加えて、3v3競争も参加して、第3名になりました。第一になりたいけど、第三はなかなかいいと思いますね。GameStartは本当に楽しかった。色んな友達や先生や開発者や有名な対戦ゲームプレイヤーを会いました。それに、いろんな未発売ゲームをやってみました。新ロロナを止めると、Freedom Warsをやろうと思います!シンガポールは入っていますから!

ま。。。そうすると、今まだ遊んでいるゲームは一つを止めなければならない、時間が持ってないし。多分ラブライブを止めようと思っています、時間とエネルギーを多くかかるし。

先週はJLPT3の準備授業が始まりました。授業はやっぱりたくさん宿題を受けた。今ちょっと暇だから、宿題をしているところです。今まで、問題はあまり難しくないけど、やはりボキャブラリーがなんか不足ような気がする。JLPT3の試験は12月7日で、準備できるかどうか知らないけど、一生懸命頑張ります!








Thursday, October 16, 2014

GameStart Asia 2014!

So 1 week from now, I will most probably be helping out at GameStart's PlayStation Arena to host the 3v3 Guilty Gear Xrd team tournament and also introduce the game to others. The Guilty Gear Fighting game series had been a rather big part of my life at one point long ago so naturally I am excited to catch a glimpse of its newest edition.  It's gonna be big, it's gonna be exciting, it's gonna be a lot of catching up with players I haven't seen in at least half a friggin' decade.



I'm being an old man here, but it's incredible to see how fighting games has grown, with companies actively reaching out to our small communities and supporting in various events and tournaments. All this was really but a dream back then.

Anyway, back to GameStart. It has quite a number of interesting events to watch out for as far as fighting games are concerned. On top of the Guilty Gear Xrd 3on3, we also have Gundam Extreme VS. Full Boost tournament (thanks to Bandai Namco) and the Capcom Pro Tour for Street Fighter will also be there.

Outside of that, there's a few company booths I would most definitely drop by (like INZEN dundundun!! ^o^) as well as a few games I would be interested in looking at, and of course cosplays.

Seems like a swell weekend ahead ^^



Monday, October 13, 2014

AFA2014 Anisong lineup thoughts

December is finally around the corner and that means Anime Festival Asia is around the corner, which also means Anisong 2014. By a couple of weeks ago, they have announced the performers coming over so here are some late random thoughts two weeks after.

So here's the lineup...
Friday - angela, Kitamura Eri, Horie Yui, DJ Kazu
Saturday - LiSA, fripside, The IDOLM@STER, yanaginagi
Sunday - Eir Aoi, GARNiDELiA, May'n, ROOT FIVE


Firstly I'm going to skip DJ Kazu and Root FIVE. I'm not exactly familiar with them so I won't comment. I know Root Five sang songs from Fairy Tail and I think the new Saint Seiya? I watched neither though...

Despite that, for me, this is quite possibly the best Anisong lineup yet. Usually when I go to Anisong, I would only got for 1 day or 2 days at most, but this time I will go for all 3 days. Not much of choice there.

Looking at Friday, we have angela. Well, I don't have to go into details for them. They have visited Singapore quite a few times already and their performances have been solid. What surprised me the most though, and also what I really want to see on Friday, is Kitamura Eri (I'll usually just call her BakaEri because of the roles she play as a seiyuu) and Horie Yui (hocchan). I think BakaEri and hocchan has been touring together a bit recently and it was BakaEri's dream to...well let's just say hocchan is her idol. 

But man, hocchan in Singapore? It's almost unthinkable. I can't say that I'm a fan of her but I occasionally like her songs, and like what she's doing for like the past decade.  And my god, she's already 38 but she looks exactly the same as her pictures at the back of my Love Hina mangas.

Saturday is very solid too. LiSA have been visiting Singapore and their popularity boomed with Fate/Zero and Sword Art Online a couple of years back. fripside is mostly my goal for that day though, mainly because I wasn't in Singapore when they first visited. I don't know much about yanaginagi, but the few songs I know that she sang were incredible and I look forward to her performance. 

Probably the biggest thing on Saturday is THE IDOLM@STER. Some of the cast is coming over and this incited...er...quite a few things for the past 2 weeks. I'll just say that there are some good stuff and also some bad stuff going on among its fans just glancing over my Facebook. Regardless, there is a lot of reaction and I can't wait to see them perform too. I only played the PS3 version of the game that my friend 'dumped' at me (lol). Probably gonna look out of Imai Asami (Mingosu!). She has a sensational voice that occasionally reminds me of minorin's. Like there are parts where they really sound alike and it gets hard to tell the difference. Hopefully I don't offend anyone with that comment though, it's meant to be a good thing and it's only my opinion.

Anyway, back to topic.

Sunday can really go either way. It can be slightly disappointing or REALLY CRAZY. Eir Aoi is a fantastic powerful singer that almost destroyed the sound system and subsequently my ears last year. Probably at this point, she's my favorite singer of all those who are coming over. May'n is...well, May'n. She has been here since the very first AFA and has a huge array of songs. She surprised me last year singing the Omnimusha Souls main theme which I happen to know because...it was our competitor's game lol. GARNiDELiA is a relatively new group. I only know one song from them and that is the Kill la Kill second opening 'ambiguous' so that would be a great combination with Eir Aoi (since she sang a couple of Kill la Kill songs as well). 

But really, I wanted to see FLOW perform again. The last time I saw them perform, they were fantastic live and memorable due to their ability to incite the crowd with their charisma, personalities and character. I think the whole concert will explode if they sing CHA-LA-HEAD-CHA-LA this year. Wow, I can't wait.

In closing, this line up is really amazing and I can't wait for it this December ^^


Monday, September 22, 2014

9月の日本語でアップデート

たった今の会議で私の開発仕事が中止されました。明日から維持の仕事に戻ります。これ以外何も言えないですねw

そでした。 れはどんな気持ちかな。別に悲しくなりません。むしろ、この間はいい経験だと思っています。別の人がそう思わないけど、私は結果より経験が重要なんです。それで、開発仕事はやりかけて中止されたのに、かまいませんでした。

そんなこんあで。

二週間前にJLPT3を申込みましたΣ(・ิ¬・ิ)

合格できるかどうか知りませんですが、合格できるように、一生懸命勉強するようにしています (≧∇≦)b

更に最近暇ならFF14以外RPG Makerを試しています。体験版なので、30日しか使えません。そうですけど、RPG Makerは使いやすいから、ゲームを作りるのが楽しいです★(・ิ ・ิ〃)

できたら、30日の終まえに、私の作ったなんか馬鹿なゲームを見せてあげます!

Saturday, September 6, 2014

[Programming] #6: Double pointer trick with Linked Lists.

If you are using C/C++, there is this really cool trick you can use when dealing with linked lists thanks to the existence of pointers. It saves you a bit of memory, computation power and also coding annoying special cases, so why not use it!

Honestly though, this isn't much of a 'trick'. It's more of understanding pointers themselves. Once you understand them, implementing this 'trick' becomes really trivial.

Say we have a simple linked list like so:
struct Node {
  Node(int tData) : data(tData), nextNode(NULL) {}
  int data; // some kind of data your node holds; I will just use integer in this case
  Node * nextNode; // pointer to the next node
};

// ... somewhere in your program... 
Node * linkedListHead = new Node(0);
Node * iterator = linkedListHead;
for ( int i = 1; i < 5; ++i ) {
  iterator->nextNode = new Node(i);
  iterator = iterator->nextNode;
}
This simply creates 5 nodes in a linked list that looks like this (I'm using its data to represent itself):

0 -> 1 -> 2 -> 3 -> 4 -> NULL

Simple enough.

So let's say we want to perform a really standard list operation: Removing an items from the list...say, the node containing 3. Usually there are 2 kinds of functions you can implement for removal: Removal by comparing data, and removal by the node itself. I will just use the former as an example and skim on the latter later.

So let's go: Removal by comparing data. The brute force algorithm is simple:
1) Find node 3
2) Get node 2
3) link node 2 to node 4 via node 3
4) delete node containing 3

However implementation is not so easy. Here's how it can get really messed up:
1) Find 3; Okay that's easy, loop until I get the node containing 3!
2) Find 2; Oh that's easy too I will again until I find 2...wait...

So that's the first alarm that sounded in your head. Why on earth should a search and destroy algorithm take O(N^2)? No, that shouldn't be the case BUT we can remedy this cleanly like so:
1) For every node, check next node.
2) If next node contains 3, link current node to node 3's next node (which is node containing 4).
3) Delete node containing 3.

That looks much better...except that it's not going to work if we are trying to remove the 1st node in the linked list. All of a sudden, we have an special case to code for. There are several ways to do this; one is to just code a special case, the other is to introduce a 'dummy' node at the start of the linked list and iterate from there (that might introduce special cases for other functions)...or we do the 'trick'!

OKAY, now we finally get to the 'trick'. The trick is to have your iterator be double pointers instead of single pointer. This means that we are iterating Node* instead of Node. Here's a snippet of the double pointer in action:

Node ** iterator = &linkedListHead;
while ( (*iterator) != NULL ) {
  if ( (*iterator)->data == 3 ) {
   Node * nodeAfter = (*iterator)->nextNode;
   delete (*iterator);
   (*iterator) = nodeAfter;
   break;  
  }
  iterator = &iterator->nextNode;
}
With this, you can see that there is no need for any special cases and also why the hell STD list's remove function takes in a wonky item called 'iterator' (which essentially holds a double pointer for just this reason!). It's so clean and elegant that it gives me chills ^_^

Well explaining this is going to delve into a crazy rabbit hole about pointers and stuff, so I'm just going to do what teachers do and say 'work it out on paper!'. This is actually good practice to strengthen your understanding of pointers. My advice is to draw every component in detail while you are figuring this out.

And if next time someone asks you what double pointers are for other than creating double array, this is a really solid and practical example to give.

Wednesday, August 27, 2014

どんなプロジェクトしようか

おや!

今日も残業してしまいましたねw。

十二時に寝られないと何もしたくないの私は今ブログしようと決まりました!!

ではでは!

最近は、一年前に始めたRPGプロジェクトを止めようと思っています。この一年の間に進歩が少ないし、規模も大きすぎるし、開発時間もないですから。そんな理由さえあれば、続ける意味がないと思います。

そのプロジェクトが止んだけど、新しいプロジェクトを始めたいです。どんなプロジェクトかよく決定しませんですが、またRPGならRPG Makerで作りたい。今度こそ、エンジン開発の代わりに物語に強調します。

RPG Makerはこちら

そう言っても、RPG Makerの使い方は大体分かるけど、詳細をまだ研究しなければいけません。研究のためにかかる時間がありますか分かりません。今では仕事のおけげで無理ですww。

時間がないなら、ほかのプロジェクトを始められます。それは私の経験があるcocos2d-xで小規模のプロジェクトにします。小規模のでもちろんRPGじゃない。なんか弾幕ジャンルのゲームにするつもりです。まだ企画しませんが、暇ならします。

両方を作ればいいなとおもっていますわ。

でもマジで時間がない!!

なんか最近のブログに「時間がない!」というよく打ってしまいましたねww。

は。。。

もう一時間です。そろそろ寝よう~

Monday, August 11, 2014

やっと開発仕事!

久しぶりにブログしましたね!

実は最近の仕事が凄く忙しくなりましたから、ブログ時間がなかった。理由は維持仕事の変わりにようやく開発仕事になります!忙しいけど、大変けど、こんな仕事以外したくないわ。毎日残業したのに、とても満足でした。

とりあえず、昼でMalaysiaから帰りました!いっぱい格闘ゲームをMalaysiaのFGCの委員とよく遊んで楽しいです!さらに、よくカード翻訳

サイトのブルは見つけました!

   

それは「littleAkiba」というです!時々カードの意味を確認したいなら、「littleAkiba.com」というサイトで調べるのに便利です!結局俺は少数のカードを買いました。この短い旅行はなかなかいいと思いましたね。

次のは日本!!!

11月の日本旅行の詳細は1つずつ確認されています。まだ全部は確認されていないけど、今週末で確認するつもりです。

今もう8月ので、早く予約すれば予約するほどいいです。

そんなこんなで。。。

なんだろう。ブログをし続けたいけど、何も思い出せない。

そうだ、ゲームについて!最近Com2usのSummoner Warsは数人の友人と一緒にプレーしました。ゲームの内容は面白いと思います。ですから、このゲームはソーシャルのジャンルですけど、無料ユーザの強くなる方法が多い。例えば、無料ガチャから出たモンスターをよく育てれば、課金ガチャのモンスターを倒す方法があります。それで、いろんな戦略は友達か掲示板と相談できます。

ゲームがいすぎ!!!

今まで「真ロロナ」まだ遊び終えてない;;

Friday, July 25, 2014

[Programming] #5 Passing by value and reference, with a pinch of const

This is going to just be a alternate perspective of the good old "pass by values vs pass by reference" programming topic.

The motivation of writing this stems from me currently in a working environment with programmers coming from so many different backgrounds and when they land into a project in C++, they tend to get lost about this only because they are not used to it (these are good programmers who actually know their shit).

The other motivation is so that when I encounter programmers who do not completely understand this, I can just copy paste this to them and hopefully they understand.

Needless to say, I would like to thank Java, javascript, PHP and all those other languages for blurring the lines between passing by reference and passing by value. THANKS =/

Anyway. This is written with cocos2d-x classes.

There are 2 ways of how you would pass an object in C++ (I will used a more extreme example like CCArray):

void foo( CCArray array ) //pass by value

and
void boo( CCArray& rArray ) // pass by reference


In the first line, the object is passed by value. This means that every time you call the function foo(), it will literally take your original CCArray, create a copy of CCArray and copy *each and every* of the original's content into the copy before the function starts. Some humans usually call this 'piracy', and while the idea of piracy is 'nice' and all, it takes up more space and it takes time to copy.

In the worse case common scenario, you might write code like this:

class SomeClass {
public:
  foo(CCArray array);
private:
  m_array;
}

void SomeClass::foo( CCArray array ) {
  m_array = array; // wut
}

// somewhere else
SomeClass myClass;
CCArray array(); // pretend that there is 1000 objects in pArray
myClass.foo(pArray);

In this case, when you call 'myClass.foo(pArray)', it will first copy pArray into a separate CCArray before the start of the function.

Within the function, thanks to the awesome assignment operator in m_array = array, it will attempt to copy the copied CCArray 'array' into a new copy 'm_array'! (Double piracy!)

This is obviously not very good. The second copying is actually fine because we want our own copy of the CCArray, but the first copying process feels redundant. Why should we copy twice for one copy?

The alternative is to pass by reference:

void SomeClass::foo( CCArray& rArray ) {
  m_array = rArray ;
}

SomeClass myClass;
CCArray pArray();
myClass.foo(pArray); // pretend that there is 1000 objects in pArray

This passes the reference; of pArray into the function, that is, the original pArray into the function. Unfortunately, because it is the original copy, it means that the function foo() can do maliciously evil despicable things like:

void SomeClass::foo( CCArray& rArray ) {
  m_array = array;

  //evil malicious things by adding 1000 more rubbish!
  for ( int i = 0 ; i < 1000; ++i ) {
    m_array->addObject(CCObject::create())
  }
}

SomeClass myClass;
CCArray array();    // pretend that there is 1000 objects in pArray

// now there are 2000 objects instead of 1000 objects in pArray and you are officially heartbroken because you might have wasted 10 hours debugging why.
myClass.foo(pArray);

This actually happens in Java often because Java people are trust each other.
However, C++ programmers do not trust each other so we have a wonderful keyword called const.

With this const keyword, we promise to the users that we will never modify their object:

void SomeClass::foo( const CCArray& array ) {
  m_array = array;

  //COMPILE ERROR!
  for ( int i = 0 ; i < 1000; ++i ) {
    m_array->addObject(CCObject::create());
  }
}

This is why you see argument declarations like "const std::string& str" being used.

But wait, what about pointers?

Pointers work exactly like a value. In other words, there is really no difference between passing by value and passing by pointer IF you treat pointers like an object on it's own (i.e, do not think about its relation to the object so much).

Pointers are simply 4 byte objects that store addresses.

Consider:
void SomeClass::foo( const CCArray *pArray ) {
  // Assume m_array is now "const CCArray * m_array"
  m_array = pArray ;
}
SomeClass myClass;
CCArray array();
myClass.foo(&array);

This simply means that the address of 'array' is copied into 'pArray' and then copied over to 'm_array'. All 3 variables are different variables (they are essentially different) but they hold the same value. Much like if you set i = j = k = 0, all i, j and k are different variables but they all hold 0. It's pretty much the same concept.

Again: Pointers store addresses.

This is not that much different:
void SomeClass::foo( const CCArray *pArray ) {
  // Assume m_array is now "const CCArray * m_array"
  m_array = pArray ;
}
SomeClass myClass;
CCArray * array = CCArray::create(); // now we try to pass by pointer
myClass.foo(array);

Okay read this slowly:

This means that the value held by 'array' is copied into 'pArray' and then copied into 'm_array'. The difference is that the former assigns the address of 'array' into 'pArray', while the latter copies the value held by 'array' into 'pArray'. Both methods have more or less the same results, although what happens is sublimely different.

While there is no deep copying involved in both cases, we must remember that this only means that 'm_array' cannot change the value of the object it is pointing to, but 'array' can. That means that if the object that 'array' is pointing to is modified, the object that 'm_array' is pointing to will be modified too.

After all, even though the pointers are different, they store the same addresses and thus they are pointing to the same object.

Thursday, July 10, 2014

軍に入る生活

はああ。。。(´・_・`)

僕は今軍に入っています。前回のポスト言う通り、ここで退屈になりました。

今まで三日もうすぎました。その間に4つことをするしかないです。この4つは寝る、ゲームを遊ぶ、食う、浴びるということです。

暇だああああ!!!

始めりの僕はたまらないほどつまんないです。幼くFacebookの友達にヤダアアと呼んじゃったw。しかし、この三日の間に、この退屈な生活になれました。。。かな。。。

暇ので、もっと打つかなw

軍のキャンプは何を呼びますか。軍営ですか。それでは軍営の環境を話しましょう。今草を切る音以外は穏やかなんです。周りは木しかない、森の中ですから。上は二つの扇風機が囁いで、ベットに休むか寝る僕とほかの四人たちに吹います。

それはなんだろ。養護ホーム??

でも皆は怪我者に過ぎない。それに僕が指定された義務所の員が多すぎるので、僕の必要はない。

確かに今度のはあまり不味くない。前回よりいいと思います。雨はよく振ったし、温度は涼しいし、湿度は低いです。退屈けど、よく休みました。

それにしても、新ロロナとラブライブを遊べます!

そう考えば、今週の生活はあまり不味くないね。

ですが、退屈は苦しいコトです。

次回の軍に入るのは二週間です(´・ω・`)

どうやって生きるかな。。。

Saturday, July 5, 2014

2014/07/05 軍に入りたくないことです

今回も日本語でしましょう!

最近仕事は忙しくなりましたね。残業するほど忙しいけど、楽しいです。一年の待つ後でやっと本当の開発仕事をいただいました!

これからもっと面白い仕事を楽しみます!

そうですね。今回の課題はやはり仕事のことですか?w

仕事のことは1つ悪い習慣がある。それは早起きられないのことです。実は、僕の3月前の出席登録を調べまして、遅刻度を引きました。一月の20営業日に平均して14日に遅刻してしまいましたね。見たとき「それはアカンや!」とおもいましたw。ですから、今月から、僕は遅刻しないようにしています!

そういえば、習慣と言えば、先週から腹が悪いので、コーヒをあまり飲まないようにしています。コーヒは好きけど、飲んだら、腹に気持ち悪い感じを与えますよ。それで、コーヒの代わりにお茶を飲みます、味が違うけど。

今まで多分一週間にコーヒを飲まなかったね。時々体は疲れて飲みたいな。。


そんなこんなで!

来週は僕が軍に入らせます! \(^O^)/

それは。。。嬉しいことではないね OTL

会社で働くのは、軍に入るより楽しいと思います。

体は怪我があるので、軍の活動できないので、ぶらぶらする以上できない。それと考えば、何もしないなら、どうして軍に入らせる必要がありますか?僕も分かりません。

それで、軍の生活はとても詰まらないです。

活動できないなら、暇になるよね。ゲームを遊べるかな?来週はラブライブが新しいイベントを広きまして参加しなきゃw


今度はのぞみですね。のぞみはあまり好きじゃないけど、カードがほしいですねw

はあ。。。。

軍に入るのは一週間だけですが、面倒くさいと感じますね。早く終わったらいいです。

休みとして過ごせるかな?そうね。そうしようか?


Saturday, June 28, 2014

SEAM2014 Aftermath




I like how this post is 1 week late, but it has been a really busy and tiring week. Oh well, here we go!

Through some miracle, I was able to make it for South East Asia Major 2014 (SEAM2014). Wow, what a weekend! What an event! Where do I even begin?

Shoutouts to all the organizers, marshals, and people who made streaming possible for all the tournaments that were taking place.  Kuni, Josh, Yongde, Farp, Don and all the others from the other tournaments who made this event possible.

Shoutouts to all the players who made it all the way down to compete. We had players from USA, Australia, Brunei, Vietnam, Myanmar, The Philippines, Malaysia, Indonesia, Japan, and more.

Shoutouts to all the people who made commentating BBCP a thrill. Anton for joining me with his calm demeanor of a voice, Dinman's crazy Tager that made it to top 8 WINNERS BRACKET, Ourozama for being the true Hazama of his pools, Rebel2 players of course, and Kirie, Vic, Uncle Joel and Kenzi for the afterparty stream appearances.


The list just goes on. Hiro for accompanying our Arcsys guest Souma-san, Rchusan for winning Terumi dakimakura (lol!), Dix for winning the Tsubaki side tournament and the Tsubaki dakimakura as well as having a great time of CVS2 with me. Speaking of CVS2, I cannot thank Lenn of Versus City enough for setting up a chill booth with really old games like KOF95, CVS2, SFT and 3rd Strike. Unforgettable.

And of course, journalists and cameramen (Edz, we really need to UMVC3 again) who take their time to come down and cover the event. Props to all of them.

Now that I’m done with the shoutouts, I can finally talk about my thoughts, although the shoutouts should have mostly expressed my thoughts. This was a hell of an event, possibly the best SEAM to date. It never fails to amaze me how far apart we all are, yet bonded together by fighting games.


Just a few things to rant about. I wished I had joined UMVC3 on Friday but I couldn’t make it. I was curious to see how would my Taskmaster/Spencer/Tatsu team fare now that I know better combos and setups compared to last year’s. I ended up joining BBCP mostly just to represent my character Platinum, though I don’t really had any expectations to win from the beginning because I haven’t been keeping up with the game nor practising for the past maybe 3 months? Winning 3 before being eliminated far surpassed my expectation and I’m still kind of laughing about it.

Commentating was fun. Rewatching the stream, I think I did an okay job. It could definitely be better. My voice sounds hoarse and mellow like a gorilla, which didn’t really please me lol. Man, I really sounded like a Chinese who can’t even enunciate words properly when I’m talking fast. That aside, I’m not really sure how I should improve, considering that I really don’t want to turn my commentary into e-sports mode. At the very least, I should stop sounding like a gorilla with a mouthful of marshmallows I guess.

What else can I say? It was really fun meeting up with everyone after disappearing due to work and other commitments for a couple of months, and seeing the community grow to this point.  Kind of makes me a little sad that I’m not born slightly later, training for tournaments when I had all the time in a world pre-National Service. We didn’t had any of that back then. I still find it crazy how Capcom single-handedly revived Singapore’s arcade scene from the brink of death.

Great games. Game on.

(Man I really enjoyed the CVS2 section a hell lot ^_^)

Sunday, June 15, 2014

[Review] Love Live: School Idol Festival.

It's about damn time I did a game review ^_^



Here we go: "Love Live! School Idol Festival"

This iOS/Android social game has been out in Japan for quite some time now (I think more than a year ago?) and I recently picked it up. The English version was released around a month before this post. I won't go too much into the mechanics of the game as you can try it out for free and read the unofficial English wiki here.


But I'll at least skim through what it's about. The game is really simple, even by social game standards. Basically you use stamina gained over time to play songs (essentially rhythm games) which can give you Loveca Stones (it's the game's cash currency used for paid gatcha), coins (the game's free currency used for enhancing cards), friendship points (used to get more free version of gatcha), and random cards depending on how well you do. If you have no idea what these bolden words mean, then you haven't been exposed enough to social game mechanics. Hopefully I'll write an article about it and link it here in the future.

SO MANY CARDS!!!
The simple layman objective of the game is to collect as many cards as possible. Cards have rarity. The lower rarity ones can be obtained through the free gatcha which costs friendship points which is obtained simply by playing. The higher rarity ones can be obtained through paid gatcha which can be bought using real life cash OR completing one-shot objectives in the game (the game is rather generous at this too compared to other social games). Combining two of the same card will yield a more powerful (and naturally more unique) card.

And of course, better cards in this game will allow you to yield better score in your song attempts. Higher rarity cards will have better stats and have abilities that affect your play. It's really a very simple social game model.

Okay enough about mechanics. Let's talk about why the hell would you want to play this game. If you are a Love Live! fan and not playing this, you are either missing out A LOT or you are just trying to prevent yourself from bankruptcy. If you are NOT a Love Live! fan, give it a shot. It's a simple, polished rhythm game in my opinion. Remember to watch the anime if you actually like the characters! (mwahaha)


Simple Rhythm Game

What makes this game great to me? Firstly, its simple social game model allow players to quickly understand what they need to do. There aren't any overly complicated mechanics or number crunching. Getting better cards and performing better at your songs yield naturally yield better results. Secondly, its polish. Clean art, clear UI, voice acting (I cannot emphasize this enough), this game markets the Love Live characters and franchise really well especially with in-game events and login bonuses that reflect real life events like a character's birthday or airing of an episode. Thirdly, its generosity with Loveca Stones, the game's cash item. Normally in social games, the developers rarely want to give easy access of these cash items to players because...well...it is essentially giving the players money.

Highlighting the third point, I think some of us would start thinking how the heck does being generous to cash items lead of sales. There could be many reasons. It could be that the sales are already SO GOOD that the company can afford giving cash items away, sacrificing profit for happier players (which in turn brings more happy people, which in turn increases chances of them spending money, etc). However, this is a chicken and egg problem. If we assume that this hypothesis is true, there must still be something that allows them to start this cycle.

EVENTS!!!


Okay here is where I talk about what I really wanted to talk about. Events. In Love Live, so far there are only 2 kinds of events that happen periodically. One of them is a grind-fest, the other is PvP. Both have the same objectives: getting points.

The basis of participating in an event is very simple and is already used in some social games. Participating allows you to have a shot at an event-exclusive item, or in this case, a Super Rare card (the only thing higher is an Ultra Rare card). However, this game is generous. If you play the event regularly (regularly meaning if you have enough stamina, you play ANY song and do not lose), you will get the card no problem.

So when to people pay? In comes the infamous simple but powerful ranking system. Every player who participates has a rank depending on how much points he accumulated. Every 'region' of ranking will receive different rewards when the event ends (events typically lasts 10 days). In the japanese version I'm playing, the highest region of ranking reward is 2 free attempts at the paid gatcha and 2 of the event-exclusive Super Rare card. Why would you want another of the card? Remember that combining 2 of the same card will yield another card! So in reality, the event has 2 event-exclusive cards, one of which can only be obtained by being at a certain ranking. Why would you want a THIRD card? Mostly for collection. The 2 exclusive cards are after all, 2 different art. If I really liked that character, I would've gone for it.


Eye catching UI and presentation

It's almost perfect execution in my eyes. After seeing how events are designed, it's obvious that the people behind the events knows how to target their audience really well. It is generally accepted that if 10% of your social game's players actually spend money monthly, the game will be sustainable and rather profitable. I can just imagine that 90% of people playing this game are Love Live! fans, with maybe a quarter of that being HARDCORE fans, and...we know how otaku fans are. When the cash is no question and the thing they want appears right in front of them, it automatically goes to "buy first think later" mode. I'm not really a huge fan of the series but I can imagine that if the event has a character card I really love and there's a thousand me's competing for that card...wow...that game is gonna profit a hell lot.

And it goes back to the franchise as well! Love Live! is one of those idol animes where they would hold concerts in Japan and sell lots of albums. Players who play this game will end up knowing the songs, encouraging them to attend concerts and buy the franchise's goods and albums, and of course spreading the word. It goes a full circle. That's the beauty I see in this game.

If I had an ideal of how a social game promoting an existing IP should be done, this game is a great example I would bring up. Simple, polished, very engaged to the franchise, and effective execution of content release and balancing.

Monday, June 9, 2014

[Programming] #4 Finding the smallest bit in a value

More bit magic!

This time we are going to find the smallest bit in a value.

I encountered this problem while implementing uniform grid spatial partition back in school. Basically after some calculations, I would get a resultant value that contains all collisions that need to be resolved encoded in each bit of the value (each bit was representing a part of the world). So I needed a fast way to obtain each and every bit, calculate what I need to calculate, and proceed to the next bit. The problem is getting the bits one by one.

This requires a function that helps me extract the last bit of a value.
If I pass in the number '5' which is 0101, I would want to get 0001.
If I pass in the number '6' which is 0110, I would want to get 0010.

It's pretty nifty because the naive way involves an ugly loop:

int getLastBitNaive( int value ) {
    while ( (value & 1) == 0 ) {
        value = value >> 1;
    }
    return value;
} 
This means for every n bit turned on I would have to loop n times. There are ways to optimize this to make it loop only once of course (by 'remembering' the last position it looped to), but there is a way to do everything without a loop.

Tadah:
int getLastBit( int value ) {
    return value &= ~(value - 1);
}
Basically it's doing an AND operation on it's Two's Complement.

Sadly, returning the positional value (like 0010 = 2, 0100 = 3, etc) still requires either a log2 function or a lookup table. Languages with access to assembly has access to that but that's for another post.

Saturday, June 7, 2014

2014/6/7 先週の日記

最週末ははじめてヴィク姉様の「境界の彼方」のコスプレの撮影を手伝ってあげました!早起きるのはちょっと面倒だけど、楽しかったです。それに同じ興味の新しい友達を作りました!

朝でする予定がありますが、撮影ところに遅く着いてしましましたので、昼の撮影になっちゃった。あとで、色んな大変なことが起こられました。警備員に追われたとか、日光は強すぎるとか、雨が降りました。ですが、皆はあきらめないで続きました。特にヴィク姉様はとても元気ですね、2時間だけの睡眠があったのに!

午後3時でようやく終わりました。疲れたけど、楽しいと思っていました。数日後に撮影者アレークスさんはフォトショップで加工した写真たちをアップロードしました!

じゃん!



一目に見たとき、アレークスはすっごい上手と思ったんだ!ですからあの写真を撮ったとき、日光は無情に耐えないほど強く射しました。この写真は雨が止まったばかり見たいでしょ!それで、写真を見たら、私は止まらないで笑っちゃった。ですから、ヴィク様とアルヴィンさんは複数の写真を撮ったとき、二人の懸命に栗山未来と神原秋人の性格と顔をするのは面白かったです!いろいろチャラじゃない顔と性格を見ちゃった!ww

そんなこんなで!




ええ?同じ会社で働いていますのに(分業が違うけど)、どうして開発を聞いたことないの?遊びたい!

アトリエシリーズのアーランドシリーズは今の会社で仕事したい一つ理由です。ていうか、今まだPSVitaで「真ロロナのアトリエ」をプレーしています!すぐに完了したいけど、時間が持ってないねw

仕事の言えば、最近もっと忙しくなりそうですね。けど、それはいいことだと思います。慣れなきゃ。






Sunday, June 1, 2014

Long ass rant mid 2014

In just a couple of days, I would have been working the work life for 1 year. Thinking back, a lot of things happened in the past year. Well, of course a lot of things happened in a year but it's more so compared to other individual years. Also, some people have been asking very adult questions and others have been making some weird (not bad) statements about me. I suspect this is because I'm more exposed to the outside world than ever before. Okay fine I was a NEET, now I'm not (crap I need to change blog name?!). This is gonna be a long ass rant because I'm just gonna speak my mind. Sorry for the profanities.

First things first, I felt my interests took a shift. With my first couple of paychecks, I finally got rid of the stupid stand-up piano which I have to wait for a internal solar eclipse to play, and got a digital piano. The solar eclipse is basically 7-9pm, if I have the mood or not tired from work, if it is not noisy at home, and if I don't feel that playing the same crap over and over will annoy the shit out of my neighbors (yes I'm damn thoughtful that way and it sometimes bother me). The digital piano is lovely. I love it. I can finally play my piano ANYTIME I want, so that allowed that interest to resurface. Not to mention that I have recently joined my company's band which jams most Friday nights. The sessions were usually awesome and I love the variety of our songs; English, Japanese, Chinese and even Filipino.

On the other hand, fighting games took a hit. I have felt like moving on from it for the longest damn time. It's already a decade since I first stepped into Bugis Virtualand to play CVS2. Almost all CVS2 community has moved away from fighting games at this point. Thinking about those days, fighting games truly felt fun. You know it's fun when you lose and still feel happy. Too bad those days are gone. Sometimes it really feels that I am playing just to rediscover those feels, but if I thought about it that way, it's impossible because it's those guys that provided the fun. The entire CVS2 bunch was a really happy bunch. The only other community I really felt was close to that is the Melty Blood community.

The other communities just weren't. There are still great people in there, but there's bad-mouthing, politics, really bad salt, shit-stirring, 'black faces' during play which I couldn't stand. It's upsetting that some newer players I feel do not respect other players enough. I felt that that is the foundation of all the shit that is happening in the FGC. I don't mean e-sport faggotry respect but the FGC respect. I actually couldn't stand it when I beat someone consistently and they start saying things (in a serious tone) along the line of me having more experience in the game...AND when they DO beat me like a couple of times they started laughing and start saying that I lost to someone who don't main the game. The worst kinds are those which I would win against, give me the cold shoulder/black face mid-game. I would usually give some chance (by all fighting game rights I should never give mercy but I don't want to lose a friendship either), lose and said player will give me smug look. There are a lot more situations like this and they seem to occur more and more frequently whenever I drop by. There are ways to induce SALT but those are not it man. For example, you have to have a legit win/lose ratio before you can start saying shit like "I DON'T EVEN MAIN THE GAME!" in their faces.

And that's just in game. Ugly things are also happening outside the game. It makes completely no sense that I feel more fun being AT WORK than playing fighting games. Maybe I'm too nice to stay in the community. I just don't want to say or do anything because it is not my community to run since I don't have much time to commit anymore and the community that I truly wanted to run for is gone. Whatever man. I still play fighting games for leisure but that's about it.

Now we talk about more random stuff.

A cousin has asked me on my birthday if I am going to work until I die. Work meaning my line of industry of course. I suspect that he won't be the last person to ask but here's my full complete long-winded as hell answer.

Firstly I cannot predict what the future Gerald thinks nor can I predict that far into the future as to whether something as volatile the Games Industry will evolve into something I hate. Taking that into consideration, I can only speak for the present me. The simple answer is yes and the simple reason is because I fundamentally love programming and games. At this point, I CANNOT see myself NOT doing games programming at any point in my life. I program at work, I program at home, and if I can frickin' program on my mobile phone I will do it. I love working on games because problems are always interesting.

Then the next question that was asked was if I am willing to leave my loved ones for the sake of my interests. I really think this question is unfair because I personally feel that it depends on the situation. Also, I feel that my loved ones (if they love me) should always respect my decisions and vice versa. If you bo jio me because you jio too many people, or forgot about me, or whatever, I can totally respect that. And once again it boils down to the scenario. If we were to take the extreme case, that I have to leave my loved ones and will NEVER EVER see them again because programming is outlawed here so I have to leave my loved ones to pursue my love of programming, the present me would by a narrow margin. That being said, I have to say that it is a clever disguise of the stupid question they ask you as a child which is the "If your mother and father are drowning in a pool, who would you save?" That question used to implode my brains FOR NO GOOD REASON.

Next thing is statements. Some people say that I don't care, generally. I'm actually ridiculously sentimental; I'm just really bad at showing emotions. If my loved ones were to die the next day I would be incredibly heartbroken but I don't think I will cry over it because some part of my brain accepts that it is part of life. People need to learn to let it go (hmm maybe that's why that song is so popular?). People need to know that things don't always work out their way. Seriously, if I didn't care I would truly be a NEET at this point. Ironically, I feel that other people do not care enough about others. Every little thing people do I care like friends arranging their time to meet with me, allowing me to rant at them, or my mother taking care of me...I appreciate all of that it. I just look like I don't. From an anime perspective, the reason why I watch all those really happy moe animes is so that when I run into a 'feels' anime like Clannad, Angel Beats, Air, Eureka 7, I need that library of moe animes to drown myself in so that I don't feel moody and sad for the rest of the week. Angel Beats, which I thought was not that good and a bit rushed, had me dead for a weekend. Fuck, let's move away from this topic.

Another rather popular statement being said about me is about how lucky I am regarding my path from education to career. Lots of people said it and I don't blame them because it certainly looks that way. In my perspective, it was more of a 'I'm lucky it worked out'. There's a slight difference in the meaning. A ton of things could have gone wrong in my pursue in games programming. Because it's a ton of things, with a ton of feelings involved, I'll probably leave most of it for another rant. There are quite a lot of obstacles I have to overcome and the ride isn't as smooth as people might think it is. People need to realize that I some a tough decisions like deciding to all-in for my GCE 'O' Levels and I had problems like the burn out I had right after my internship at polytechnic. There was even a time I wanted to just change industries.

I was lucky in the sense that I have a chance to ride. The opportunity showed up, I took it with some risks and perseverance, and it luckily it worked out. But it wasn't all rainbows and unicorns.

Wednesday, May 28, 2014

[Programming] #3: How NOT to use default arguments

A friend of mine described this code he saw the other day to me in the legacy code of the game he is working in that involves default arguments in functions. I imagine that it looks something like this (it's in PHP):

//PHP!!
bool someFunc( $a = -1, $b = -1 ) {
    // Defensive programming!
    if ( $a == -1 ) {
        return false;
    }

    // More defensive programming!
    if ( $b == -1 ) {
        return false;
    }

    return true;
}
It's funny because you can tell the innocent thought process of the programmer who wrote this. It's simple: preset default unwanted values and reject them if they are not set. That way you can ensure that they are set by the invoker!

Except that it is much more robust and safer if the programmer would just remove the default arguments, together with the defensive programming lines of code.

I wonder if that programmer got stuck while dealing with a language without default argument support?

Tuesday, May 20, 2014

[Programming] #2: Negate bits without conditions

So here's a quick trick with bits! I love bits operations ^_^.

Back when I was a student in Digipen, I did this rather naive way to negate bits:
char bits = 11 //1011
char mask = 2  //0010
if ( bits & mask ) { // AND operator
  bits ^= mask; // XOR operator
} 

Code itself is pretty self explanatory. You will need the 'if' condition because if you XOR 0 and 1, you'll get 1 which is wrong (remember that I wanted to set a 1 to 0). It's a rather shortsighted method that looks only at the bit I want to set to 0, and just...sets it to 0.

There has to be a better way to do this though. Invoking an 'if' condition to do a quick bit-wise operation seems counter-productive. So I sort of wrote them down like so and solve for w, x, y and z.

1011
wxyz &
-----
1001

There are actually 2 answers: 1001 and 1101. From here it just seems kind of mathemagical from my point of view, because the next step in my mind is to somehow find the answer closest to 0010 (closest meaning the least amount of steps to get to 0010), which is 1101. Negating 0010 would just give me 1101.

It's kind of baffling how much sense the answer makes, and how elegant it is since it works for any other values. I don't really know if there is a less accidental approach to derive the answer. If there is let me know. This is how I accidentally derived it (without Google).

Anyway, knowing that we can simply make the adjustment:
char bits = 11 //1011
char mask = 2  //0010
bits &= ~mask; // NEGATE and AND operator, bits = 1001

And we are done!

Sunday, May 18, 2014

茅原実里の重大発表会見

ええ。。。

明日はニコニコで茅原実里の重大発表会見を見ました。そこで、みのりんは10周年のためにいろんなイベントと製品を発表しました。。。え?

10年? もう10年!?

放送が始まるとき、先ずはみのりんの2004の長門有希の声優役のこと、そしてその後の数年間のシングルとアルバム、最後に「みのりんの10周年のデビュー軌跡」と言う文を見せられました。

本当に10年か。。。

みのりんのファンになった理由は長門有希ので、私最初からみのりんのファンだという意味ですか。そしてもう10年ですか。

速いね。私は古いねww。

とりあえず、みのりんは製品の発売日を発表しただけじゃない!二つコンサート開催するつもりです!8月2日と3日に「SUMMER DREAM2」です。それからみのりんの誕生日の11月18日に武道館公園です。

どうしよう。。。。

8月29日の私はアニサマの予定です。コンサートは全部行きたいけど、1つを選べなきゃ。航空券が高いから、1年に1回だけ日本に旅行できます。。。

(泣)












Tuesday, May 13, 2014

[Programming] #1: Accidental assignment to constants in conditions

Since I'm programming like...ALL THE TIME, might as well share some cool/stupid/retarded/awesome stuff along the way right? 

So let's start with something simple. You should have seen this at least once in your programming career. You want to write a simple statement like so:
bool isHappy = true; // I AM HAPPY!
if ( hello == false ) {   // WHEE~~
  // Awesome stuff happens
}

And you end up writing this:
bool isHappy = true; // I AM HAPPY!
if ( hello = false ) { // WAIT WHAT ARE YOU DOING?!
// Unintentional crap happens
}

Nobody I know does this on purpose, so it's usually an accident of forgetting the extra '=' to turn it into the comparative '==' operator. If you DO write code like this, please don't. For saving 1 extra line (basically placing it outside), you are confusing everyone including and potentially your future self when you revisit the code.

There is a surprisingly elegant way to handle this though. Basically flip the values like so!
bool isHappy = true; // I AM HAPPY!
if ( false = hello ) {   // compile ERROR
  // nothing happens!
}

This will force an error because you are trying to assign the boolean 'hello' to a constant value. If you write it correctly like so:
bool isHappy = true; // I AM HAPPY!
if ( false == hello ) { // YAY!!  
   // Awesome stuff happens
}

It is the same as the original intent! And you won't go wrong this time! Now you can rest assured that all your conditional statements involving constants are safe.

最近の話し

誕生日に過ごしました!

家族と親戚たちは誕生日のために祝ってもらいました。嬉しかったけど、あの日の私は本当に出かけたくなかったね。ですが、私そんなに非常識な人じゃないので、皆さんに感謝しました。

そんなこんなで!

二週前、このブログに日本で書きましたね。実は他のブログは日記のために作って日本で書きましたけど、すぐに諦めてしまいました。それは二つのブログを管理することは大変だと思いました。又は作ったとき、大学生なので時間が持ってないから。

とりあえず、どうして急にまた日本語で書きたいですか?

先ずは、私最初から日本のこと興味があります。日本食べ物とかゲームとかアニメとか文化とか習慣は全部興味があります。さらに、働いている会社は日本会社です。そんな環境で働いたら、耐えられないほど日本語を習いたくなります。それに、日本語に慣れるためです。日本語で書けば書くほど慣れると思います。それで、日本語で書きましょう理由です。

というわけです。

最近、いろんなアニメにはまっちゃったんだね。

「ラブライブ」というのは、実は二年前初めて日本に行った時、秋葉原にアニメの開催お知らせは気づけましたけど、あまり興味がありませんね。先々週の私は、友達が困らせた後で、やっと見ました。見たあとで「ラブライブ」のμ’sの皆さんはとっても可愛いと思ったんだw。自分の大好きな部員は勿論小泉花陽です!突然に「ラブライブ」のファンになっちゃった!携帯ゲームもやります!


今季のアニメとして、「ラブライブ」以外、「一週間フレンズ」と「ご注文はウサギですか」です。

「一週間フレンズ」のストーリは自分の期待どおりちょっと悲しいです。このアニメは何か親切な感じを気にしました。絵のスタイルは新鮮で似合います。悲しいから、放送が終わったら一回で見てしまいましょうかな?でも、このアニメのホームページは毎週の放送に関係した内容で更新します。困るね。。。


最後の話は「ご注文はウサギですか」。友人によると、これは今季のヒーリングアニメです。そういうヒーリングアニメは自分の一番大好きなジャンルです!このアニメはすごっっっく可愛い!多分「きんいろモザイク」と「のんのんびより」よりふわふわを感じますかな。それに、自分の好きな飲み物の関係もある!そうだ、それはお茶とコーヒーだ!>:3


それでは以上です!それじゃ!

Thursday, May 1, 2014

ランダム日本語ポスト

はい、今度のポストは日本語でしてみましょう。

じゃ、只今夜中に過ごして五月になりました。時間は本当に早いですね。私今日までコーエーテクモに働くことはもう11月でありますね。すぐに1年になります。。。

実際にこの1年は、僕の初めて真面目に働きました。むかしの仕事はいつも3月以下で退屈になちゃった。この会社に入ったとき、僕はこの会社に3月以上で続けて働けるかなと思いました。突然に1年に過ごしましたww

この1年で、本当にたくさんものが起こった。考えれば、過去の例年よりもっとものが起こりました。理由の一つは多分僕の毎日の生活が多く変わりました。例えば、遊ぶ時間が少なくなるとか、お金が持っているになるとか、体は毎日朝から夜まで働くのでいつも疲れるとか、などなどです。この間、会社外の友達に会いたいけど、会う機会は少なくなった。この間、格闘ゲームを時間がないので練習できなくなった。週末以外、毎日この起きて働いて帰って寝る生活を過ごします。そう考えれば、その生活について嬉しいかな?

嬉しくないと答えれば嘘でしょ!(笑)

今時間がないですが、仕事があるから、自由度が増えました!仕事から、買いたいものは買えます。特に日本に旅行できます!最終の日本旅行はとても楽しかった。みのりんの演奏も参加しました!あの時は泣いたほど嬉しかったですw!仕事がなければ、今まで26歳で、日本に行かなかったオタクでしょ。

そして、コーエーテクモに働くことは楽しんです。いろんなことを習えるし、同僚は親切し、働くゲームは可愛いですから。疲れても、今まで満足ですよね。

でも、確かに全て持てないね。嬉しくても、もっと時間を持ちたいなw。

ま、いいか!今の幸せは間違いません。来年のは楽しみましょう!

Saturday, April 12, 2014

Video game violence?


Haha the blogger app just destroyed my original angsty post. I guess I'm not fated to do a post about this topic. But I don't care, I'm going to just attempt to rewrite everything!

Okay anyway. Video Game Violence! Let's go through a bit about it. It's related to the supertopic 'Video Games Controversy' which talks about how games can change the behaviour of a person and discusses whether it is good or bad. It was...what...a 30 year old topic? And this 'video game violence' subtopic's popularity skyrocketed in the 1990s because some people decide to murder or manslaughter others in public for 'no reason' BUT it was discovered that these murderers play violent video games. Media and people decided to put 1 and 1 together, peppered with some logic that concluded that video games caused the violent actions of the murderers. I grew up in the 1990s as an avid video gamer so this kind of news sticks out like a sore thumb to me.

Honestly, I have been wanting to blog this for the longest time but constantly decided that it was a retarded topic to blog about whenever I get started on it. When I was younger (much younger), I thought this topic is so silly that it would die down eventually. Unfortunately, it didn't seem that way. Everytime I see a 'video game violence' article, I will get tempted to blog about it and give up eventually because it really feels pointless. But here I am trying again.

So I would like to point out a couple of recent articles. I'm not a fan of linking people away from my blog, but this is kind of an exception since I take reference from outside sources. This article was written about a study that took place fairly recently and got thankfully debunked. Let me first disclaim that I know nothing about the science of asking survey questions, but it seems silly to ask questions related to video game violence to 3000 children, with a minimal age of 8 years, over the course of 3 years. Am I the only one who sees that there are way too many variables to draw any concrete conclusion? First of all, 8 years of experiencing life is a heck of a long time, let alone 17 years. People grow up differently, have different views over different topics because they have different personalities and grew up in different circumstances. That alone provides so many variables! And how violent is violent to each and every child? You can't expect random children to gauge how 'violent' a game is and expect it to be on the same gauge as other children. You mean 3 PH.Ds and 1 MA can't figure that out?

This other study is even more recently written. It basically suggests that it might not be the content in video game that makes people violent, but frustrating mechanics. What? You mean after 30 years, people just reached this conclusion? Or does it have to be someone with a Ph.D to write such an obvious statement before anyone bothers with it? *sigh* I think almost every game developer or QA tester already knew this fact for ages. And it is such an obvious fact too! Frustraion = Anger = Violence? I can sense all the game developers out there snickering at the article. However...better now than never right? I guess it's about time.

My take on this is simple. Everybody is different. Some people love vegetables, others hate it. Some people get motion sickness playing FPS, others can play for 10 hours without stopping. Some people play violent games to destress. Some people cannot differentiate the reality and virutal. Some people don't even see the point of video games. And all those can change over time. We are all different people at different times. Why is it so hard to acknowledge that? What is the point of asking 'Do violent video games cause players to be violent?'? We 'players' are not even clones of each other.

Video games are not drugs, stop thinking that it has the same effect on everyone. It is a just a much more powerful book or movie because of added interaction. It is just another form of media. Like articles, newspapers, TV, LIKE THIS BLOG, like OTHER blogs. It's brain food. Have you read horror stories when you were young and became afraid of the dark? No? Yes? Maybe? You see, even books do that! It depends on the receiver. And the media can't possibly cater for EVERYBODY.

I really appreciate all the people fighting to for video games. I can only imagine that it's an extremely daunting and annoying fight. Here's an article which more or less reflects what I feel and supposedly with evidence to back up. I re-quote Vaughan Bell from that article:

"[U]sing randomised controlled trials, research has found that violent video games cause a reliable short-term increase in aggression during lab-based tests. However, this seems not to be something specific to computer games. Television and even violence in the news have been found to have a similar impact. The longer-term effects of aggressive gaming are still not well studied, but we would expect similar results from long-term studies of other violent media — again a small increase in aggressive thoughts and behaviour in the lab.

These, however, are not the same as actual violence. Psychologist Christopher Ferguson, based at the Texas A&M International University, has examined what predicts genuine violence committed by young people. It turns out that delinquent peers, depression and an abusive family environment account for actual violent incidents, while exposure to media violence seems to have only a minor and usually insignificant effect."

Well, at least I FINALLY let this out of my chest. My god I finally don't have to think about blogging this ever again ^_^

Let's all move on to happier things!

Wednesday, April 9, 2014

Melancholic Happiness? (+カレーの歌)

I'm feeling kind of melancholic recently. And also in a mood of writing. Problem is, I have no idea what to be melancholic about.

SO.

Instead of being melancholic, and make myself suffer about thinking about a melancholic topic that I might potentially cringe at writing (I dunno, maybe like ending up giving life advice or wallowing in 'could've should've would've' crap ), I shall post one of my favorite happy songs that dispels all melancholy:



歌詞:(^o^)ノ

すべては愛のターメリック ハラハラハラペーニョ
泣かれちゃやだもん シナモン カリダモン
無理か パプリカ コリゴリコリアンダー

錯乱してサフラン ちょこっとチョコレート
いまさらガラムマサラ
でも明日があるもん シナモン カルダモン

美味しいカレーの

すべては愛のターメリック ハラハラハラペーニョ
泣かれちゃやだもん シナモン カリダモン
無理か パプリカ コリゴリコリアンダー

錯乱してサフラン ちょこっとチョコレート
いまさらガラムマサラ
チョコはうまいぞー
でも明日があるもん シナモン カルダモン

美味しいカレーの 出来上がり

And this version is epic!


Wow, it's been awhile (like forever) since I posted ANYTHING related to anime. Well, it's hard to blog about animes because firstly, I selectively choose animes I like and drop animes I don't, which eliminates all possibility of angry rants. Secondly, the animes I generally like are slice of life 90% of the time, which means 90% of the time, I can't create a proper constructive discussion on anime since plot is non-existent and events are character driven, in which it would be much better if you would just watch it.

The 10% that remains are really special animes that are not slice-of-life which I MIGHT consider discussing, perhaps sometime in the future. There aren't many of them, but a rough list goes like: Eureka 7, Bounen no Xamdou, Ano Hana and the recent Kill la Kill. Hmm, interesting proposition ですね!今度やってみましょうか?


Saturday, March 22, 2014

[Game Design] MMO Customization thoughts

I have been playing FF14:ARR for a couple of months now and it was exactly what I expected it to be. It wasn't new  or fresh in anyway. The Armory system is basically multiple characters in one character. FATEs are dynamic events made popular by Guild Wars 2. If I were to consider WoW an EQ 2.0, FF14:ARR would be the WoW 2.0 in a sense.  Get to max level, farm for gear, go PvP or PvE, raiding, crafting...same old song and dance. Some implementations got upgraded, some parts got streamlined, etc. Mostly improvements though in my opinion but I can see why some other people might not think so.

However, what I found interesting is the lack of customization. In FF14:ARR, what you can do as a class is very specialized towards your classes' role in the party. Most people see that as a downgrade...to games in general. It was an interesting thought that I held with me throughout my university days but I never discussed about it openly.

Taking us back in time...

I remember that ever since a decade ago, making games with the idea of 'allowing players to customize' was celebrated notion, both to players and to developers alike. It still is. I grew up playing Black Isle games, Bioware games and PnP Dungeon and Dragons. In these games with small social interactivity, customization was really an awesome thing. As I was studying to become a game developer, the phrase 'let players customize' was often thrown out during discussions and written in game design documents as a very very positive thing. Thinking back, people rarely talk about making or discussing about games with strict-but-well-defined roles. It is much easier to pitch a game to others if you have 'customization' in your games. It is much easier to pique the interest of your friends if the game you are trying to get him into have 'customization'.  Why is it that games that offer 'customization' so alluring? Is it because idea of 'customization' implies 'near limitless possibilities'? "Oh you can create a Orc rogue, that sucks at sneaking but uses magic really well!" Wha-?

So what spurred the idea of having customization in games in the first place (not just MMOs)? Usually, developers just want to throw a, say, skill tree they designed and see what players do to it. In a sense, it's like throwing a bunch of tools at a person and asking him to make a table. The player can then, depending on the restriction of the tools, make a proper 4 legged table,  3 legged table, a dysfunctional table, a round table or even a chair. It COULD be that the designer cannot make up his mind and decided to leave it to the players. *shrug* There are times where I see skill trees in games that made sense, and there are times where I just feel that the designers don't care, don't know jackshit of what they are trying to do, or simply overwhelmed by the decisions they are giving the players.

I think that it is great having customization in single player games or instanced games with small scopes like Diablo or Neverwinter Nights, where the damage you can impose onto others for having crap builds is minimal due to its single player nature (you can test builds in an isolated space). But in MMOs, I start to wonder if it is really a good thing.

Consider DDO, Dungeon and Dragons Online. (Warning! DND jargons below)

It's easily the first game where a character you recruit into the party might not be what you think it is. When I played, it was p2p so we had access to all the now-premium dungeons. We wanted to go to this dungeon called Catacombs and we know for a fact that bringing a level 8 cleric with logically sound stats would easily clear the first few levels of the dungeon with the Turn Undead skill (it starts at level 2!). We saw a level 8 cleric looking for party, grabbed him and went straight into the level 2 dungeon. What we did not know, or rather, it wasn't shown that the cleric has crap for Charimsa stat, causing his Turn Undead to be really crap. I was astounded when I saw a level 8 Cleric casts Turn Undead at level 2 undeads and nothing happens. To prove my point, even the level 8 Paladin, a class with Multi-Attribute-Dependency, has 14 Charimsa and weaker Turn Undead (casts at 1/2 Paladin level I think) manage to fear the undeads. That wasted lots of our time and since it's p2p, money as well.

The thing that irks me is not the skill of the player. Sure, in MMOs, we do run across people with really bad skills that waste our time, but that can be remedied over time and that's one aspect that makes MMOs beautiful; to see other players become better. However, characters with a bad build that no skill can overcome is simply bad and will always be bad. It's like putting points into useless talents in vanilla WoW (like wand specialization) or playing a two weapon fighting dexterity fighter in any form of 3.5 DnD (like DDO). DDO is a really special cdase because players can do things like playing a Rogue without points in Disable Device which can heavily impede the progress of your party. In the end, there exist a 'right' way to build a character, which will progress fine in the game, and a 'wrong' way, which is bring pain to the player and those around him. If so, why not just implement the 'right' way?

That sort of leads to my main point, which is 'Is customization really what it is in MMOs?'. I'm going to throw out a phrase: "Viable Builds".  If you throw 'limitless possibilities' onto hundreds and thousands of players in your game (doesn't really matter what game), viable builds will start to surface. Like during the time I played Guild Wars 2, despite preaching about 'customization', the very versatile Elementalists really only have a finite amount of viable builds (I think Elementalist has 3?). So what is the point of customization if in the end, people are defining these viable builds? In a sense, it's like they are solving a puzzle for the designers. It's like genetic algorithms.

However, there is one thing I love about this 'customization' which I must give credit for, which is the discussion process among the players.  Active discussion among players is invaluable to an online game and is a key aspect of a successful long-lasting community. I just feel that it's a bit funny that players are, for example, drawing DPS statistics for the developers (who might refer to it). You see, in a sense, it's like players working for the developers. What a grey area -_-;;

Now this might seem like a anti-customization rant, but it only is because many people I talked to seemed to be attached to the idea of 'customization' like it's always a good thing to have in a game. It's not always. If games have lack of customization, they are more focused on the role of the players and game content is designed to challenge those roles. I just feel that it is more interesting doing content designed specifically for roles. It would boil down to the execution of the players. It is also one of the many reasons I loved Everquest; because of its simplicity. It is kinda of why I'm enjoying FF14 now. Everyone has the skillsets; just how well they execute it. No nonsense like "I'm a Rogue without Disable Devices" crap.

Seriously, I no longer look at 'customization' as a key feature in MMOs anymore. If I am going to be slipstream-ed into a role, might as well let me choose the role from the beginning instead of taking me for a ride. However, I feel that both can co-exist somehow. Like say for skill trees, we can make the skills only enhance the role of the character, instead of allowing the character to step out of their roles. Much like Etrian Odyssey's skill trees. Just an example..

Mmm, some food for thought =)