A javascript battle

Discussion in 'General Off-Topic Chat' started by drake7707, Jan 22, 2012.

Jan 22, 2012

A javascript battle by drake7707 at 3:24 PM (450 Views / 0 Likes) 6 replies

  1. drake7707
    OP

    Newcomer drake7707 Member

    Joined:
    Feb 12, 2006
    Messages:
    33
    Country:
    Belgium
  2. AlanJohn

    Member AlanJohn くたばれ

    Joined:
    Jan 6, 2011
    Messages:
    3,425
    Location:
    Canada,New Jersey
    Country:
    Ukraine
    This is amazing.

    Theres a bug though, the lasers dont affect the enemys :(
     
  3. Cyan

    Global Moderator Cyan GBATemp's lurking knight

    Joined:
    Oct 27, 2002
    Messages:
    16,455
    Location:
    Engine room, learning
    Country:
    France
    It does, it worked for me.
    maybe yours wasn't on the same "plane/layer" as the enemy.

    Dragging with left-click would prevent the context menu to appear.

    I'm developing in javascript too, but I'm not that good.
    I do Firefox's add-on which are all written in javascript, but I'm limited with my knowledge :(
     
  4. drake7707
    OP

    Newcomer drake7707 Member

    Joined:
    Feb 12, 2006
    Messages:
    33
    Country:
    Belgium
    This is only my second time writing javascript, I don't much about how classes / prototyping works. Every object I make is with new Object(), I'm sure there are way better methods to structure the code but I don't usually write web stuff.

    Sometimes tanks miss their target when firing, this is because the tank scopes to see if there are enemies in range aren't properly matching the projectiles the tanks fire.

    I only tested it in Opera (which is the browser I use) and did profiling with firebug in firefox, so I hope it works in all browsers, I use most standards aside from the transform to rotate the missiles and anti-air barrels, which involved a lot of browser specific css.
     
  5. Cyan

    Global Moderator Cyan GBATemp's lurking knight

    Joined:
    Oct 27, 2002
    Messages:
    16,455
    Location:
    Engine room, learning
    Country:
    France
    It should rotate? I didn't see that.
    I saw only the differential scrolling layers.



    I'm checking your other projects, You have nice ones :P
    You don't share them? any download?
     
  6. drake7707
    OP

    Newcomer drake7707 Member

    Joined:
    Feb 12, 2006
    Messages:
    33
    Country:
    Belgium
    My original intent for my site was as a supplement for my CV, to showcase stuff I've worked on. I might add some source code/binaries later, most of them aren't probably in a proper state for release.


    As a side note: I tweaked tanks to actually hit most of the time and added helicopters :)
     
  7. Rydian

    Member Rydian Resident Furvert™

    Joined:
    Feb 4, 2010
    Messages:
    27,883
    Location:
    Cave Entrance, Watching Cyan Write Letters
    Country:
    United States
    The helicoptors seem to get killed way too soon, often before they even get to the front line to fire a shot off. XD

    Also I do notice performance drops during the explosion animations, you could try reducing the compleity of that?
     

Share This Page