awoo's blog

By awoo, history, 7 years ago, translation, In English

They do! In some way.

For eager ones link to userscipt.

Hi everybody!
You know, our universe is pretty unfair place. Luckily, some unfairness can be fixed. And I found a method to make this world a bit kinder!

Let me introduce a plugin that can help people overcome difficulties in their lives and develop their self-esteem!
I believe, every active member of codeforces community at least once faced the problem I've faced couple times. It's when you try to reach that sweet green arrow to support commentator but instead of this you accidentally punch the red one with all of your might! And there is no way to correct the mistake!

So, I spent some time studying the problem (and jquery, btw) and made a cute little script that changes concept of vote confirmation. While you are on a page, you now can alterate between your decisions as much as you wish (though only on comments you haven't voted for before entering page). Changes will be applied on site closing (it can be either moving to other site or closing tab/browser).

I'm not sure about the reasons but the fact is that sometimes not every vote is being applied. To prevent loss of your grades I also added special button to save everything. It can be found on panel with new comments counter (or in that place if there are no new comments).

I will dublicate link to script, if you miss it in the beginning. It's a simple userscript that can be run in chrome-based browsers (via tampermonkey plugin), firefox (greasemonkey) and opera of older versions (violentmonkey).

If you found any bugs or have some suggestions feel free to notify me via pm or in comments.

Happy New Year!

Full text and comments »

  • Vote: I like it
  • +158
  • Vote: I do not like it

By awoo, history, 9 years ago, translation, In English

Introduction

Hi everybody! Recently I have decided to refresh memories about good old times and play Gravity Defied on my phone. It wasn't really hard to find port of that legendary game from J2ME to modern platforms. It rapidly gained glory among students of past decade. Key points of Gravity Defied success were nice gameplay (biker completing different stages with high cliffs and deep pits), convinient physics (ability to rotate mid-air) and simplicity of modmaking. As for me, it was a bit more than usual game. When I had completed over thousand tracks, I began earning money on helping others to progress. Only later even more difficult games were developed: HOMM 3, Far Cry and Dark Souls...

Predevel story

And now Gravity Defied is on my phone again! Not original, though, but well-made remake for Android. I can totally declare that atmosphere of game was transferred great! And one more time I got sucked into game so badly that I imagined biker each time I had seen polygonal path. One day, when I was waiting for rating recalculation after Codeforces contest and looking at graph on my profile page, I got an idea to use that graph as track. Just wanted to live through all the victories and defeats of past two years of competitive programming again...

Development

When I finally start to think about general concept of program, I realized that I know nothing about neither modding itself nor Gravity Defied track creating. So, Internet has everything, I thought... Firstly, I discovered that track files differ in two Android versions of GD (official from CodeBrew and unofficial from VKontakte developers, which is better in my opinion). And while .gdlvl for official was pretty easy (it's using most appropriate JSON extension), .mrg for unofficial (and for that J2ME game also) was truly comlicated! The thing is that there are very few useful forums (I found only one topic on russian forum and one wiki page which helped me at least in something). I got needed piece of information translated and proceeded with implementation. Python 3 script loads JSON with contests list of certain users and creates array of points using information about rating change and period of time between contests. All libraries used are built-in (os, sys, time, urllib, json). Being executed from console, it can either read handles from file or from command line. Installation guide along with script itself can be found here.

Some screenshots:

Please, notify me about found bugs in script and errors in post by PM.

Good luck and have fun!

Full text and comments »

  • Vote: I like it
  • +245
  • Vote: I do not like it