domenica 15 settembre 2013

Updates on Kagerou Project fan game

Hi guys, just a little update regarding the project. The game is complete I guess, in the past few days I didn't really have much time to work on it, I started working and I've almost finished with my thesis. If was almost complete when I posted the gameplay video. The reason I still didn't have released the game is that I think it's not fair doing this without a replay from Jin and Shido, since I'm using their works. I tried writing to Jin using the contact form from his website, but still no reply. I think the problem is that I try to contact him in english. I tried to ask for help on 2-3 website, only to be turned down. If someone know a bit of japanese please contact me, so that I can get a proper answer.
If I don't get an answer I'll consider to publish the game like any other fan game, hoping it doesn't trouble the owner of the songs. However I don't think I would be able to publish the android version of the game this way. I hope in the future I have a chance to continue with this game, so that I can add more song and features, I really like Outer Science and I want to do something spectacular with it.
Anyway, good news! Here are some of the changes in the new version:
  • You unlock Ayano by getting a good grade in hard mode in any level.
  • The score rating is now better, it's not so insane to get an S.
  • Getting an S in hard mode will unlock a new difficulty.
  • You can skip the logo with back/esc.
Now I don't want this project to die so easily, and I might find the time to fix it while I wait for a reply.
If you want to try the game, contact me. I'll give the windows version to 5 people who have a youtube channel and that can help me by spreading the word posting youtube gameplay videos or review.
Now, thanks again everyone, see you later.

sabato 7 settembre 2013

Kagerou Project Game - Update

I'm really happy people liked the game. I have to thanks JubyPhonic for helping me spreading the word, so first of all thank you all guys for encouraging me with this!

Seems like my dropbox public account has been disabled because too much people downloaded my game, my bad. I'll be sure to publish my next update on a different host, so that everybody can download it without problems. Speaking of update, here is a video showing you what I'm working on right now:
Now, I'm waiting Jin's approvation, I tried to contact him on twitter and via the IA project website. If anyone wants to help me with this I'll be really happy, I don't know how to contact him in Japanese.

Now, see ya in the next update!

Worms bar shoot example > Unity3d

Just one of my quick exercise I did when I started to play with Unity. Here we see the code that produces the bullet given a certain direction, you can increase the power of the shoot by holding space.

var gui_grandezza : int = 256;
var potenza : float = 0;
private var increasing : boolean = false;
var shooting : boolean = false;
var barraspeed : int = 100;
var proiettile : GameObject;
var spawnpoint : Transform;
var shotforce : float = 5;
var cubi : GameObject;
private var currentCrates : GameObject;
var blastPart : ParticleEmitter;
var altezza : GUITexture;

function Start(){
 guiTexture.pixelInset.width = 0;
 var somecrates : GameObject = Instantiate(cubi, Vector3(8,1,-6), transform.rotation);
 currentCrates = somecrates;

function Update(){
 if(!shooting && Input.GetButtonDown("Jump")){
  increasing = true;
 var vertical : float = Input.GetAxis("Vertical") * -1;
 spawnpoint.Rotate(Vector3(vertical,0,0) * Time.deltaTime * 10);
 altezza.guiTexture.pixelInset.y += vertical * -1;
 if(!shooting && Input.GetButtonUp("Jump")){
  increasing = false;
  potenza = 0;
  potenza += Time.deltaTime * barraspeed;
  potenza = Mathf.Clamp(potenza, 0, gui_grandezza);
  guiTexture.pixelInset.width = potenza;

function shoot(potenza : float){
 shooting = true;
 var pBlast : ParticleEmitter = Instantiate(blastPart, spawnpoint.position, spawnpoint.rotation); //just a particle emitter
 //base blast amount on power argument, and divide it to diminish power
 pBlast.maxEmission = potenza/10;
 var pFab : GameObject = Instantiate(proiettile, spawnpoint.position, spawnpoint.rotation); //that's our bullet
 pFab.rigidbody.AddForce(spawnpoint.forward * potenza * shotforce);

//we reset the envoirment after 4 seconds
 Destroy(pFab.gameObject, 4);
 Destroy(pBlast.gameObject, 1);
 yield WaitForSeconds(4);
 potenza = 0;
 guiTexture.pixelInset.width = 0;
 shooting = false;
 var somecrates2 : GameObject = Instantiate(cubi, Vector3(8,1,-6), transform.rotation);
 currentCrates = somecrates2;

When we hold the "jump" button (space by default) the variable increasing is set to true. When increasing is true we use potenza += Time.deltaTime * barraspeed; potenza = Mathf.Clamp(potenza, 0, gui_grandezza); to add power to our shoot. When the jump button is released Input.GetButtonUp("Jump") returns true, at this point we call the function shoot(potenza) and we set increasing to false. The function shoot instantiate a particle emitter and our bullet. The bullet pFab has a rigidbody, we use AddForce to make it go forward from our swappoint with a velocity of potenza * shotforce. Most of the variables names are in italian, I hope it's not that difficult to follow, in the end it's a really simple example, here you can download the full project.
ITA: Il codice cerca di simulare la barra dello sparo di Worms, tenendo premuto incrementiamo la variabile potenza, al rilascio del tasto spazio usiamo la funzione shoot per instanziare un rigidbody al quale aggiungeremo una forza tramite la funzione AddForce. La stessa funzione shoot si occupa di resettare la scena, l'intero esempio è scaricabile dal seguente link.

mercoledì 4 settembre 2013

Get public ip address by code > Java

It can be useful to your application to know what's your public ip address. Instead of getting the information from your network card, that is not sure to have your public address registered but only your local ip and the gateway, you can use a service like .
By making an http request at checkip.amazonaws we can easly get what's our ip address.

public static String getIp() throws Exception {
        URL whatismyip = new URL("");
        BufferedReader in = null;
        try {
            in = new BufferedReader(new InputStreamReader(
            String ip = in.readLine();
            return ip;
        } finally {
            if (in != null) {
                try {
                } catch (IOException e) {
ITA: La funzione sovrastante si occupa di restituire l'idirizzo il publico della macchina facendo una richiesta http ad un servizio offerto da amazon. Solitamente si utilizza vedere cosa è presente sulle porte della scheda di rete, tuttavia non sempre questo approccio porta ad una soluzione, poiché in esse è solo salvato l'indirizzo della rete locale. Si può usare amazon come anche un altro servizio da noi implementato su un nostro server, per avere maggiore affidabilità in futuro.

MekakuCityDays project - A rhythmic game

In the last three days I got bored and I started to develop a new rhythmic game with Unity that can work both on pc or android.
Since I'm a fan of kagerou project, a series of japanese songs made by Jin, I decided to make a little fan game.
I'm open for suggestion and I really need someone who can test it. I don't know how much more free time I'll have to spend on it, for now here a pre-alpha: DOWNLOAD
In the .rar there is an .apk if you want to play it on your device.

Featured songs are: Konoha's State of The World, Headphone Actor, Shounen Brave.
UPDATE: Blindfoded Code, Night Talk Deceive
Gameplay: Use they buttons - >
  • A or left arrow : for the left trigger
  • G or down arrow: for the middle trigger
  • L or right arrow: for the right trigger
  • Esc : for the menu/pause
ITA: I tasti da usare sono A,G,L. Il tasto Esc mette in pausa/menu.
Il gioco si ispira alla serie sopra citata in inglese.

UPDATE: Seems like so many people downloaded my game that dropbox decided to lock my public account. Don't worry tough, in the next few days I'll come with a new update featuring one more "hidden" song, so please, stay tuned!
Also, if someone know how to contact Jin regarding this project, please let me know.
See this.