I shouldn’t really write posts just for the sake of updating. These kind of posts don’t stand the test of time – it’ll probably be irrelevant in a few weeks. I prefer to do posts that had some kind of content in them that would be useful/interesting; even when out of context. But because I haven’t been updating this blog for a while… here’s the sit-rep!

Sinjid
All the units, items, and classes are done. The only thing left is to assemble the game. All the pieces now are here now, and I just have to put them together! Sort of like LEGO. And (but, don’t take my word for it 100%) I am planning to sort out a BETA for next weekend :) I think I’ll create a special level though, so you don’t play through the main campaign before the game is out. All the technical gameplay elements will be intact, and allow for feedback/reports in that respect. I just don’t want to reveal the story. Good idea? Bad idea?

Flight
I have been working on something really exciting with a few talented folks under this title :) I’m not allowed to say more at this point, but there will be a post about this soon.

iOS Future
For the past few months I’ve been learning XCode and Objective-C on the side. It’s Apple’s programming language, which is used to create iPhone and iPad games. I want to expand my platform, and I want to make Sonny 3 both as an iOS game and a Flash game. Anyway, I’m at the point where I actually understand what is going on now. And so… here is a screen-shot from a test project (I would’ve posted a video, but I have no idea how to capture video on my phone without jail breaking it). Looks rough and dull now doesn’t it? It’s just a proto-type. We’ll make it prettier soon:

Homing Missiles
So since I’m desperate to make this post not completely and utterly useless, I’ll also post my formula for the homing missiles. It was difficult for me to work this out… So now that it’s done, I’m mounting its head on a pike for all the world to see!

// Speed of rocket, and speed of angle adjustment.
int angleTurnSpeed = 2;
float currentSpeed = 5.0;
 
// Find the bearing to the target, and adjust rotation in the shortest route.
double targetDirection = (atan2f([self x] - [homingTarget x], [homingTarget y] - [self y])) * 180 / M_PI;
targetDirection =  (360 - (int)targetDirection) %  360;
 
// Keep them on the right side. (Direction is in degrees, not radians)
if (direction < 0) direction += 360;
if(targetDirection < direction) targetDirection += 360;
 
// Find the difference in the angle.
double angleDifference = targetDirection - direction;
 
// Turn the actual direction towards the target direction.
if (((angleDifference < 180) && (angleDifference > 0)) || ((angleDifference < -180))) {
   direction += angleTurnSpeed;
} else {
   direction -= angleTurnSpeed;
}
 
// Convert direction to radians and adjust position.
float dirRadian = direction * (M_PI/180);
y += cosf(dirRadian)*currentSpeed;
x += sinf(dirRadian)*currentSpeed;

Sure, it is a bit clumsy – and anyone good at math is probably having a laugh at me. But it works, honest! So if you are ever designing a 2D game that has homing missiles, and you need a formula… there you go. There are other ways (and faster ways) to do this too, though. But I find having rotation/direction separate from movement-speed a useful thing.

That’s all from me this week. I’ll be hard at work next week to bring you more Sinjid news and hopefully a BETA :)

Bye bye.

PS: As for the title… It’s because it is Summer here in London and still it has been grey and raining the WHOLE time (except maybe for like 2 hours). Grrr! >:(

44 Responses to Summer Rain and Homing Missiles

  1. Ricardo says:

    I like the idea of the special level. Keeping the main storyline intact while making the game playable sounds super. Can’t wait for it to be out!
    Can’t really comment on the rest :p

  2. Bluebear says:

    I also like the idea of keeping the story hidden, and having some type of special level instead. I most likely will not be playing Sonny 3 on the ipad/iphone since I don’t have one, but will be playing it as a flash game. It’s hardly raining where I live, and I love rain too D: Although I guess you can go overboard on rain. Can’t wait for the beta :D :D :D

  3. Jay Harrow says:

    It is currently June 15th where I live, you posted this on June 16th… are you a wizard

  4. Kyzak says:

    Special level yes pls.

  5. Zyph says:

    cool, guess there’s nothing you can’t do :)

  6. Lifemaster says:

    This is baller news. Pumped for the beta, and definitely a good idea to have it separate from the actual campaign.

    With regard to your programming in iOS…brilliant idea to take Sonny 3 there. Whether you charge small fee to DL the app or do in app purchases, you’re gonna rake it in ^.^. If I might suggest…make it available on google play as well (android market)…and I know it’s not a simple task, but find someone who knows how to convert the code once it’s finished and you’ll double your earnings and popularity in the game.

    Rainy days…the perfect excuse to stay indoors…

    You stay awesome, Krin.

  7. whase says:

    A beta would be awesome, can’t wait to play it.
    also, it that C#? I know it’s not actionscript and I don’t think you would use Java, right? (that’s all the languages I’ve worked with)

    • Bluebear says:

      I’m pretty sure it’s Objective-C

    • AlexThyNoob says:

      I’ve learned a little C# and he uses the same variables that i’ve seen in them. Double, Int, Float. Also its the same using “//” for comments that don’t affect code.

      So I’m guessing that’s C#.

  8. Sticky Shenoodles says:

    I’ve done some research and Android rakes in quite the load. It can’t be that different from iPhone programming. I say you give it a shot!

  9. Fatman says:

    Me Think too!
    You Cool, Dude!

    Rain, rain, go away…

  10. Sonny Lover says:

    umm for u said about sonny 3 on iOS why not on android?
    simply because i have an android but androids are getting more popular and iOS is slowly dieing so….

    but to make some money out of it you can sell the app for the phone so anyways….

    • Krin fan says:

      iOS is dying? Really? Lol. Mobile games seem to be rather easy to port so I would assume the code cant be that different. May not be too much trouble for you to do both iOS and android versions, Krin ^^ hoping you can spread your games as far and wide as possible. This post was quite helpful and reassuring. Dont discredit this kind of post. It’s good to see some updates.

  11. r1ce says:

    Sounds awesome. Can’t wait to play beta!

  12. UltimatePixel says:

    Can’t wait for the sinjid beta :)

  13. Naga says:

    Can’t wait, I’m heading abroad but I’ll check back for the Beta.
    Having Sonny 3 as an Game app seems like a really cool idea! However, I’d love to see real time PvP/Additional Multiplayer services but I assume it’s hard to make it work on a flash, so it would be a nightmare on a iOS game.

    Anyways, keep up the hard work! Creating something this epic must feel awesome.

    -Naga

    PS – How is Diablo 3? I got bored quickly after Inferno Diablo, farming isn’t for me ;/

  14. William Sakowsky says:

    BETAAAAAAA

  15. 7uj says:

    I like the idea. When Crush the Castle beta was released, I almost finished the whole game in that one day! Thank goodness for user-submitted castles.

    I’ve been anxiously awaiting for a report for like a month. I’m glad that this one is filled with useful information. Oh yeah, and like almost everyone on Earth, I am really, really excited to see some BETA gameplay (footage) soon.

  16. Shateras says:

    Hooray for Sinjid Beta! Definitely worth checking out.

    About the 2D iOS game: will it also be available as a Flash game as well? Or will you need to completely recode in Flash?

    By the way, was the login system disabled recently? It isn’t showing on my or my brother’s computers.

  17. Edward says:

    I agree I’d like to also see the game on android ^_^, I mean if its too much trouble to learn another language or w/e then don’t bother, but if it isn’t, I’d gladly be willing to pay for a Sonny 3 app.

    I’m also excited for the Sinjid beta. I think your idea to keep the beta restricted to a separate level away from the campaign is good. Don’t want to spoil the campaign with an unpolished version for myself.

    Also consider restricting the skills available (ie, black out other skills in the skill tree so they can’t be selected or even have descriptions), for the same reasons. Don’t want to spoil the animations and/or effects of the abilities for the main game. Just give us a few, perhaps just the five you outlined for each class in the blog previews.

  18. Bunnieh17 says:

    Can’t wait. Where do i apply for the Sinjid beta.. will it be posted on armorgames? Anyway, i’ll keep checking this website next week to see :D.. thanks Krin.

  19. Feng249 says:

    Hopeful to see the BETA soon, the game looks amazing!! I can’t wait, keep up the good work Krin!!! :)

  20. Victor says:

    Hey, Where I Find The Flight Soundtrack, Or Something Like This?

  21. i have no username says:

    i hope the beta will come out soon! (and that my computer will run it >_>) but how are we gonna sign up for the beta?
    that homing missles code look preety complex (i don’t know code, but what atan2f means?)
    keep up the good work!

  22. Nnd says:

    Can’t wait for the Beta next weekend. Its good that you’re bot spoiling the story for us yet.

  23. Yoeri says:

    Its nice to know that there is a special level, and i can’t wait to play it of course. i hope it won’t be too small :P
    i can’t wait to play sonny on tablet, then i finally have something to do in the bathroom :D

  24. MithosAnnar says:

    you know, I really like that your moving to the IOS Device.

    though I personally think unity 3D is much easier to use.

    And the basic version is free to use!

    I use unity and program in c#. c# is around 50% slower than c++.
    your games would get made faster and its worth it for the framework, just saying.

    so your making a flight 2? Well I think thats great. Can’t wait for the updates.

    – Mithos

    • MithosAnnar says:

      Ah.. I forgot to mention:

      Unity can build for the IOS device and for flash, with one code.

      I’ll give an give an example, unity supports frameworks that work for both the IOS device and pc’s, the function: OnMouseDown means two things, it means the left mouse button on the pc, and it means a tap on on the Iphone.

      See? just a matter of what platform your building for. And in unity you can build for any number of platforms including the wii, ps3 and xbox 360!

  25. Rece T says:

    Hurry up and finish! I’m waiting for sonny 3! Ever since I played Sonny 1 & finally finished 2, I have been hooked on your games. I also have an idea for Sonny 3 as a mobile mutiplayer game! rece.tetrault@gmail.com if you want to hear ’em (though i have no idea how the mechanics will work)

  26. RUMMAKER says:

    Krin you should implement an enchantment system like the one in Arcuz (by funnaut). That would make weapons unique and people would all have different types of weapon in the multiplayer.

  27. igotnolife says:

    nice hope to see beta. also, how do i log in?

  28. UltimatePixel says:

    Krin, i got a question- do you do all the voices? Or do you have some friends who do it? I think it would be nice to set up a contest for voice acting, since everybody wants to be in the game at least a little bit.

    • Jengas says:

      Krin posted the answer to this awhile ago in a different update. He has different voice actors who do the voicing for him. But your idea is also nice if it could bring in some quality actors. :)

    • MithosAnnar says:

      Lol, I asked this exact same question… He hires people.

  29. Torgeir says:

    Always nice to read your updates! Been following your games since the first Sinjid, and I can’t wait to play this! Keep up the good work and get well asap :)

  30. MithosAnnar says:

    Hey there krin, or at least some moderator?

    I saw on your front page the following text: “Join the forum!”

    So I clicked game development.. and I couldn’t find the “join” button.

    can anybody tell me where that is?

    I subscribed to the blog!

    – Mithos

  31. TriXshock says:

    Are there going to be multiple save slots in Sinjid?

  32. Me says:

    You know, an android sonny 3 would be nice. Sinjid too, but mostly sonny.

  33. admin says:

    not worked for me, in unity4
    object moved by static circle, and change only direction.

    if(target != null) {
    // Speed of rocket, and speed of angle adjustment.
    int angleTurnSpeed = 2;
    float currentSpeed = 5f;
    //float direction = 90f;

    // Find the bearing to the target, and adjust rotation in the shortest route.
    double targetDirection = (Mathf.Atan2(transform.position.x – target.position.x, target.position.y – transform.position.y)) * 180 / Mathf.PI;
    targetDirection = (360 – (int)targetDirection) % 360;

    // Keep them on the right side. (Direction is in degrees, not radians)
    if (transform.rotation.z < 0) transform.Rotate(0,0,360f);
    if(targetDirection < transform.rotation.z) targetDirection += 360;

    // Find the difference in the angle.
    double angleDifference = targetDirection – transform.rotation.z;

    // Turn the actual direction towards the target direction.
    if (((angleDifference 0)) || ((angleDifference < -180))) {
    transform.Rotate(0,0,(float)angleTurnSpeed);
    } else {
    transform.Rotate(0,0,-(float)angleTurnSpeed);
    }

    // Convert direction to radians and adjust position.
    float dirRadian = transform.rotation.z * (Mathf.PI/180);

    Velocity.y = Mathf.Cos(dirRadian)*currentSpeed;
    Velocity.x = Mathf.Sin(dirRadian)*currentSpeed;
    transform.Translate (Velocity.x, Velocity.y,0);
    }

Leave a Reply

Your email address will not be published. Required fields are marked *