A Flash Developer Resource Site

Results 1 to 15 of 15

Thread: [WIP] NinjaX

  1. #1
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,140

    [WIP] NinjaX

    Hi, this is the latest version of the previous game I posted a while back:

    http://board.flashkit.com/board/showthread.php?t=822012

    sadly its no longer multiplayer due to a few reasons like not being able to use cirrus in a commercial project, time required to finish and complexity.

    Hopefully in the future I'll be able to revist this and put multiplayer back in. For now its single player only, however the final game will feature the ability to race against someone else's time by recording their game.

    anyway, arrows, WASD moves and spacebar or numpad 0 shoots the rope.

    http://boxofsoap.com/work/gamedev/ninja/demo9/

    *The rope is very buggy right now and you might get some errors, if you do please let me know. Also, would love to know how it runs and if you like the gameplay. Few people here at soap have different opinions on how the ninja should handle.

    please ignore the extreme plagiarism of other game assets, this will be changed
    lather yourself up with soap - soap arcade

  2. #2
    When you know are. Son of Bryce's Avatar
    Join Date
    Aug 2002
    Location
    Los Angeles
    Posts
    839
    Friggin sweet! Super smoove.

    Regarding the controls, I'd say have UP while on a wall should make you jump off no matter what. I feel like it's too difficult to pull off successfully with a keyboard. And I think the double jump should push you up a bit more, like if I'm descending it should lift me up again.

    I had a problem with the bottom left corner, trying to jump out with the firebreathing statues. I had a hard time sticking to the walls when I jumped up while adjacent to them.

    With the rope, I kinda wanna see it being able to "stick to something off screen" like in Spider-man games. Cool mechanic but I wasn't able to take advantage of it in the demo environment.

  3. #3
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    very nice. super smooth.
    i think that is the best implementation of wall crawling i have seen to date.
    ninja dude moves a little too much after i stop pressing the key
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  4. #4
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,140
    cool, glad you guys like it.

    http://boxofsoap.com/work/gamedev/ninja/demo10/

    I've changed some movement controls and added a few new things too:

    you no longer slide down a wall, you can no longer wall jump to the same wall, double jump is now a little more stronger (it all depends on your timing, if you double jump on your accent you'll get a better force). And holding the down key on a bounce pad stops the force from being too great,

    Blink, yeah thats a tricky one with the friction, too much and box2d doesn't like running up slopes, you need to tweak it, then tweak the running acceleration and air acceleration. Would be nice if box2d had a sliding friction component
    Last edited by mr_malee; 06-03-2011 at 02:05 AM.
    lather yourself up with soap - soap arcade

  5. #5
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,140
    added some movable rocks
    lather yourself up with soap - soap arcade

  6. #6
    Senior Member
    Join Date
    Jan 2010
    Posts
    126
    Nice job malee. I like the general controls, wall jumping and trampolines. I like the sound effects and textures too.

    My only criticism would be that it runs at about 45fps, when I know it could run at 60

    How are you doing the rendering?

  7. #7
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,140
    damn, the frame rate is set to 60. Every PC I've played it on gets 60fps. Might have to start toggling some layers / effects off to find the culprit. Could be box2d also, which I hope it isn't.

    the rendering isn't very complex, just copyPixels for static and cached animations. Draw for movieclips. I was going to work on some merging layer code so as to drastically reduce rendering calls, all static content above or below the player could be merged into one layer. There's about 7 layers atm.
    lather yourself up with soap - soap arcade

  8. #8
    Senior Member
    Join Date
    Jan 2010
    Posts
    126
    I'm trying it on a pretty humble Dual Core laptop, and I get around a 45fps average. But I know it could run faster.

    Box2d is unlikely ISH, because you obviously don't have stacks of objects sucking up juice etc.

    However, I do know box2d isn't exactly fast, so it could be contributing.

    Does it have a broadphase for terrain collision? Because although you don't have big stacks etc, you do obviously have a decent amount of terrain to search for collisions with. That could definitely be a factor.

    If box2d isn't THAT significant, then it must br rendering, probably partly down to the number of pixels you're pushing. Especially transparent pixels. Basically the parallax scrolling, you've got a few transparent layers being rendered per frame right?

    copyPixels calls are fast (not bmd.draw though), so the draw calls you have for the numbers of objects you have is going to be insignificant. CopyPixels is more fill rate limited than draw call limited, you can do a few hundred calls before seeing any impact at all on performance (with the same number of pixels).

    So that means it's box2d or the number of transparent pixels you're rendering or both

    I'll check it again when you've made some tweaks.

  9. #9
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,379
    No issues save one with the rope that I have provided an image for below. Ran at a solid 60-60.5fps with my specs (system stats in signature):

    Firefox 4.0.1
    Windows 7 Professional

    Yes, I'm aware it's overkill. ^_^


    Running from the left side and throwing the rope causes it to pass through the wall and stick to the right-edge of it.
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

  10. #10
    formerly hooligan2001 :) .hooligan's Avatar
    Join Date
    Mar 2008
    Posts
    405
    Looks awesome mate, I tried both demos.

    Demo 9 ran at about 40 - 48 fps but if i went as high as I could with the trampolines where there isnt much on the screen. It went to 60 fps. As soon as I returned to the congested areas. Went back to 40 - 48 jumping quickly between them.

    Demo 10 ran at 40fps on my machine but did the same thing when much less on the screen. Jumped up to roughly 58 - 60.

    My machine is a dual core 2.56mhz, 2gig ram.

    Is it all art based?
    World Arcade | Facebook | Twitter - Follow MEEEE! or not......

  11. #11
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,140
    tilebased, but there are lots of layers which could be merged into 1. The drawing routine is brute force and could be optimized to only redraw changed tiles. But I'm lazy and handling animated tiles is easy.
    lather yourself up with soap - soap arcade

  12. #12
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,140
    http://boxofsoap.com/work/gamedev/ninja/demo12/

    updated with some animations and various other things. Still haven't had a chance to improve the graphics rendering though, hopefully soon.
    lather yourself up with soap - soap arcade

  13. #13
    When you know are. Son of Bryce's Avatar
    Join Date
    Aug 2002
    Location
    Los Angeles
    Posts
    839
    Dude, this is amazing. Controls feels perfect, great attention to detail -- I love the leaves that are kicked up when you run.

    One more thing, at the top when you're bouncing from platform to platform, it's hard to anticipate where the next platform is because you bounce off screen. It would be nice if when you're falling the camera would aim lower so you can better judge where you're falling.

    Are you gonna be setting up puzzles to take advantage of the boulders?

    Also, the HTML page made fun of me for not having Flash 10.3. Are you using some features that take advantage of it?

  14. #14
    formerly hooligan2001 :) .hooligan's Avatar
    Join Date
    Mar 2008
    Posts
    405
    Quote Originally Posted by mr_malee View Post
    tilebased, but there are lots of layers which could be merged into 1. The drawing routine is brute force and could be optimized to only redraw changed tiles. But I'm lazy and handling animated tiles is easy.
    Ahh ok, your using a super tile engine right? Looks like it would have been a pain to make the levels if it was a standard one.
    World Arcade | Facebook | Twitter - Follow MEEEE! or not......

  15. #15
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,140
    there's no super in this tile engine. I use Tiled to create the maps, been using it for a while so its kindof easy to get a map up quickly (undo redo ftw). Otherwise I would have had to create my own which I'm very sick of doing. There is a small editor I made which maps out the physics stuff, but its really simple.

    got another update:

    http://boxofsoap.com/work/gamedev/ninja/demo13/

    *might need to clear browsing data because of the map files.

    hopefully the performance issues are gone. If you still don't get 60fps, its just not going to happen, I added some layer merge code and sprites are now optimized. The weird thing I've found is that doing a full screen copyPixels is much worse that copying small chunks for tiles, so the renderer is still brute force and can only remain so due to the fact animated tiles and sprites are supported with proper layer sorting. I won't go into the details, but it just has to be this way.

    the game now has a purpose as well, see if you can make it to the end. I'm going to start working on the bad guys now so next update will involve some killing
    Last edited by mr_malee; 06-23-2011 at 06:43 AM.
    lather yourself up with soap - soap arcade

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center